Message 1 of 4
`LISP MODIFICATION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lisp that add prefix and suffix to existing text but the problem is adding prefix in the same line i want to add prefix as a diffrent line..see the sample drawing
lisp code
;prefix and suffix selected Texts
;(C) CAD Studio - www.cadstudio.cz
;
(defun C:PSfixTxt (/ ss ssl obj sPrefix sSuffix)
(vl-load-com)
(princ "\nSelect Texts, Mtexts, MLeaders: ")
(setq ss (ssget '((0 . "TEXT,MTEXT,MULTILEADER")))
sPrefix (getstring "\nEnter prefix: " T)
sSuffix (getstring "\nEnter suffix: " T)
)
(setq ssl (sslength ss))
(repeat ssl
(setq ssl (1- ssl))
(setq obj (vlax-ename->vla-object (ssname ss ssl)))
(vla-put-textstring obj (strcat sPrefix (vla-get-textstring obj) sSuffix))
)
(prin1)
)