+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Junior Member
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Oct 2017
    Posts
    17

    Default Autolisp to annotate 3d point z value

    Registered forum members do not see this ad.

    Hei,

    Can enyone make autolisp to annotate 3d point z value!

    Best,
    MRe

  2. #2
    Full Member
    Using
    AutoCAD 2014
    Join Date
    Dec 2010
    Posts
    81

    Default

    Please be a bit more specific.

    ----
    EDIT: do you mean something like this?

    Code:
    ;; 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 8) )
      (princ)
    )
    Last edited by Emmanuel Delay; 13th Jun 2018 at 02:27 pm.

  3. #3
    Junior Member
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Oct 2017
    Posts
    17

    Default

    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

  4. #4
    Full Member
    Using
    AutoCAD 2014
    Join Date
    Dec 2010
    Posts
    81

    Default

    Oh yes, Points.
    Select all okay?
    COMMAND: AZP (for Annotate Z Points)

    Code:
    ;; 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 8) ) 
        (setq i (+ i 1))
      )
      (princ)
    )

  5. #5
    Junior Member
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Oct 2017
    Posts
    17

    Default

    I need only 3 decimal places!

    Thanks!

  6. #6
    Full Member
    Using
    AutoCAD 2014
    Join Date
    Dec 2010
    Posts
    81

    Default

    Registered forum members do not see this ad.

    Code:
    (Text pt1 2.5  (rtos (nth 2 pt1) 2 8) )
    Change the 8 into a 3

Similar Threads

  1. How do you annotate like this?
    By murshed2010 in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 6
    Last Post: 26th Jan 2018, 01:14 pm
  2. annotate one point
    By maksolino in forum Rhino
    Replies: 5
    Last Post: 17th May 2012, 01:54 pm
  3. 3D Annotate
    By Merk1b2 in forum AutoCAD General
    Replies: 4
    Last Post: 1st Jun 2011, 11:00 pm
  4. Annotate
    By c.roberts in forum AutoCAD Beginners' Area
    Replies: 13
    Last Post: 25th Mar 2009, 02:19 pm
  5. annotate (sp) help
    By mikemilburn in forum AutoCAD Beginners' Area
    Replies: 1
    Last Post: 26th Feb 2006, 03:13 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts