MudawarCad Posted September 1, 2019 Share Posted September 1, 2019 Dear all, I'm looking for a simple lisp (probably vlisp) routine that can select all leaders of the same type (e.g dot). In other words, i only want to select the dot leaders of all my leaders in the drawing file. Should look something like this: (ssget "x" ("leader")) and ('leadertype 3) Thanks Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 3, 2019 Share Posted September 3, 2019 Do you mean leader style dot? (setq ss (ssget "x" (list (cons 0 "leader")(cons 3 "Dot")))) Quote Link to comment Share on other sites More sharing options...
MudawarCad Posted September 3, 2019 Author Share Posted September 3, 2019 13 hours ago, BIGAL said: Do you mean leader style dot? (setq ss (ssget "x" (list (cons 0 "leader")(cons 3 "Dot")))) I tried this, it gave me nil. If you can make what you have written work, I would definitely use it. Thanks for trying. I tried another method and it worked: (vl-load-com) (defun c:ABC () (setq myss (ssget "x" '((0 . "LEADER")))) (setq myssArrow (ssadd)) (setq myssDot (ssadd)) (vlax-for object (setq ActiveSelSet (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-Acad-Object)))) (setq myArrowType (vlax-get-property object 'arrowheadtype)) (if (eq myArrowType 0) (progn (princ "ARROW") (vlax-put-property object 'ArrowHeadSize 1.25) (setq myssArrow (ssadd (vlax-vla-object->ename object) myssArrow)) ) ) (if (eq myArrowType 3) (progn (princ "DOT") (vlax-put-property object 'ArrowHeadSize 0.6) (setq myssDot (ssadd (vlax-vla-object->ename object) myssDot)) ) ) );vlax-for (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 4, 2019 Share Posted September 4, 2019 (edited) Maybe a bit simpler. ; arrow closed fill is 0 Dot is 3 look at properties and count or run dumpit.lsp pick leader (defun test ( / myss obj ahead) (setq myss (ssget "x" '((0 . "LEADER")))) (repeat (setq x (sslength myss)) (setq obj (vlax-ename->vla-object (ssname myss (setq x (1- x))))) (setq ahead (vla-get-arrowheadtype obj)) (cond ((= ahead 3)(vla-put-arrowheadsize obj 1.25)) ((= ahead 0)(vla-put-arrowheadsize obj 0.6)) ) ) ) (test) Edited September 4, 2019 by BIGAL 1 Quote Link to comment Share on other sites More sharing options...
MudawarCad Posted September 4, 2019 Author Share Posted September 4, 2019 7 hours ago, BIGAL said: Maybe a bit simpler. ; arrow closed fill is 0 Dot is 3 look at properties and count or run dumpit.lsp pick leader (defun test ( / myss obj ahead) (setq myss (ssget "x" '((0 . "LEADER")))) (repeat (setq x (sslength myss)) (setq obj (vlax-ename->vla-object (ssname myss (setq x (1- x))))) (setq ahead (vla-get-arrowheadtype obj)) (cond ((= ahead 3)(vla-put-arrowheadsize obj 1.25)) ((= ahead 0)(vla-put-arrowheadsize obj 0.6)) ) ) ) (test) Works well. Thanks, I appreciate the help. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 5, 2019 Share Posted September 5, 2019 Happy to help 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.