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
This is the north arrow to be toggled on or off.
Would love some input and appreciate any help.
Solved! Go to Solution.
Solved by j.palmeL29YX. Go to Solution.
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.
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.
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.
@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.
@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.
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.
@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.
Thanks, that was a simple fix.
@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.
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.
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.
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.
@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.
@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.
@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.
@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 wroteThe 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.
@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.
Can't find what you're looking for? Ask the community or share your knowledge.