Programmatic Selection
The VB API provides methods whereby you can make your own Selection objects, without prompting the user. These Selections are required as inputs to some methods and can also be used to highlight certain objects on the screen.
Methods and Properties Introduced:
The method
CMpfcSelect.CreateModelItemSelection() creates a selection out of any model item object. It takes a
IpfcModelItem and optionally a
IpfcComponentPath object to identify which component in an assembly the Selection Object belongs to.
The method
CMpfcSelect.CreateComponentSelection() creates a selection out of any component in an assembly. It takes a
IpfcComponentPath object. For more information about
IpfcComponentPath objects, see the section
Getting a Solid Object in the
Solid section.
Use the method
CMpfcSelect.CreateModelSelection() to create a
IpfcSelection object, based on a
IpfcModel object.
Some VB API properties require more information to be set in the selection object. The methods allow you to set the following:
The selected item using the method
IpfcSelection.SelItem.
The selected table cell using the method
IpfcSelection.SelTableCell.
The selected drawing view using the method
IpfcSelection.SelView2D.