Jump to content

Converting 2D text to 3D point?


CSTAM

Recommended Posts

Presume that the text entities are bearing the coordinates of the desired 3D points – this can be done with an AutoLISP routine.

Should post an example with the coordinates formatting.

 

Also may help to ask a moderator to move your port in AutoLISP, VBA, the CUI & Customisation section.

 

Regards,

Link to comment
Share on other sites

9d36f7a2a8aa.gif

(defun C:Convert_Text_to_Point (/ ss Z_value temp koord)
 (if (setq ss (ssget "_:L" '((0 . "Text"))))
   (progn
     (initget "Koord Value")
     (setq
Z_value	(getkword "\nTake Z from [Koord/Value]? <Value>:")
Z_value	(if Z_value
	  Z_value
	  "Value"
	)
ss	(vl-remove-if-not
	  '(lambda (x) (= (type x) 'ENAME))
	  (mapcar 'cadr (ssnamex ss))
	)
     )
     (foreach item ss
(setq temp  (entget item)
      koord (cdr (assoc 10 temp))
      koord (if	(eq Z_value "Value")
	      (list (car koord)
		    (cadr koord)
		    (atof (cdr (assoc 1 temp)))
	      )
	      koord
	    )
)
(entdel item)
(entmakex
  (list
    '(0 . "POINT")
    (cons 10 koord)
  )
)
     )
   )
 )
)

Link to comment
Share on other sites

After doing this as you now have a 3dpoint you can build a surface model and contour etc.

 

Only caution is that the points are generally based on the text insertion point.

Link to comment
Share on other sites

  • 4 years later...

hi pong

Do you have available lisp that can convert points into text?

 

welcome cadtutor here

There are many similar threads here, but if you could make it clear which Lisp suit you:

text in numbering? XY coordinates? or elevations? make new points or select points etc..

fish or fishing? :)

 

thanx @BIGAL link very helpful by Lee Mac

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