Author Topic: Civil 3D | Dynamic Scale Bar  (Read 8773 times)

0 Members and 1 Guest are viewing this topic.

BlackBox

  • King Gator
  • Posts: 3770
Civil 3D | Dynamic Scale Bar
« on: April 28, 2016, 02:10:12 PM »
I've been using a dynamic North Arrow for some time, and finally setup a Scale Bar to link to my Viewports.

It's working fine for the most part, and I've cleaned up the hard-coded drawing(s), so my North Arrow, and Scale Bar show within the Ribbon UI.

The only issue I'm really having, and cannot see a way to fix, is that when the Scale Bar changes with a Viewport scale change, it always adds a fractional change in the ten-thousandths+ that prevents it from reading to the foot (US Imperial here). :-o

How the heck do I get it (the attributes?) to STOP reading past ##.0, or round down to integer feet?


TIA
"How we think determines what we do, and what we do determines what we get."

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Civil 3D | Dynamic Scale Bar
« Reply #1 on: April 28, 2016, 02:41:14 PM »
I would think that formatting the field to round to whole number would resolve that...

Be your Best


Michael Farrell
http://primeservicesglobal.com/

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Dynamic Scale Bar
« Reply #2 on: April 28, 2016, 03:29:38 PM »
I would think that formatting the field to round to whole number would resolve that...

What Field? :?



Civil 3D dynamic Scale Bar is 'Map.ScaleBar.Div.Length' parameter-based, and the vanilla Attributes are simply Tagged as 'Map.Scale.Bar.Div.*' - as I understand it, Map functionality is actually what populates the values accordingly.

Changing drawing precision is not an acceptable solution, as has been suggested in Autodesk forums; hence my question here.


Cheers
"How we think determines what we do, and what we do determines what we get."

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Civil 3D | Dynamic Scale Bar
« Reply #3 on: April 28, 2016, 03:35:43 PM »
I would think that formatting the field to round to whole number would resolve that...

What Field? :?



Civil 3D dynamic Scale Bar is 'Map.ScaleBar.Div.Length' parameter-based, and the vanilla Attributes are simply Tagged as 'Map.Scale.Bar.Div.*' - as I understand it, Map functionality is actually what populates the values accordingly.

Changing drawing precision is not an acceptable solution, as has been suggested in Autodesk forums; hence my question here.


Cheers
OH...sorry I thought you had created your own dynamic block for that purpose.  hmmm
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Civil 3D | Dynamic Scale Bar
« Reply #4 on: April 28, 2016, 03:37:01 PM »
perhaps replace those default attributes with fields that ARE properly formatted
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: Civil 3D | Dynamic Scale Bar
« Reply #5 on: April 28, 2016, 03:41:24 PM »
I've been using a dynamic North Arrow for some time, and finally setup a Scale Bar to link to my Viewports.
For the record; i hate those things! :)

I still use a simple old block with attributes. It works!

carry on ...
TheSwamp.org  (serving the CAD community since 2003)

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Dynamic Scale Bar
« Reply #6 on: April 28, 2016, 04:13:36 PM »
Thanks, Guys!

The North Arrow has been awesome for the past couple of years, so I finally put the time in to setup the Scale Bar, replace those listed in the OOTB UI, etc., and it's just bonkers.

Unless someone knows how to fix this undesired behavior, I'm going back to using the vanilla Block. *kicks dirt*
"How we think determines what we do, and what we do determines what we get."

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Civil 3D | Dynamic Scale Bar
« Reply #7 on: April 28, 2016, 05:49:20 PM »
I'm going back to using the vanilla Block. *kicks dirt*


Ha... Never found a reason to stop using what works. :-)

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Dynamic Scale Bar
« Reply #8 on: April 28, 2016, 06:47:18 PM »
I'm going back to using the vanilla Block. *kicks dirt*


Ha... Never found a reason to stop using what works. :-)

I know one can use a Field to reference the Viewport's Standard Scale (I do that within the Title Block now), and I don't mind another reference dependency, but is there a way to populate a Scale Bar's ' 0 - <ScaleAsInteger> (at 1") - <ScaleAsInteger X 2> (at 2") ' format?

Cheers

