Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with Lookup or multiple Visibility

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
kzD1219
687 Views, 18 Replies

Help with Lookup or multiple Visibility

Hi I have been looking at other posts, but missing something.  There are a few things going on with this block.  Definitely a novice when it comes to dynamic blocks.  Never used lookup since I never understood them.  Seems pretty straight forward after watching a video, but can't seem to get this one to work.

 

There is a Scale Bar that has multiple scales so I used Visibility to get that.

There is a distance so we can stretch the Scale bar to fit our different size sheets.  However a Lookup would be more beneficial, but I can't seem to get it to work.

There is a north arrow that I can rotate, but looking to toggle the north arrow on and off (since we may or may not use it depending on the situation).

 

The dwg is attached.  

These are the values I am looking for to do the stretch

kzD1219_0-1709132875622.png

This is the north arrow to be toggled on or off.

kzD1219_1-1709132937850.png

Would love some input and appreciate any help.

 

 

18 REPLIES 18
Message 2 of 19
Libbya
in reply to: kzD1219

The block you attached does not appear to have any lookups.

Message 3 of 19
kzD1219
in reply to: Libbya

No it doesn't. I didn't get it working so I got rid of it for now. But took a screen shot of the distances on the lookup for reference. I have tried it multiple times since this posted, but still not getting the stretch distances to work.
Message 4 of 19
Libbya
in reply to: kzD1219

Post a version WITH the lookup added and filled out as you show.  That way someone can test the block and see where you have gone wrong.

Message 5 of 19
Libbya
in reply to: Libbya

Actually, I can see what you did wrong in the file you posted.  

 

You created your linear parameter backwards.   The big yellow warning exclamation point at the action end is the big clue.  When creating a linear parameter, the first point you select is the base point, the second selected point is the end point.  When a lookup changes the length of a linear parameter, the base point remains stationary and the end point is moved to adjust the length.  Your block has the parameter backwards so the base point has the action associated with it.  Because of this, when the lookup changes the linear parameter length, the end point (which does not have any actions associated with it) moves but nothing appears to happen.

 

To fix it, deleted the Distance1 parameter.  Make a new linear parameter and pay attention to which end you pick first.  Then associate the stretches with the linear parameter.  

 

FWIW, using visibility states to change the scale text is very inefficient.  Instead, use an attribute for the text and use a block properties table to write the values directly to the attribute.  This gives the benefit of allowing custom text if desired and still maintaining all of the selection text options for the scales.  It also has the benefit of freeing up the visibility states for turning the North arrow ON/OFF.

Message 6 of 19
kzD1219
in reply to: Libbya

Sorry for the delay, work and life got busy, I will definitely look into this and post an updated block when I can and fix up that distance.  I saw that yellow exclamation too, but wasn't sure how to fix it.  Again only really scratched the surface with this.  Never created a workable lookup, but know it is something I need to learn and will make this work better because of the multiple different lengths we can stretch the scale bar line to.  

Message 7 of 19
kzD1219
in reply to: Libbya


@Libbya wrote:

Actually, I can see what you did wrong in the file you posted.  

 

You created your linear parameter backwards.   The big yellow warning exclamation point at the action end is the big clue.  When creating a linear parameter, the first point you select is the base point, the second selected point is the end point.  When a lookup changes the length of a linear parameter, the base point remains stationary and the end point is moved to adjust the length.  Your block has the parameter backwards so the base point has the action associated with it.  Because of this, when the lookup changes the linear parameter length, the end point (which does not have any actions associated with it) moves but nothing appears to happen.

 

To fix it, deleted the Distance1 parameter.  Make a new linear parameter and pay attention to which end you pick first.  Then associate the stretches with the linear parameter.  

 

FWIW, using visibility states to change the scale text is very inefficient.  Instead, use an attribute for the text and use a block properties table to write the values directly to the attribute.  This gives the benefit of allowing custom text if desired and still maintaining all of the selection text options for the scales.  It also has the benefit of freeing up the visibility states for turning the North arrow ON/OFF.


Looking at this again.  I see the exclamation point you are talking about, but no matter which way I make the stretch, it stays there.  I also added the lookup table so that is working now thankfully.  I don't quite understand using an attribute for the text and a block properties table.  Sounds cool, but I haven't done that ever.  The scale ticks are in different positions depending on the scale so how is that handled with an attribute.  Would love to still turn the North Arrow off and on, that is about the only issue that is still ongoing.  Open to suggestions, but again, a little over my head here too.

