masterfal Posted March 20, 2020 Posted March 20, 2020 Hi All, I have a routine to change styles on various objects but was wondering how to tweak it so it runs only on selected objects as opposed to globally? (defun c:Changestyle (/ style sset ename i) (vl-load-com) (while (not (and (setq style (getstring "\nEnter the style name: ")) (tblsearch "style" style) ) ) (princ (strcat "\nThe style '" style '" do not exist.")) ) (setq i 0) (setq sset (ssget "X" '((-4 . "<OR") (0 . "MTEXT") (0 . "TEXT") (0 . "attdef") (0 . "dimension") (0 . "leader") (0 . "multileader") (-4 . "OR>")))) (if sset (repeat (sslength sset) (setq ename (ssname sset i)) (setq i (1+ i)) (vla-put-stylename (vlax-ename->vla-object ename) style) ) ) (setq sset nil) ) Quote
dlanorh Posted March 20, 2020 Posted March 20, 2020 Try removing "X" from the SSGET (ssget '((-4 . "<OR") (0 . "MTEXT") (0 . "TEXT") (0 . "attdef") (0 . "dimension") (0 . "leader") (0 . "multileader") (-4 . "OR>")))) 1 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.