TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on October 05, 2015, 01:26:30 PM
-
Hello guys,
Is it possible to make a filter with the ssget function to select Mleaders by their style name ?
Thanks .
-
Yup, here are some possibilities
http://www.cadtutor.net/forum/showthread.php?84527-Filter-By-Multileader-Style&s=7a19272003ece8164cedfeaf24ab0af9
-
Thank you Chris.
All these example in that thread is about iterating through a selection and not by a filter as far as I understood them.
I have searched in many codes on the web and none on them for a filter with ssget function and that maybe not possible .
Thank you.
-
You cannot directly filter by style name.
-
This works in BricsCAD:
(defun c:test
( / enme ss style
) -1
style
)
)
)
)
)
-
That does not work in AutoCAD. :|
-
Thank you guys for your help.
roy , your codes allow me to select Mleaders but it does differentiate between Mleaders' style names which means that it selects all Mleaders regardless of their style name.
-
Sad to hear that.
I actually did check the AC docs, but I obviously misread this:
The ssget function recognizes all group codes except entity names (group -1), handles (group 5), and xdata codes (groups greater than 1000).
The text would be clearer without '(group -1)'.
-
Maybe there is another way to do what you are attempting. Is the end goal to simply automagically select mleaders with StyleA (With StyleA being predefined) or are you selecting an mleader, grabbing the style and THEN selecting all the mleaders with that style?
-
Maybe there is another way to do what you are attempting. Is the end goal to simply automagically select mleaders with StyleA (With StyleA being predefined) or are you selecting an mleader, grabbing the style and THEN selecting all the mleaders with that style?
I was attempting to select only a specific Mleaders with ssget function only.
example:
(ssget '((0 . "MULTILEADER") (FILTER ONLY A SPECIFIC MLEADER STYLE NAME)))
-
ssget is rather vauge. I was referencing the selection method you were going to use.
http://www.lee-mac.com/ssget.html
If you can use VisualLisp functions,
(defun mleadersel
( style
/ ent mldrs ss1 sscnt
) )
)
)
)
)
http://www.cadtutor.net/forum/showthread.php?84527-Filter-By-Multileader-Style&p=579551&viewfull=1#post579551