Message 8 of 19
j.palmeL29YX
in reply to: kzD1219


@kzD1219 wrote:

I see the exclamation point ..., but no matter which way I make the stretch, it stays there.  


Set the Number of Grips to 1. 

 

number of grips.png

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 9 of 19
kzD1219
in reply to: j.palmeL29YX


@j.palmeL29YX wrote:

@kzD1219 wrote:

I see the exclamation point ..., but no matter which way I make the stretch, it stays there.  


Set the Number of Grips to 1. 

 

number of grips.png


Thanks, that was a simple fix.

Message 10 of 19
j.palmeL29YX
in reply to: kzD1219


@kzD1219 wrote:

 

Would love to still turn the North Arrow off and on,

I'd suggest to create two different blocks - one including the North Arrow and an other without them.

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 11 of 19
j.palmeL29YX
in reply to: j.palmeL29YX

Attached an attempt using a Block Properties Table. 

(I didn't yet check in depth if the values in the table all are correct. You should still check that). 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 19
Libbya
in reply to: j.palmeL29YX

In that situation, I wouldn't make two different blocks.  Currently the visibility states are used for two purposes; scaling the positions of the scale marks, and showing different text values at the scale bar and the scale.  Both of those purposes could easily be accomplished with a single visibility state and the use of a block properties table to simultaneously change the position of the scale marks/text and simultaneously writing the values to the text.  That would leave the visibility parameter free to turn the north arrow on/off. 

Message 13 of 19
j.palmeL29YX
in reply to: j.palmeL29YX

Oops, the upload above didn't work properly. 😞

 

I hope now it's ok. 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 14 of 19
j.palmeL29YX
in reply to: Libbya


@Libbya wrote:

In that situation, I wouldn't make two different blocks.   


Full agree. It was only a crutch because @kzD1219 wrote he is not (yet) familiar with using block tables. In the meantime I posted a (hopefully) better workíng example (without further explanation).

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 15 of 19
j.palmeL29YX
in reply to: j.palmeL29YX


@j.palmeL29YX wrote:

 

(I didn't yet check in depth if the values in the table all are correct. You should still check that). 

 


Here an improved version, including some small bug fixes. 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 16 of 19
kzD1219
in reply to: j.palmeL29YX


@j.palmeL29YX wrote:

@j.palmeL29YX wrote:

 

(I didn't yet check in depth if the values in the table all are correct. You should still check that). 

 


Here an improved version, including some small bug fixes.

 


I appreciate the help.  This works exactly like I was hoping for.  

Message 17 of 19
kzD1219
in reply to: kzD1219


@kzD1219 wrote:

@j.palmeL29YX wrote:

@j.palmeL29YX wrote:

 

(I didn't yet check in depth if the values in the table all are correct. You should still check that). 

 


Here an improved version, including some small bug fixes.

 


I appreciate the help.  This works exactly like I was hoping for.  


Quick question if you are able to answer.  The scales should show up below the title so what I did to add the scale was make another attribute, and add it to the block properties table.  That seemed to allow the scales to show up below the Title.  I think that will work, correct?

 

But if I do need to move a tick at the other end for a particular scale, how would I go about that. Just in case I didn't get the right scales and need to fix that up.

 

kzD1219_0-1711463896850.png

kzD1219_0-1711465301761.png

 

 

Message 18 of 19
j.palmeL29YX
in reply to: kzD1219


@kzD1219 wrote

 

 The scales should show up below the title 

I deleted all your MTexts, but added an Attribute whos default is a Field -> Blockplaceholder -> Scale_ . 

 

To update the view you must "Regen" the file.

 

[EDIT:] I'm not sure whether the current design meets your expectations. - maybe in the "Arrow OFF" VisState you should enable the Visibility of the Lookup1 grip. (perhaps you forgot it ?)

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 19 of 19
j.palmeL29YX
in reply to: kzD1219


@kzD1219 wrote: 

 

But if I do need to move a tick at the other end for a particular scale, how would I go about that. Just in case I didn't get the right scales and need to fix that up.

I don't understand your question. Would you please show us an example what you want to do or to achieve. 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


”Boost