Jump to content

Using block's x-coordinate to get station


Recommended Posts

I currently have my elevation view set up so that the x-coordinates correspond to the stationing along my structure and the y-coordinate corresponds to the elevations. I have a block that will insert the y-coordinate as it should. However, the x-coordinate requires some formatting so that it is shown properly (e.g. "10+00").

 

I have an attribute equal to a the x-coordinate divided by 100 with the precision changed to 0. So, if my point is 1016.123, the formula converts that to 10. This field is followed by a plus sign and then another field. This last field is equal to the x-coordinate minus the x-coordinate converted as before, then times 100. The purpose being that if my x-coordinate is 1016.123, I would get 16.123 and my block attribute would reflect 10+16.123. The problem is that AutoCAD retains all of the x-coordinate's precision when subtracting and I end up with a result of 0. See attached for clarity - I know this last bit is hard to understand if you can actually see what's going on.

 

I understand that I could subtract out 1000, but when my stationing is beyond 20+00, I will only be subtracting 1000 and my result will not be correct.

 

Do any of you have another solution?

 

Thanks!

sample.dwg

Link to comment
Share on other sites

Thank you rjohnson.

A list of all available functions, besides the link you posted, can be found in Autodesk Help. All functions can be used in CAL Command, table formulas and fields.

Link to comment
Share on other sites

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...