ssget "_P" and then continue to select more with filter or remove from selection

ssget "_P" and then continue to select more with filter or remove from selection

paullimapa
Mentor Mentor
1,429 Views
10 Replies
Message 1 of 11

ssget "_P" and then continue to select more with filter or remove from selection

paullimapa
Mentor
Mentor

Is there a way to do ssget "_P" and then continue to allow the option to select more adding to selection total set or remove objects from previous selection set with filter list?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Accepted solutions (1)
1,430 Views
10 Replies
Replies (10)
Message 2 of 11

ВeekeeCZ
Consultant
Consultant

Try to search, it was here a few times before.

Just what pops out of my mind...

 

 
(initcommandversion) (command-s "_.select" "_p")
0 Likes
Message 3 of 11

paullimapa
Mentor
Mentor

Thanks for your quick reply. I'm aware of the Select command. What I'm trying to do is include in the ssget function the previous selection set with filters and continue to either select more or/and remove objects ie: (setq ss1 (ssget "P" ' ( (0 . "LINE")))).  This unfortunately, just creates a selection set filtering out LINE objects from the previous set but does not allow me to continue to select more LINE objects or deselect (remove) objects from the now highlited "P" set.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 11

ВeekeeCZ
Consultant
Consultant

Just to clarify, my suggestion does allow you to add/remove objects from the highlighted previous selection.

It does not allow to apply a filter on them.

0 Likes
Message 5 of 11

paullimapa
Mentor
Mentor

Yes, filtering is what's missing from your answer. Thanks again.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 11

hmsilva
Mentor
Mentor
Accepted solution

@paullimapa wrote:

Is there a way to do ssget "_P" and then continue to allow the option to select more adding to selection total set or remove objects from previous selection set with filter list?


Something like this, perhaps

 

 

 

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_P\r")
(setq ss1 (ssget '((0 . "Line"))))

 

 

 

Hope this helps,
Henrique

 

EESignature

Message 7 of 11

paullimapa
Mentor
Mentor

@hmsilva Thank you so much...this is exactly what I was looking for...works beautifully!!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 11

hmsilva
Mentor
Mentor

@paullimapa wrote:

@hmsilva Thank you so much...this is exactly what I was looking for...works beautifully!!!!


You're welcome, Paul
Glad I could help

Henrique

EESignature

0 Likes
Message 9 of 11

devitg
Advisor
Advisor

@hmsilva Henrique , would you please , explain about the 

 

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_P\r")

 

as I can see it send , both the Previous and remove . 

what others applications ?

 

 

 

0 Likes
Message 10 of 11

hmsilva
Mentor
Mentor

@devitg wrote:

@hmsilva Henrique , would you please , explain about the 

 

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_P\r")

 

as I can see it send , both the Previous and remove . 

what others applications ?

 

 

 


Hi Gabriel,

it sends the _P to the command line, the \r is a carriage return (enter)...

 

Henrique

EESignature

Message 11 of 11

ВeekeeCZ
Consultant
Consultant

Nice trick Henrique!

I probably never realized that classic hidden selection options are still available under (ssget). 

 

Command: (ssget)
Select objects: ?
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/Previous/Undo/AUto/SIngle

 This the the P that (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_P\r") selects!