Places the engineering environment into a "Waiting for User Selections State" and script is on hold until the user has made the selections and committed them.

An object is returned that describes the selections.

Parameters

Types (string) - a comma delimited list of the types of selectable objects the user can pick. The full list is below.

MinNoSelections (integer) - the limit of the minimum number of selections the user needs to set. -1 represents any number allowed (including zero). An error is raised when the user does nto select the minimum number of selections to prevent script from continuing.

MaxNoSelections (integer) - the limit of items the user can select. -1 represents any number of selections.

Return Value

A "Selections" object (documented under the CAD object).

Due to the complex nature of the returned data a custom object holds the results and allows for actions to be performed.

Remarks

The list of allowed types are as follows (from PTC documentation)

Items in Bold are the Strings to use.

Creo Parametric Database ItemString IdentifierPTC Model Item Type
Datum pointpointEpfcITEM_POINT
Datum axisaxisEpfcITEM_AXIS
Datum planedatumEpfcITEM_SURFACE
Coordinate system datumcsysEpfcITEM_COORD_SYS
FeaturefeatureEpfcITEM_FEATURE
Edge (solid or datum surface)edgeEpfcITEM_EDGE
Edge (solid only)sldedgeEpfcITEM_EDGE
Edge (datum surface only)qltedgeEpfcITEM_EDGE
Datum curvecurveEpfcITEM_CURVE
Composite curvecomp_crvEpfcITEM_CURVE
Surface (solid or quilt)surfaceEpfcITEM_SURFACE
Surface (solid)sldfaceEpfcITEM_SURFACE
Surface (datum surface)qltfaceEpfcITEM_SURFACE
QuiltdtmqltEpfcITEM_QUILT
DimensiondimensionEpfcITEM_DIMENSION
Reference dimensionref_dimEpfcITEM_REF_DIMENSION
Integer parameteriparEpfcITEM_DIMENSION
PartpartN/A
Part or subassemblyprt_or_asmN/A
Assembly component modelcomponentN/A
Component or featuremembfeatEpfcITEM_FEATURE
Detail symboldtl_symbolEpfcITEM_DTL_SYM_INSTANCE
Noteany_noteEpfcITEM_NOTE, EpfcITEM_DTL_NOTE
Draft entitydraft_entEpfcITEM_DTL_ENTITY
Tabledwg_tableEpfcITEM_TABLE
Table celltable_cellEpfcITEM_TABLE
Drawing viewdwg_viewN/A

Examples

Get a selection of exactly 2 Edges or Surfaces

Dim Sels as Selections = CAD.PromptForSelections("edge,surface", 2, 2)