Jump to content

Placing text


YoyoGraphics

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

 

Anway here is one soloution

; 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
)

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