Jump to content

Recommended Posts

Posted

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

Posted

No, not without an add-on like LDD or Civil 3D, or a custom Lisp or VBA routine.

Guest Alan Cullen
Posted

PM me your email address.....I'll send you a lisp routine that will do what you're after.

Posted

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

  • 5 years later...
Posted

Looks like PTT.

 

defun c:[b][color=red]ptt[/color][/b]

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