ProSelection Function Examples
Examples of Creo TOOLKIT functions that use ProSelection are as follows:
• ProSelect() uses
ProSelection as its output to describe everything about the selected item.
• ProGeomitemDistanceEval() uses
ProSelection as its input, instead of
ProGeomitem, so it can measure the distance between model items in different subassemblies.
• ProFeatureCreate() usually uses
ProSelection objects to identify the geometry items the feature needs to reference.
• ProDrawingDimensionCreate() uses
ProSelection objects to identify the entities the dimension will attach to and the drawing view in which the dimension is to be displayed.
In a case such as
ProGeomitemDistanceEval(), which uses
ProSelection as an input, you might need to build a
ProSelection object out of its component data items. The function
ProSelectionAlloc() allocates a new
ProSelection structure, and sets the
ProAsmcomppath and
ProModelitem data in it. The function
ProSelectionSet() sets that information in a
ProSelection object that already exists. The function
ProSelectionVerify() checks to make sure the contents of a
ProSelection are consistent.
The function
ProSelectionCopy() copies one
ProSelection object to another.
ProSelectionFree() frees the memory of a
ProSelection created by
ProSelectionAlloc() or as output by a
Creo TOOLKIT function.