Monday, March 18, 2019

Auto formatting numbers in block attributes in AutoCAD

Say you in AutoCAD want a numerical attribute formatted in a special way like a specific number of decimals or with a thousands separator like in this past on Autodesk’s forum. Or maybe show the numeric value like 1800mm as a imperial value of 5’-10 7/8” as seen below.

image

This is achieved by linking attributes with two nested fields. One of the attributes could even be set as invisible or on a non plottable layer.

Start by using Insert Field on one inserted block.

image

Select Objects category and Formula. Right click in the formula text box and select I set Field. This is still not working in BricsCAD.

image

Now select Object and click on the button next to Block Reference and select the same block as you initially edited. Then select the attribute that is manually entered.

image

Click on Evaluate and formatting options will show up.

image

Now the FORMULA attribute below will be formatted as 1,234 based on the NUMBER attribute value of 1234.

image

To have this on multiple blocks you need to copy the initial block because if insert is used the steps above need to be redone.

This is how it can be achieved out-of-the-box in AutoCAD. If you need help with other CAD related functionalities or custom programming contact us

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner