akgbmb Posted August 12, 2020 Posted August 12, 2020 Dear I am looking for suitable lisp for selected text property change as below (1) text size change into current text height (2) text style change into current text style select texts are may be single line text or mtext pls support Quote
dlanorh Posted August 12, 2020 Posted August 12, 2020 Try this (defun c:t2c (/ ss sty tht cnt obj) (setq ss (ssget ":L" '((0 . "*TEXT")))) (cond (ss (setq sty (getvar 'textstyle) tht (getvar 'textsize)) (repeat (setq cnt (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq cnt (1- cnt))))) (mapcar '(lambda (x y) (vlax-put obj x y)) (list 'stylename 'height) (list sty tht)) );end_repeat ) );end_cond (princ) );end_defun This will not override any formatted mtext and will use the current textstyle and textsize as defined by the system variables of the same name. 1 Quote
akgbmb Posted August 12, 2020 Author Posted August 12, 2020 Thank you sir............ its working & useful Quote
Recommended Posts
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.