User's Guide > Selection > Selection
Selection
This section describes how to use Interactive Selection in Creo.JS.
Interactive Selection
Methods and Properties Introduced:
The method pfcBaseSession.Select() activates the standard Creo Parametric menu structure for selecting objects and returns a pfcSelections array that contains the objects the user selected. Using the Options argument, you can control the type of object that can be selected and the maximum number of selections.
In addition, you can pass in a pfcSelections sequence to the method. The returned pfcSelections sequence contains the input array and any new objects.
The method pfcSelectionOptions.Create() and the property pfcSelectionOptions.OptionKeywords take a String argument made up of one or more of the identifiers listed in the table below, separated by commas.
For example, to allow the selection of features and axes, the arguments are feature, axis.
Creo Parametric Database Item
String Identifier
ModelItemType
Datum point
point
ITEM_POINT
Datum axis
axis
ITEM_AXIS
Datum plane
datum
ITEM_SURFACE
Coordinate system datum
csys
ITEM_COORD_SYS
Feature
feature
ITEM_FEATURE
Edge (solid or datum surface)
edge
ITEM_EDGE
Edge (solid only)
sldedge
ITEM_EDGE
Edge (datum surface only)
qltedge
ITEM_EDGE
Datum curve
curve
ITEM_CURVE
Composite curve
comp_crv
ITEM_CURVE
Surface (solid or quilt)
surface
ITEM_SURFACE
Surface (solid)
sldface
ITEM_SURFACE
Surface (datum surface)
qltface
ITEM_SURFACE
Quilt
dtmqlt
ITEM_QUILT
Dimension
dimension
ITEM_DIMENSION
Reference dimension
ref_dim
ITEM_REF_DIMENSION
Integer parameter
ipar
ITEM_DIMENSION
Part
part
N/A
Part or subassembly
prt_or_asm
N/A
Assembly component model
component
N/A
Component or feature
membfeat
ITEM_FEATURE
Detail symbol
dtl_symbol
ITEM_DTL_SYM_INSTANCE
Note
any_note
ITEM_NOTE, ITEM_DTL_NOTE
Draft entity
draft_ent
ITEM_DTL_ENTITY
Table
dwg_table
ITEM_TABLE
Table cell
table_cell
ITEM_TABLE
Drawing view
dwg_view
N/A
Solid body
3d_body
ITEM_BODY
Datum Curve End
curve_end
ITEM_CRV_START or ITEM_CRV_END
When you specify the maximum number of selections, the argument to pfcSelectionOptions.MaxNumSels() must be an Integer.
The default value assigned when creating a pfcSelectionOptions object is –1, which allows any number of selections by the user.
Was this helpful?