PM_PICK_EDITABLE_OBJECT

Syntax

handle_val = PM_PICK_EDITABLE_OBJECT ( prompt, obsolete[, help_id][, obj_type1, obj_type2, …, obj_typeN] );
Input arguments
string prompt The prompt shown to the user.
Optional input arguments
int help_id The ID of the help topic to open if the user presses the H key during the pick action.
string obj_type1, obj_type2, …, obj_typeN The pickable object types.
Output arguments
int obsolete This argument is obsolete. The argument must be given, but its value is ignored.

Return Values

Success:
handle handle_val Handle of the picked object.
Failure:
int 0 User canceled the operation or nothing was selected.

Description

This function starts the Plant Modeller pick action and returns the handle of the object or group that the user selected. Only an object or group that the user has permission to modify can be selected. The handle can then be used, for example, to assign attributes to the object. The pick action can be limited to specific object types with optional input arguments.

All supported object types:

  • "3DSPACE"

  • "AIRDUCT" (obsolete, use HVACPART)

  • "ATTRIBUTE"

  • "BEAM"

  • "CABLE"

  • "CABLENETWORKPART"

  • "CABLETRAY"

  • "EQUIPMENT"

  • "GROUP"

  • "HOLEREQUEST"

  • "HULLCONSTRUCTIONPART"

  • "HVACPART"

  • "PIPE" (obsolete, use PIPINGPART)

  • "PIPINGPART"

  • "STANDCMP"

  • "STRUCTCMP"

  • "TEMPGEOM"

  • "WELD"

Examples

Only allow picking an object whose type is "EQUIPMENT" or "PIPINGPART":

obj_h = PM_PICK_EDITABLE_OBJECT("Pick the object", obsolete, "EQUIPMENT", "PIPINGPART");

Only allow picking an object whose type is not "EQUIPMENT" or "PIPINGPART":

obj_h = PM_PICK_EDITABLE_OBJECT("Pick the object", obsolete, "!", "EQUIPMENT", "PIPINGPART");

Related topics

PM_PICK_OBJECT