So the goal is to create a dynamic bar scale in the opposite way that the built in bars work. Rather than have the bar resize with the scale of the viewport, we have a bar that is a set width (with 1/4" increments) and want the numbers to change based on the scale of the viewport. It sounds a little strange but IMO the way the current scales work is a little convoluded.
Here's what we're going for:
Make a block with increments, have the 1" increment be the vp scale (therefore printing as 1:vpscale). This can either be accomplished by clicking on the viewport or by making a manually editable attribute, I'm not picky. The next however many increments will be multiples of that first entry.
Here's what we've tried:
Here are the problems:
All these attempts are predicated on the fact that I just don't have time to write any code.
Any takers?
The problem I see is that you are adding the fields as mtext objects. Add them with Attdef, add a field value as the default value, and be sure sure sure you check the box next to Preset in the attdef dialog. If you don't check Preset, it won't work.
Tim
Here's on I created that's dynamic.
Rick Jackson
Survey CAD Technician VI
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.
This isnt automated but may work for you.
Joe Bouza
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.
Well its seems that all Scale Blocks are pretty much the same LOL
Rick Jackson
Survey CAD Technician VI
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.
We use a block with attributes for this. The attributes contain a field that uses the customscale value of a viewport that is linked by a macro. The result is a bar scale that has values that change with the zoom height of the viewport.
the formula would be 1/customscale
field code where the number is the objectID of the viewport you are linking to:
%<\AcExpr (1/%<\AcObjProp Object(%<\_ObjId 8796086946384>%).CustomScale \f "%lu2%qf2816">%) \f "%lu2%pr0">%
This is a basic example. We have also leveraged this method to link to profile or section views and display their vertical scale as well. But that requires more code.
The attached drawing contains a viewport that is linked to the bar scale and will update on a regen when the zoom height is changed.
Stacy
Here's ours the bar doesn't change and it uses visibility states to change scales.
Don Ireland
Engineering Design Technician
I just thought about the 1/customscale yesterday. Thanks for the heads up.
Wow everyone, thanks for your input. I'll let you know if anyone's is gonna work for us after I get a chance to run through them all.
Joe Bouza
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.
Hey everyone,
After a little tinkering with the suggestions I actually got ours to work (checking preset does change some things) with 1 caveat. I won't go into specifics but the gist is that you have to redefine the fields after you're out of the block. This brings us to the caveat: You have to copy this scale bar for it to work. If you try to insert the block the fields will reference the default again. If someone can figure out how to make the block work from scratch, feel free to do so. File's attached.
PS The fields will update on "regen", "save", "updatefield", etc