Bikey_4 Posted June 20, 2015 Share Posted June 20, 2015 There are many objects in a drawing, some of them have 1/30 annotative scale, some at 1/40 and some have both, for example. Is there anyway of selecting objects which have the scale of 1/30? Quote Link to comment Share on other sites More sharing options...
Commandobill Posted June 20, 2015 Share Posted June 20, 2015 This will return a list of all the annotation scales objects are on in your drawing, I'm sure you could tweak it for your purposes. ;; Argument: an ename or vla-object. ;; Return T if object is annotative, otherwise nil. ;;Joe Burke (defun IsAnnotative (e) (if (not (eq (type e) 'ENAME)) (setq e (vlax-vla-object->ename e)) ) (if (assoc -3 (entget e '("AcadAnnotative"))) T) ) (defun annoscale (e) (if (and (not (eq (type e) 'ENAME)) (eq (type e) 'VLA-OBJECT)) (setq e (vlax-vla-object->ename e)) ) (if (IsAnnotative e) (setq annoscale (cdr (assoc 300 (entget (cdr (assoc 340 (entget (cdr (assoc 350 (entget (cdr (assoc 350 (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget e))))))))))))))))))) nil ) ) (defun c:annotativeobjs ( / ) (setq objSS (mapcar 'cadr (ssnamex (ssget "x")))) (setq annoobjs (vl-remove-if-not 'IsAnnotative objss)) (if annoobjs (mapcar 'annoscale annoobjs)) ) Quote Link to comment Share on other sites More sharing options...
Commandobill Posted June 20, 2015 Share Posted June 20, 2015 The "IsAnnotative" function is by Joe burke, I wrote up the rest, kind of hastily. Quote Link to comment Share on other sites More sharing options...
Bikey_4 Posted June 20, 2015 Author Share Posted June 20, 2015 Thank you and Joe for your help, my problem have been solved Quote Link to comment Share on other sites More sharing options...
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.