Hi there,
I hope you are well.
I am wondering if there is a way via API to select selection/search set when applying Selection A and Selection B on ClashTest?
At the minute what I do is the following (python).
# allsetinfolder are all the set I have in the nwf, below I am getting the first and the second as an example #
f = allsetinfolder[0].GetSelectedItems() s = allsetinfolder[1].GetSelectedItems() ######################### clash ######################## doclash = doc.Clash alltd = doclash.TestsData ftest = alltd.Tests[0] copy = ftest.CreateCopy() copy.SelectionA.Selection.CopyFrom(f) copy.SelectionB.Selection.CopyFrom(s)
# When I do the above as I am using GetSelectedItem, I am doing an ModelItem Collection #
So it is display like:
Which is correct, it is taking all the walls and Doors.
However what I am after is to be displayed by Selection Set as:
Thank you very much in advance
I am trying to figure out the same... Also no luck for the moment. A little bit sad, but i am considering to first make an xml for the clashtests and import that. Like that it is possible.
var sourceCollectionA = new SelectionSourceCollection();
var sourceCollectionB = new SelectionSourceCollection();
foreach (var savedItem in doc.SelectionSets.Value)
{
foreach (var selectionSet in GetSelectionSets(savedItem, group1.SearchSets.ToList()))
{
sourceCollectionA.Add(doc.SelectionSets.CreateSelectionSource(selectionSet));
}
foreach (var selectionSet in GetSelectionSets(savedItem, group2.SearchSets.ToList()))
{
sourceCollectionB.Add(doc.SelectionSets.CreateSelectionSource(selectionSet));
}
}
clashTest.SelectionA.Selection.CopyFrom(sourceCollectionA);
clashTest.SelectionB.Selection.CopyFrom(sourceCollectionB);
This method is not from the API and is not important for the question. The method returns sets of search queries
Can't find what you're looking for? Ask the community or share your knowledge.