• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy
  • Bahasa Indonesia

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
You are here: Home / AutoCAD / How to: Label Coordinate in AutoCAD

How to: Label Coordinate in AutoCAD

November 9, 2009 by Edwin Prakoso 121 Comments

I had this question several times: can we automatically label our coordinate in AutoCAD? If you are a Civil3D user, then you most likely will suggest them to use C3D. But can AutoCAD do it? YES!

I saw many people use AutoLISP to do that task. It works great. But sometimes you may want to have your labeling symbol and format. So, why not using field?

Creating a reference object

First, we need to create an object as a reference point. It can be a point, a circle, or any symbol you want it to appear. I use this symbol.

reference object

I prefer to use point or circle. We can easily use the point position or circle center.

Creating an Attribute Definition

After we have the reference object, we need to define an attribute definition. You can activate it by clicking it on your ribbon, home tab, block panel.

attdef

Or simply type ATTDEF then [enter].

Let’s define our attribute. Give the attribute tag, prompt like below. In default field, type ‘X Y = ‘ then click insert field.

Change the field category to objects, and in field names, select object. Click select object button to define the object type. Select the circle, don’t select anything else!

AutoCAD will list all available properties. Select center (or if you use point, select position). Because I only use it in 2D drawings, I don’t need it to display Z value. I turn it off. Change the format if necessary.Click OK.

define property

Click OK again to close the define attribute dialog box. Place your attribute definition in the desired location.

Optional: Define Adjustable Leader

If you don’t want to have a leader on your coordinate label, you can skip this step.

I add a line that will be used as the leader.

leader line

Create the Block

Now we can define the block. Click create from ribbon, block panel.

create block

Select all the objects, and define the center as an insertion point. Activate Open in Block Editor on the lower left of this dialog. We are going to add some ‘dynamic’ functionality. Click OK.

AutoCAD will show the edit attribute dialog. We don’t want to modify it as it is updated automatically. Just click OK.

Add the Control Grip

What we want to do is adding a grip control so that we can modify the text (and optionally leader) placement. In block authoring palette, activate the point parameter.

point parameter

Now place it where you want the grip to appear.

point parameter placement

Now activate the stretch action.

Select the point parameter, create the stretch frame like below, and select the line and attribute definition. [Enter] to end it.

cross polygon

Now we are done! Save this block and close block editor.

Using the Label

How can we use the label? Just insert the block, and click on the point you want to show the coordinate. After you have one of the blocks in your drawing, you can copy it and place it on several points you wanted.

Because we add a control grip, we can move the text and leader position!

control grip

Because we use a field, if you move your points, the value will be automatically updated! Very cool, isn’t it?

Why Attribute Definition? Why not Just Use Text?

You might ask this: why not just use text in a field? I know we can insert a field into a text, single or multiline. But it doesn’t work. You may want to try it by yourself.

Apparently, the field will consider the reference point always at 0,0,0 when you create a block. It works if you don’t create a block from them, but I believe you want to use it as reusable content, aren’t you?

Video Instruction

If you have problem, you can use this video as reference how to create and use the coordinate label block.

About Edwin Prakoso

I work as a Sr. Consultant in PT Cipta Satria Informatika. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn.

Filed Under: AutoCAD Tagged With: dynamic block, Fields

4.7 7 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

121 Comments
Inline Feedbacks
View all comments
JR
JR
12 years ago

Hi, Edwin, yes acad is very weak in labeling both in xyz of points and bearings and dist in lines. what are the way to fix this short coming?
JR (jr_chia@yahoo.com)

0
Reply
Chris
Chris
12 years ago

Edwin,
This has been very useful for me but there is one thing I would like to do but can't work out:
My drawing is set up in millimetres and I can't change that for the purposes of how we set our drawings up, but I would like to show the co-ordinates in metres. Is there a way to automatically convert the values?

0
Reply
Edwin Prakoso
Edwin Prakoso
Reply to  Chris
12 years ago

Unfortunately you can't. If you want to do this, you have to use AutoLISP program. We have AutoLISP program that do similar thing: https://www.cad-notes.com/2010/11/using-autolisp-to-la…

0
Reply
TN
TN
13 years ago

Hi Edwin, Your instruction is great!
 I followed your instruction to create a block with coordinate value, it works. I have a situation where about 50 point that I need to label with xy coordinate. I like your method, but I don't want to keep hitting "insert" and "enter" too many times; can I somehow copy this block to the rest of the locations that I want to label and have it display at the right coordinates?

Also, is there an easier way than copy and paste to put this coordinate on the chart after the xy coordinates are label at the right locations?

