Can you access saved selections via revit api?

Can you access saved selections via revit api?

DanielKP2Z9V
Advocate Advocate
319 Views
4 Replies
Message 1 of 5

Can you access saved selections via revit api?

DanielKP2Z9V
Advocate
Advocate

I don't like how Edit Selction dialog won't let you delete multiple "saved selections" in one go and I wanted to create a custom dialog that would, but can't find a way to access saved selections via revit api - is this possible? Saved selections may be known as "selection filters" perhaps?

DanielKP2Z9V_0-1738708524859.png


Please tell me if it's not possible - I will create a Revit Idea then so devs can ignore it further.

 

I taunted the deepseek demons to solve it, but to no avail.

0 Likes
Accepted solutions (1)
320 Views
4 Replies
Replies (4)
Message 2 of 5

DanielKP2Z9V
Advocate
Advocate
Accepted solution

ok, claude AI has done it: https://0x0.st/8KYO.bin looks like it's called "SelectionFilterElement"

just as I was about to give up...

Message 3 of 5

jeremy_tammik
Alumni
Alumni

Thank you Daniel for a very nice interesting item and good research. I was previously not aware of the SelectionFilterElement. The sample code in the method documentation is interesting as well. Looking forward to seeing how you are going to use this. Cheers.

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 4 of 5

DanielKP2Z9V
Advocate
Advocate

thank you Jeremy, please see demo below (copy) - I believe it's useful because I couldn't delete multiple saved selections in the default revit dialog in one go, which was slowing me down when creating 8-10 temporary saved selections for a particular task that you wanted to dispose of immediately after

 

 



0 Likes
Message 5 of 5

DanielKP2Z9V
Advocate
Advocate

by the way I'm still working on a collection of such helper scripts, hopefully will finish writing documentation soon...

0 Likes