• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

selection of a text string

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I would like to write about the code that can select a text string present in the autocad display by selecting another text string.
I'll explain.
- select through (entsel) a string (text1) that contains its own coordinates.
- next to this string there is another (text2) of which I know the coordinates relative to the first.
- calculate the absolute coordinates of start of text2 through the coordinates present in text1. (1450000,5450000)
How can I extract text2 content?
Thank you.
 
(setq pt1 (cdr (assoc '10 (entget))))) ;; get the insertion point of the selected text

do your calculations on the point where the other string comes from pt1 and let's say you put it in pt2- pt2 must be a list that respects the format of pt1
(setq string (cdr (assoc '1))) ;; i.e. select the object in pt2, get its name, take the entity, browse group 1 - which contains the string, give me only the value without group code, assign it to string
you will have in the variable String the content of the second text
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top