Jump to content

Recommended Posts

Posted

I am trying to make a scale bar block that allows user to input the scale and it automatically populates the scale bar numbers.

Note, I do not want to do a dynamic block with a list of preset scales that toggle visibility; I want the user to be able to input one field and have all the respective scale bar values calculated and updated based on that number.

 

I am having a problem making the numbers update correctly.

 

Attached is a screenshot of the block in the block editor (I cannot upload the 350kb cad file due to the website stating a limit of 250kb)

 

The block has one attribute - "mainscale" - where a user can enter the desired scale, default is 1000.

The mtext contain a field with a formula - the formula has a field targeting object-> "mainscale" -> value property, and divides it by 100 for 2nd bar value, by 50 for 3rd bar value, etc (to achieve the 10, 20, 30 when default value is 1000).

 

When I change the default value of "mainscale" within the block editor, the mtext values update correctly after a regen.

However when out of the block editor, after changing the "mainscale" value and regen the scale values do not update.

 

What am I missing to make the fields update on a regen when the attribute value is changed?

Or Is there some other way to create the scale bar with user input?

Do I need to use scripts to make this work?

 

Thanks in advance

 

(using Civil 3d 2011)

scale.jpg

Posted

someone will offer you a more direct solution soon i'm sure, but in the meantime......

 

i would make this using layers (because it's simpler). draw all the numbers for scale 1:20 on layer called 1:20, freeze all the others off. simple, yes, but basic, i know.

 

hang in there, better answers will follow......... :)

Posted

@grant: regenall has same effect as regen, it just regen's all VP's and layouts, didnt resolve this issue.

 

@designerstuart: what you propose can be done with dynamic block, with each layer of scale on a separate visibility state. That is great when you only have specific scales in regular use (ie 1:100, 1:500, 1:1000, etc) and you can build one visibility state for each scale but that does not achieve what I am after, as that solution locks you into set scales.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...