Convert All Text to Field

Convert All Text to Field

neam
Collaborator Collaborator
322 Views
5 Replies
Message 1 of 6

Convert All Text to Field

neam
Collaborator
Collaborator

Hi

Is it possible to change all existing coordinate text content to field position(insertion point of text X,Y,Z)?

 

0 Likes
Accepted solutions (1)
323 Views
5 Replies
Replies (5)
Message 2 of 6

pbejse
Mentor
Mentor
Accepted solution
(defun c:xyz (/ stringUTM vlaObject-UTM objectID-UTM)

  (if (Setq stringUTM (ssget '((0 . "TEXT") (8 . "UTM-TEXT*"))))
    (repeat (setq i (sslength stringUTM))
      (setq vlaObject-UTM
	     (vlax-ename->vla-object
	       (ssname stringUTM (setq i (1- i)))
	     )
      )
      (Setq objectID-UTM (itoa (vla-get-objectid vlaObject-UTM)))
      (vla-put-TextString
	vlaObject-UTM
	(strcat	"%<\\AcObjProp Object(%<\\_ObjId "
		objectID-UTM
		">%).InsertionPoint \\f \"%lu2%pt0\">%"
	)
      )
    )
  )(princ)
)

HTH

Message 3 of 6

neam
Collaborator
Collaborator

Hi dear sir:

Thank you for your attention

0 Likes
Message 4 of 6

pbejse
Mentor
Mentor

Glad it helps

 

Message 5 of 6

Sea-Haven
Mentor
Mentor

After looking at your dwg, I may have a different answer for you, its 3 parts the 1st draws rectangs along say a pline path, the rectangs are at a scale matching a title block viewport. Then layouts are auto made matching the location and angle of each rectang. Ok part 2 is I have draw a grid on a viewport, it takes into account a twist in the viewport angle so end up with text like you have.

SeaHaven_0-1753319940787.png

 

SeaHaven_1-1753320295975.pngSeaHaven_2-1753320332147.png

 

Let me know if want more info.

 

 

Message 6 of 6

neam
Collaborator
Collaborator

Your explanation is exactly correct,

and this is what I do to generate plan and profile sheets with the help of some other Lisp programs.

0 Likes