"How we think determines what we do, and what we do determines what we get."

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Civil 3D | Dynamic Scale Bar
« Reply #9 on: April 28, 2016, 09:46:05 PM »
A field?  Additional Format -> Conversion  Factor?

I'm going back to using the vanilla Block. *kicks dirt*


Ha... Never found a reason to stop using what works. :-)

I know one can use a Field to reference the Viewport's Standard Scale (I do that within the Title Block now), and I don't mind another reference dependency, but is there a way to populate a Scale Bar's ' 0 - <ScaleAsInteger> (at 1") - <ScaleAsInteger X 2> (at 2") ' format?

Cheers

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Civil 3D | Dynamic Scale Bar
« Reply #10 on: April 29, 2016, 04:09:18 AM »
You can use a formula.

Included a block with a few attributes and a formula to the block scale.

Maybe you can use the same formula with the current viewport scale, but then you need to place the block in Modelspace.

Ow btw, texts inside the blocks are in Dutch but you probably understand the meaning :-)
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Dynamic Scale Bar
« Reply #11 on: April 29, 2016, 09:25:21 AM »
Thanks, Henrique!

The formula does work, but requires the block be inserted in Model space, unfortunately. :-(

In Civil 3D, the scale bar (and north arrow) are 'linked' to a Viewport, from which they extract the necessary scale (or direction) information. I can do similar with a Field, however referencing the Viewport object only yields the Standard Scale as string, such as "1\" = 40'". :-(

Using a Field that references a Formula, which itself references a Field using [0.5\1.0\2.0] / <CANNOSCALEVALUE> works perfect... But again, requires the Scale Bar be in Model space (Paper space == 1:1), which now means also accounting for the 'dynamic' scaling of the Scale Bar block itself, unless I want to introduce another manual task. Model space can also have a different Annotation Scale, than the Paper space Viewport, which could present an issue (I purposefully make them the same, but they're not 'linked'). :|

... Grumble, mumble, grrr... Need some coffee. :-D
"How we think determines what we do, and what we do determines what we get."

sljohnson

  • Newt
  • Posts: 27
Re: Civil 3D | Dynamic Scale Bar
« Reply #12 on: April 29, 2016, 02:35:57 PM »
Thinking this over lunch, here is an outline of what came to mind, I don't know if the User Parameter is the right tool for this:

Define a scale block with User Parameter ScaleBarCustom (Default =1) and attributes for ScaleBar.Div0, ScaleBar.Div1, ScaleBar.Div2, ...

Then use deisel expressions that references the ScaleBarCustom Parameter that calculates ScaleBar.Div* accurately. Keep in mind that the "Custom Scale" Object Property with no formatting is the field that will be entered into ScaleBarCustom. e.g. (1/ScaleBarCustom)*2

Now to use that block, a lisp to insert the block that gets the "Custom Scale" field (not the value, the actual linked field) from the selected viewport and  then inserts the block while writing the 'Custom Scale" field for the selected viewport. Or it could re-associate a "Custom Scale" field already in the block with the selected viewport. I'm not sure which would be easier to implement.

I don't know if the above is even possible or the "proper" way to do it, however thus ends my lunch time brainstorm...or light drizzle.

Best,
Shannon

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Civil 3D | Dynamic Scale Bar
« Reply #13 on: April 29, 2016, 03:35:59 PM »
Here is what I use but never really use the second bar scale since only needed for 3/32" but other works great for all others used.




alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Civil 3D | Dynamic Scale Bar
« Reply #14 on: April 29, 2016, 03:45:51 PM »
Are you connecting the dynamic north arrow to the viewport with code, or is there a way to do it without?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Dynamic Scale Bar
« Reply #15 on: April 29, 2016, 11:30:30 PM »
Thanks, Jeff/Shannon - I'll have to check that out.



Are you connecting the dynamic north arrow to the viewport with code, or is there a way to do it without?

Using the native Ribbon UI - I did replace the Map drawings, so that my blocks are built into the hard-coded UI functionality, instead of the myriad OOTB samples though - from there, simply click the button and select the Viewport.

If - rather when - you have a North Arrow that is no longer associated with a Viewport, select it, and to the right, there's a Badge with a dropdown (similar to a Constraint?), which allows you to reassociate the link to a new / same Viewport.

Cheers
"How we think determines what we do, and what we do determines what we get."