Margusrebase Posted June 13, 2018 Share Posted June 13, 2018 Hei, Can enyone make autolisp to annotate 3d point z value! Best, MRe Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted June 13, 2018 Share Posted June 13, 2018 (edited) 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 June 13, 2018 by Emmanuel Delay Quote Link to comment Share on other sites More sharing options...
Margusrebase Posted June 14, 2018 Author Share Posted June 14, 2018 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 Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted June 14, 2018 Share Posted June 14, 2018 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) ) Quote Link to comment Share on other sites More sharing options...
Margusrebase Posted June 14, 2018 Author Share Posted June 14, 2018 I need only 3 decimal places! Thanks! Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted June 14, 2018 Share Posted June 14, 2018 (Text pt1 2.5 (rtos (nth 2 pt1) 2 ) Change the 8 into a 3 Quote Link to comment Share on other sites More sharing options...
Fredricc Posted March 22, 2019 Share Posted March 22, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.