Jump to content

Autolisp to annotate 3d point z value


Margusrebase

Recommended Posts

Please be a bit more specific.

 

----

EDIT: do you mean something like this?

 

;; Lee Mac, @see http://www.cadtutor.net/forum/showthread.php?44768-Entmake-Functions
(defun Text (pt hgt str)
 (entmakex (list (cons 0 "TEXT")
                 (cons 10  pt)
                 (cons 40 hgt)
                 (cons 1  str))))

;; A Z for annotate z-value
(defun c:az ( / pt1)
 (setq pt1 (osnap (getpoint "\nSelect an endpoint: ") "_end,_int"))
 (Text pt1 2.5  (rtos (nth 2 pt1) 2  )
 (princ)
)

Edited by Emmanuel Delay
Link to comment
Share on other sites

Hey,

 

I need a autolisp like following: i have 3d points in my drawing and i need autolisp that puting z value text beside 3d points!

 

Br,

Margus

Link to comment
Share on other sites

Oh yes, Points.

Select all okay?

COMMAND: AZP (for Annotate Z Points)

 

;; Lee Mac, @see http://www.cadtutor.net/forum/showthread.php?44768-Entmake-Functions
(defun Text (pt hgt str)
 (entmakex (list (cons 0 "TEXT")
                 (cons 10  pt)
                 (cons 40 hgt)
                 (cons 1  str))))

(defun c:azp ( / pt1 i ss)
 (setq ss (ssget "_X" '((0 . "POINT"))))
 (setq i 0)
 (repeat (sslength ss)
   (setq pt1 (cdr (assoc 10 (entget (ssname ss i))))  )
   (Text pt1 2.5  (rtos (nth 2 pt1) 2  ) 
   (setq i (+ i 1))
 )
 (princ)
)  

Link to comment
Share on other sites

  • 9 months later...

where you find a 8 in this part ?

 

(Text pt1 2.5  (rtos (nth 2 pt1) 2  ) 

 

got this error when i use this :

 

Error: unexpected EOF
Error: incorrect type - nil

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