Thank you in advance.

0
Reply
Edwin Prakoso
Edwin Prakoso
Reply to  TN
13 years ago

TN,
Yes, you can copy it. All the blocks will display correct coordinate. But remember, the value only update if you regen, save or print it.
For the second question, you can use data extraction to create a report. Check this article: https://www.cad-notes.com/2009/12/reporting-multiple-c…

0
Reply
Rolando
Rolando
14 years ago

Great! I have not checked this one yet but will do.. In the mean time, i attached the coordinate label blocks (discussed above) as an xref to a drawing, it shows fine but when i plot it, the coordinates shows zero values.. i have tried fieldeval but it still shows the same.. do you know why by any chance?.. thanks a lot.

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Rolando
14 years ago

It's the downside of this method. It only works for current file, and only for WCS. If you're working with XREF or UCS coordinate, AutoLISP works better.

0
Reply
Rolando
Rolando
14 years ago

This is really helpful for ever changing design, i created 2 attributes for x and y. i added the flip parameter as well as it needs to be on the other side sometimes.. thanks edwin!

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Rolando
14 years ago

Glad that you find it useful ;)
You may also want to consider using AutoLISP program. I wrote this tutorial too, if you want to try it.

0
Reply
Afaque
Afaque
14 years ago

Hi Edwin

Your Block works perfectly, but I need your help in getting a label display (i.e) 1,2,3 …. or A, B, C……. in incremental or decremental order with the block when I copy the same block number of time in a same DWG. I need it because when I extract date to excel I get a column which shows 1 or A and the value.

Please advise

Thanks for Understanding

Regards

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Afaque
14 years ago

Afaque,

This require a LISP programming to do that. I will try to create one when I have time. I hope I can publish it this week.

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Afaque
14 years ago

Afaque,
You may want to take a look at this: http://www.contractcaddgroup.com/VBA/renumber/ren…
But you need to download VBA for AutoCAD and install it first to make it work. <a href="http://www.autodesk.com/vba-download” target=”_blank”>www.autodesk.com/vba-download

0
Reply
Kara
Kara
14 years ago

Love the post. I've created my with 2 attibute definitions to show the Y/X values, stacked. After selecting the object, point and position, I click the "Additional Format". The "Thousands number separator" is grey out. I've like to be able to show the northing/easting as ie. 6,123,123.00 and 423,123.00. Can you help?

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Kara
14 years ago

Kara,

I think this is another stacking problem. I don't know how you can even make it works. Just like Calum said, all I see is ####.

I think you need to create separate attributes.

0
Reply
Calum Nesbitt
Calum Nesbitt
14 years ago

Works excellently for single line text but would like to have the X Y and Z coordinates to appear stacked as a multiline text (MTEXT) Have tried selecting field at ATTDEF stage then defining multiline in the same dialog box but ultimate result is single line of '##############' characters???

Look forward to your reply

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Calum Nesbitt
14 years ago

Calum,
I notice after I tried it. I haven't been able to solve it.
Just curious, why don't you try to create three separate attributes and arrange the position to make them look stacked?
It works, maybe require more works, but I don't think it's a big problem. We only create the block once anyway…

0
Reply
EdwinPrakoso
EdwinPrakoso
15 years ago

I suspect this is something about object selection for your action. Can you send me the file, so I can take a look? Send the file to my email. You can find my email in about page.
I'm sorry that I don't write my email address here. It's to avoid spam bot mining my email address :)

0
Reply
StuArchitect
StuArchitect
15 years ago

This is great, i followed it and even tried my own twist… i am an architect so i wanted to use it for Northings & Eastings, so i added a second attribute, so one shows Y coordiante (northing) and the other the X coordinate (easting), but when i move the leader the first attribute moves, but in completly strange way, and the second attribute does not move at all. any ideas?

0
Reply
« Previous 1 2 3 4 5 6 … 9 Next »
wpdiscuz   wpDiscuz

Featured

What’s new in AutoCAD: Block and References

AutoCAD new features roundup in several last versions. In this post we will see what’s new in blocks and references.

Recent Articles

  • Autodesk Construction Cloud Activity Log
  • Exporting AutoCAD Plant 3D Model to Navisworks
  • Autodesk Data Connector for Power BI is Now Available

Advertisement

New on CADnotes

  • Autodesk Construction Cloud Activity Log
  • Exporting AutoCAD Plant 3D Model to Navisworks
  • Autodesk Data Connector for Power BI is Now Available
  • Autodesk Forma Design Contest
  • Revit 2025: Toposolid Enhancements

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2025 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz