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

lisp to copy a text on another text

  • Thread starter Thread starter Dario1982
  • Start date Start date

Dario1982

Guest
Hello everyone.. a few years ago I worked in an engineering company where there was loaded a fantastic lisp: allowed to copy the contents of a text on another text, without having to make paste copy. .practically a "adopt property" in which instead of color, layer etc., the source object transferred the text content to the target object. Now I'd be really comfortable, does anyone know how I can do to find a lisp like that? Thank you!
 
Good idea!
I wrote this to you. It should work. you can also select the text of a quota.
Code:
;
;; copy the selected text within another
;; d.i. 23/10/2014
; ;
(vl-load-com)
(defunct c:cot (/ t1 t2 txt1 txt2)
(f)
(and (setq t1(nentsel"\nselect text to be copied)))
(setq t2(nentsel"\nselect target text"))
)
(progn)
(setq txt1(vla-get-textstring (vlax-ename->vla-object(car t1)))))
(setq txt2(vla-get-textstring (vlax-ename->vla-object(car t2))))))
(vla-put-textstring (vlax-ename->vla-object(car t2)) (strcat txt2 " txt1))
)

)
)
 
I'm flying too. .
Unlike the domenic lisp does not add, but replaces the target text.

Yeah, good idea. :smile:
 

Attachments

..... there is also my copytxt.lsp that works on text (text) - mtext (multiline text) and quotas.
 

Attachments

thinking that it can be useful to someone, I brought together the 2 lisp of ieva and gp in one file, with small tricks, reporting the paternity of the routines.
I hope you don't mind.
View attachment TXTMOD.lspeven if for these functions I use ctx of mac lee and ttc of asmitools
 

Forum statistics

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

Members online

No members online now.
Back
Top