• 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
Julie
Julie
10 years ago

Edwin,

Thank you so much for this concept! We don’t use coordinate points on our drawings here (mostly architectural based drawings) so I changed things around a little and created an elevation mark that automatically updates level heights.

Julie

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Julie
10 years ago

I’m glad that you find it useful and can implement it for other purpose :)

0
Reply
SEHAM
SEHAM
11 years ago

Hi , want to ask you about
if i want the attribute give me the heights such as heighhts of the window in elevation
What are the necessary steps for this ?

0
Reply
Eliska
Eliska
11 years ago

Hi Edwin,

this information is great! However, I have a question.

I received a drawing with hundreds of blocks with coordinates and need to export them to .txt file. Is there any way to name each one of them (eg. A01, A02, etc.), so I don’t have to manually re-write the exported file?

Thank you very much!

Eliska

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Eliska
11 years ago

Hi Eliska,
You can open the text file in Microsoft Excel and add the text there. Then you can save it to CSV or other text format. I think that is faster than modifying the drawing.
You can also modify the attributes. But depends on your block, the best workaround may vary.

0
Reply
Eliska
Eliska
Reply to  Edwin Prakoso
11 years ago

Thank you, Edwin!

I have found easy way how to export attributes coordinates straight to .txt file with names of blocks already. Express tools -> Export attributes.

But the problem is, that I cannot see the block names in ACAD. Is there any way I can see name of the block in my .dwg?

Thank you very much!

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Eliska
11 years ago

You can activate block name in rollover tooltips. It’s the easiest way to check the block name. Here is how to change the rollover tooltips information: https://www.cad-notes.com/5-more-things-you-can-do-with-cui/
Or you can select the block and check the name in properties palette.

0
Reply
Kevin Joyner
Kevin Joyner
11 years ago

Edwin;

I am trying to do something similiar to what has been explained above. I would like to create a block that contains a tag and an embedded field attribute for the purpose of calculating surface area of paver fields for landscaping material extraction.

I can’t necessarily attached the wblock to an object as I would like to insert it into each drawing (unless the trick is to creat the block in my template) and multiple times for various pline shapes. I have created the block with the field attribute but can’t figure out how to be able to select the object it needs to calculate the surface area of for extraction.

Where am I going wrong here?

Thanks

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Kevin Joyner
11 years ago

Hi Kevin,
It’s not possible to use this block and fields for this purpose. You can’t select object after you place the block. Using LISP is the way to go.
I’m sorry I can’t be more helpful.

0
Reply
Alpla
Alpla
11 years ago

Dear Edwin.

That info is brilliant. Thank u a lot.

However I want to add another idea.

I do the same procedure in another order.

1.- Make the circle with the crossing lines as you do.
2.- I make a Block with that symbol.
3.- I open the Block in order to edit it.
4.- Only then I add the labels (as you do) and the leading line (the line connecting the symbol with the label)
5.- I add the “point” and so on (as you do in the chapter “Add the Control Grip”)

The difference is that I make the “labels” and the “leader line” after making the Block and inside the block editor.

The result is a little bit different: the label and the text are really attached to each other, so whenever I move them, they move together.

In your way I have to move the text and the leader separately.

Best Regards

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Alpla
11 years ago

Hi Alpla,

That’s interesting. Can you send me your block, so I can compare it? You can email it to edwin.prakoso@cad-notes.com

0
Reply
jayesh patel
jayesh patel
11 years ago

i want to convert x,y co-ordinates in excel into auto-cad.
so please give me suggest step by step.

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  jayesh patel
11 years ago

Can this help you? Import X,Y Coordinates from Excel into AutoCAD

0
Reply
uwha
uwha
11 years ago

brilliant. got me out of a pickle

0
Reply
Imran Shaik
Imran Shaik
11 years ago

HI,
Edwin Prakoso
This is imran, I have one doubt, i have more then 400 Co-ordinates to provide coordinate's, for this i can't do 400 time copy paste (coordinate point block), is there any easy way to use measure cmnd or any other cmnd. to provide in small of time all coordinate's

thanks in advance

0
Reply
Bailey
Bailey
11 years ago

This is great thanks. I am trying to move the decimal point so that instead of it being after the 6th number I want it after the 6th, is this possible? thanks

0
Reply
Gandhi
Gandhi
11 years ago

HI,
This is Gandhi, I have one doubt, i have 50 Co-ordinates in excel if i appload the excel co-ordinates area marked in circle for single Query or lisp is it possible to do…

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

Featured

15 Ways to Access AutoCAD commands

What is the fastest way to use AutoCAD commands? It depends, there are many ways to activate AutoCAD commands. One may faster than the other. So let’s see different ways to activate AutoCAD commands here!

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