Jump to content

Show The X,Y coordinate for a point


TYGA

Recommended Posts

Hello everyone, I'm having a problem with showing the both x,y coordinates for a certain point , does anyone know how can i do that:cry: , and by the way I'm using Auto-CAD 2005, because whenever i try to show it , it either show the X - coordinate:wink: or the y - coordinate:wink: alone but i need to show both of them:( for example this point (4.2 , 2.2).

thank you guy's for the wonderful forum , and please accept me as a new friend.:)

Link to comment
Share on other sites

Patience, new friend! For you the week is just beginning, for some of us it is the start of the weekend.

 

As you have found, AutoCAD will only write one coordinate at a time. However, there is a nice Lisp written by ASMI here. Look at post no 6.

Link to comment
Share on other sites

Hello everyone, I'm having a problem with showing the both x,y coordinates for a certain point , does anyone know how can i do that:cry: , and by the way I'm using Auto-CAD 2005, because whenever i try to show it , it either show the X - coordinate:wink: or the y - coordinate:wink: alone but i need to show both of them:( for example this point (4.2 , 2.2).

thank you guy's for the wonderful forum , and please accept me as a new friend.:)

 

Tools > Inquiry > Point ID :)

Link to comment
Share on other sites

eldon , your way is nice but i think it's too complicated for a beginner.

I know this way ( Dimensions>Ordinate>RightClick on the Point>.X or .Y ) but as you can see it will give one coordinate for to the selected point , Either X Either Y ( and that doesn't work with me ) , So Any Ideas.

Link to comment
Share on other sites

All beginners have to start somewhere, and having an object in sight is very motivating.

 

Either you have to master using Lisps or you have to master using Fields.

 

I usually use r 2002 which does not have Fields, but managed to generate the picture above quite quickly using 2005. Go for it!

Link to comment
Share on other sites

I made a block which was a point, and then inserted a field of its position (x,y). Then it can be inserted or copied to each end point in your drawing. Then reformat the point to be a dot, and you cannot see it any more! The text can be dragged around with the grip to be where you want it.

 

If you want to go further, then you can explode all the fields, then you will be left with text only.

FieldXY.jpg

Link to comment
Share on other sites

Either you have to master using Lisps .....

 

A leader lisp that does what you want ->

 

(defun c:31 (/ odt odg oecho oerr p1 p2 a1 a2 a)
 (setq	odt   (getvar "dimtad")
odg   (getvar "dimgap")
oecho (getvar "cmdecho")
 )
 (setq oerr *error*)
 (defun *error* (msg)
   (princ "\n ERROR!")
   (setvar "cmdecho" oecho)
   (setvar "dimtad" odt)
   (setvar "dimgap" odg)
   (setq *error* oerr)
   (command)
   (princ)
 )
 (setvar "cmdecho" 0)
 (setvar "dimtad" 0)
 (setvar "dimgap" -0.09)
 (while (setq p1 (getpoint "\n Point to identify: "))
   (setq p2 (getpoint p1 "\n Place annotation: ")
  a1 (rtos (nth 0 p1) 2 1)
  a2 (rtos (nth 1 p1) 2 1)
  a3 (rtos (nth 2 p1) 2 1)
  ;;a  (strcat a1 ", " a2 ", z=" a3)
  a  (strcat a1 ", " a2)
  ;;a  (strcat "x=" a1 "\\Py=" a2)
  ;;a  (strcat "x=" a1 "\\Py=" a2 "\\Pz=" a3)
  ;;a  (strcat "x = " a1 ", y = " a2)
   )
   ;(if (/= a3 "0.000")(setq a (strcat a1 ", " a2 ", z=" a3)))
   (command "leader" p1 p2 "" a "" ^c)
 )
 (setvar "cmdecho" oecho)
 (setvar "dimtad" odt)
 (setvar "dimgap" odg)
 (princ)
) ;_ end of defun

(prompt "\n To start ID Leader, type > 31 <: ")

Link to comment
Share on other sites

  1. I was looking for routine like this paulmcz, but I'm not skilled in Lisp. How to modify this routine so it will instead drawing an arrow and line around number just display "(x, y)" at 2nd specified point?
  2. Where to put Lisp file so it will be available for all drawings and I don't have to always load it, for each drawing?
  3. How you can load Lisp routine in AutoCAD 2010 over ribbon? I can do that only over hidden classic menu (Tools | AutoLISP | Load Application...).

Regards,

Billy

Link to comment
Share on other sites

  1. I was looking for routine like this paulmcz, but I'm not skilled in Lisp. How to modify this routine so it will instead drawing an arrow and line around number just display "(x, y)" at 2nd specified point?
  2. Where to put Lisp file so it will be available for all drawings and I don't have to always load it, for each drawing?
  3. How you can load Lisp routine in AutoCAD 2010 over ribbon? I can do that only over hidden classic menu (Tools | AutoLISP | Load Application...).

Regards,

Billy

 

1. Here is the routine without the leader

2. Save both attached files into AutoCAD's Support folder

3. Don't know anything about the ribbon

 

Type > 32

 

If there already is "acaddoc.lsp" file in your Support folder, don't overwrite. Instead, copy the text from this one and paste it into your existing "acaddoc.lsp file.

 

Go to Tools>Autolisp>Visual Lisp Editor > help, if you need to learn about the Autolisp.

acaddoc.lsp

Point-ID-32.lsp

Link to comment
Share on other sites

  • 2 years later...

Great lisp routine, but is there a way to change the text to go to 3 place decimals. It rounds off and it comes up (x=3.3,y=0.0) i need (x=3.250,y=0.000) thanks.

Link to comment
Share on other sites

  • 1 year later...

XY.lsp

 

 

Download attached lisp Programme and save it

 

-> Autocad > tools > load Application > Brows Lisp file (XY) > Load > ok

 

 

type "XY" in command line and enter

then go to point and click on point and then side

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