+ Reply to Thread
Results 1 to 3 of 3

Thread: Placing text

  1. #1
    Forum Newbie
    Using
    AutoCAD 2009
    Join Date
    Jul 2009
    Posts
    1

    Default Placing text

    Registered forum members do not see this ad.

    Greetings,

    I have a 2D site plan with hundreds of elevation numbers (text elements) scattered all around it. What I want to do is run a script that will read what those bits of text say (like "1173.08", etc.) and paste that value into the Z position of the text element, so that the number actually is what it says it is.

    Is there an AutoLisp routine that can do this?

    Thanks!

    -Geoff

  2. #2
    Senior Member JoeC's Avatar
    Using
    AutoCAD LT 2011
    Join Date
    Aug 2008
    Location
    Georgia, USA
    Posts
    180

    Default

    I don't know about a LISP, but I often recommend the EATTEXT command. It will capture the text and its coordinates exportable to excel.

    Does this help?

  3. #3
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,780

    Default

    Registered forum members do not see this ad.

    Search here its under co-ord pts couple of different lisp routines to do exactly what you want

    Anway here is one soloution
    Code:
    ; converts text to a point with xyz 
    ; z value equal to text
    ; by Alan H Nov 99
    
    (while (not (setq ss (ssget))))     
    (command "layer" "new" "txthts" "")
    (setvar "clayer" "txthts")
    (setvar "pdsize" 3)
    (setvar "pdmode" 35)
    (while (setq en (ssname ss 0))
         ; Entity type
         (setq entyp (cdr (assoc 0 (entget en)))) 
        (if (= entyp "TEXT")
        (progn
        (setq xyz (cdr (assoc 10 (entget en))))
        (setq txtht (cdr (assoc 1 (entget en))))
        (setq txtz (atof txtht))
        (setq ptxyz (list (car xyz)(cadr xyz) txtz))
        (command "point" ptxyz)
        )                         
        )                              
        ; Delete each measured entity from set
        (ssdel en ss)
    ;end while
    )
    Last edited by BIGAL; 14th Jul 2009 at 03:54 am.

Similar Threads

  1. Placing text on a solid
    By pauledward in forum AutoCAD 3D Modelling & Rendering
    Replies: 4
    Last Post: 12th Nov 2009, 02:43 pm
  2. Placing text above a line at set distance
    By richard3009 in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 22nd May 2009, 11:57 am
  3. Placing text acurately
    By richard3009 in forum AutoCAD Beginners' Area
    Replies: 13
    Last Post: 21st May 2009, 05:54 pm
  4. Placing Dimensions
    By zetnie in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 4
    Last Post: 7th Mar 2008, 05:06 am
  5. question about placing numbered text
    By ledesmaf71 in forum AutoCAD General
    Replies: 14
    Last Post: 29th Jan 2007, 12:18 am

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