PDA

View Full Version : ID command coordinates to table



superunknown
4th Apr 2007, 03:58 pm
Is there any way to go round an autocad site plan using the ID command and have the coordinates registered automatically to a table in Autocad 2004

CarlB
4th Apr 2007, 06:52 pm
No, not without an add-on like LDD or Civil 3D, or a custom Lisp or VBA routine.

Alan Cullen
4th Apr 2007, 11:24 pm
PM me your email address.....I'll send you a lisp routine that will do what you're after.

ASMI
5th Apr 2007, 07:48 am
Try this routine.


(defun c:ptt(/ curPt txtObj vlaTxt)
(vl-load-com)
(setq curPt T)
(while curPt
(if
(and
(setq curPt
(getpoint "\nPick point > "))
(setq txtObj
(nentsel "\nSelect Text, MText or Attribute > "))
); end and
(progn
(if
(member
(vla-get-ObjectName
(setq vlaTxt(vlax-ename->vla-object(car txtObj))))
'("AcDbText" "AcDbMText" "AcDbAttribute"))
(progn
(if
(vl-catch-all-error-p
(vl-catch-all-apply
'vla-put-TextString
(list vlaTxt
(strcat(rtos(car curPt))
","(rtos(cadr curPt))))))
(princ "\nText on locked layer! ")
); end if
); end progn
(princ "\nIt isn't Text, MText or Attribute! ")
); end if
); end progn
); end if
); end while
(princ)
); end of c:ptt