So, we are building a Selection Tree in our own .NET application using the API. The question is what options are available for storing the selections?
Currently we are investigating the use of Quantification functionality in Simulate 2015 to define a Selection category for defining whether the object is in the selection. Is this the only approach?
Thanks
Hi,
So, you wanted to bind the selection to the tree node, right? It depends on how you organize the nodes.
a couple of ways I can think of:
- If an explicit selection, you can bind the selection object (ModelItemCollection) to the Node.Tag directly.
- If it is selection with some conditions, you can attach the condition (e.g. handle=12345, hidden = false) to the attribute of the node. When the node is selected, just build a Search with the condition and find the model items. Or even you can bind a Search object to Node.Tag directly.
- If the node is linking to the SelectionSet, you can attach the name of SelectionSet to the node. When the node is selected, find the corresponding modelitem
All of above are not saved with document. I’d suggest one more way: store the desired hierarchy to the database of document. When the document is opened, read the info from the database, build the node with the info (such as Search condition, or SelectionSet name).