by Dennis Collin
Recently I wrote a post on how to utilise fields within AutoCAD to show coordinates on survey and general construction drawings. The post can be found here: https://www.cadlinecommunity.co.uk/hc/en-us/articles/360015105717
This method shows coordinates relating to AutoCAD’s World Coordinate System whereas sometimes coordinates need to refer to a local datum, particularly for setting out plans. This can be achieved by writing a transformation formula to convert the global coordinates to local format. In the example below we can see a sample symbol showing both cartesian systems Local and World using a mix of field and formula attributes.
To make an ordinate relate to the local grid setting, create a position field for the marker object, in a similar way to the process described in my previous post. (link above) Start off with a formula ‘rxof(W2U(a), but replace the ‘a’ value with a nested field of the X ordinate of the marker. This is achieved by right clicking midway through the formula and selecting an object based position field.
The formula should look like the following:
Repeat for the y and z ordinates as desired.
If you want the X,Y,Z as one string, just combine them into one formula like this; rxof(w2u(x, y, z)).
Save the block to the library. When placed in a drawing, set to the WCS, the coordinates will display correctly, but change to any local UCS coordinate system and save or Regenerate the drawing the coordinate positions will change as expected. This information can be scheduled or extracted to Excel as required.
I have written a separate post on this process here:
Blocks, attributes, fields dimensions, symbol libraries and templates are just some of the topics that are covered on an AutoCAD Intermediate course. For more details on both scheduled and custom AutoCAD courses, please visit https://training.cadline.co.uk/ or talk to one of the team on 01784 419922 or via the site’s live chat facility.