Use multiple pre existing search sets in a specific folderitem in my document to create a selection that could be used in creating a clash test

Use multiple pre existing search sets in a specific folderitem in my document to create a selection that could be used in creating a clash test

WalidGLVEK
Explorer Explorer
380 Views
2 Replies
Message 1 of 3

Use multiple pre existing search sets in a specific folderitem in my document to create a selection that could be used in creating a clash test

WalidGLVEK
Explorer
Explorer

Hi All, 

 

I have been trying for ages to make use of pre-made searchsets I have in my document in making a selection that could be used in a clash test selection A for example. 

 

I Also need to be able to select all elements using these search sets and make them their own selection which I could in theory use for clash test selection A or to do basically anything else with. 

 

I have Multiple folders which contain multiple search sets. How do I go about do the above please? I have search online and through the API documentation and I cannot find anything helpful. Any help would be greatly appreciated. 

 

Kind regards, 

Walid

0 Likes
381 Views
2 Replies
Replies (2)
Message 2 of 3

alexisDVJML
Collaborator
Collaborator

I'm not sure I understand what you want to achieve?
So you already get Searches defined and saved as Sets in folders, like below?

alexisDVJML_0-1678474591997.png

 

Note that when you click on any of these searches, it selects the related items.
And if you click on a folder, it actually selects the combination of all these searches.
Than you can just create a new Set as explicit instead of a Search.

Now from a API standpoint, you can access the Sets tree for a specific document document.DocumentSelectionSets, recursively explore it starting from RootItem and for each SaveItem that is a SelectionSet get the related Items using GetSelectedItems(Document).

 

Hope that helps you start...

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes
Message 3 of 3

WalidGLVEK
Explorer
Explorer

Hi Alexis, 

 

Thank you for your reply.

 

I have search sets as you describe below. What I am trying to do is actually get them as SelectionA for a clash test that I want to create through the API. I have noticed based on some research that I have done that this cannot be done. Therefore, my solution is to create a modelitemcollection using these search sets that I have and then use that modelitemcollection as Selection A. I have now completed this exercise but it would be great if you know of way to use the search sets instead of the model item collection for SelectionA. 

 

Kind regards, 

Walid 

0 Likes