I have multiple "Selection Boxes" in my custom UI.
I am able to save selections ( Faces ) from these boxes to a macro feature object and read back.
After reading back, I get a "selection" collection by using "GetSelections" of MacroFeatureData.
After that I loop through this list / collection and add the selected entity to respective SelectionBox
with below sequence inside the loop
1) Check entity "mark" ( Mark array is also saved and read back from macro feature )
2) Use SelectionBox "SetSelectionFocus()" to set focus to respective SelectionBox with same mark.
3) Use Entity.Select4(true,dt) to add this saved entity to focused SelectionBox.
This works okay, except that, if the Entities are many, above looping creates a flickering effect.
So is there a way, to add the entire collection of Entities to focused SelectionBox directly to avoid flickering ?
2012 SOLIDWORKS API Help - Select Multiple Objects for Selection Boxes Example (C#)
Above example helped.
I just had to create a local Entity to store the object's read from macro feature object data, before giving it to "MultiSelect2 "
Retrieving data ...