The Selection Manager enables you to create a new selection and add entities to
it. Both of these tasks can be accomplished either by creating a new object
ISelectionInfo
or by directly using a list of
entities.
To create a new selection using a new object
ISelectionInfo
:
face = ExtAPI.DataModel.GeoData.Bodies[0].Faces[0] selection = selection_manager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) selection.Entities = [face] selection_manager.NewSelection(selection)
To create a new selection using a list of entities:
face = ExtAPI.DataModel.GeoData.Bodies[0].Faces[0] selection_manager.NewSelection([face])
To add entities to the current selection using a new object
ISelectionInfo
:
face = ExtAPI.DataModel.GeoData.Bodies[0].Faces[0] selection = selection_manager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) selection.Entities = [face] selection_manager.AddSelection (selection)
To add entities to the current selection using a list of entities:
face = ExtAPI.DataModel.GeoData.Bodies[0].Faces[0] selection_manager.AddSelection([face])