PC-DMIS 2021.2 Object Library
Add Method
See Also  Send Topic Feedback | See Object Hierarchy Chart
Type
Required LONG in the OBTYPE enumeration that denotes what type of object to create.
AutoPosition

Required Boolean that determines what should happen when the new Command object is being inserted in an inappropriate place in the measurement routine.

  • If AutoPosition is FALSE, it will not be inserted at all.
  • If it is TRUE, the new Command will be inserted at the new appropriate position.
PCDLRN ActiveX DLL > Commands Object : Add Method

Glossary Item Box

Description

This method adds a Command.

Syntax

Visual Basic
Public Function Add( _
   ByVal Type As OBTYPE, _
   ByVal AutoPosition As Boolean _
) As Command

Parameters

Type
ValueDescription
ADJUST_FILTER 
ANALYSIS_VIEW 
ANGLE_HIT 
ANYORDER_EXECUTETOL 
ARRAY_INDEX 
ASME_SIZE_COMMAND 
ASME_TOLERANCE_COMMAND 
ASSIGNMENT 
ATTACH_PROGRAM 
AUTO_ANGLE_FEATURE 
AUTO_BLOB 
AUTO_CIRCLE 
AUTO_CONE 
AUTO_CORNER_FEATURE 
AUTO_CYLINDER 
AUTO_EDGE_FEATURE 
AUTO_ELLIPSE 
AUTO_FLUSH_GAP 
AUTO_HIGH_FEATURE 
AUTO_LINE 
AUTO_NOTCH 
AUTO_PLANE 
AUTO_POLYGON 
AUTO_PROFILE_2D 
AUTO_ROUND_SLOT 
AUTO_SET 
AUTO_SPHERE 
AUTO_SQUARE_SLOT 
AUTO_SURFACE_FEATURE 
AUTO_VECTOR_FEATURE 
AUTOCALIB_MASTERSLAVE_COMMAND 
AUTOCALIB_PROBE_COMMAND 
AUTOTRIGGERCOMMAND 
BASIC_HIT 
BASIC_SCAN_OBJECT 
BASIC_SCRIPT 
BF2D_ALIGN 
BF3D_ALIGN 
BFUSER_ALIGN 
BUNDLE_ALIGN 
CALIB_ASSEMBLY 
CALIB_SPHERE 
CALIBRATEROTAB_COMMAND 
CALL_SUBROUTINE 
CASE_COMMAND 
CHECK_DISTANCE 
CLAMP 
CLEARANCE_PLANE 
CNC_PASS_THRU_COMMAND 
CNC_READ_VARIABLE 
CNC_SELECT_TABLE_COMMAND 
CNC_SET_PROTECTION_COMMAND 
CNC_UPDATE_TOOLOFSET 
CNC_UPDATE_WORKOFSET 
CNC_USE_WORKOFSET 
CNC_WRITE_VARIABLE 
COLUMN132_DISPLAY 
CONST_ALN_LINE 
CONST_ALN_PLANE 
CONST_BF_CIRCLE 
CONST_BF_CONE 
CONST_BF_CYLINDER 
CONST_BF_ELLIPSE 
CONST_BF_LINE 
CONST_BF_PLANE 
CONST_BF_SLOT 
CONST_BF_SPHERE 
CONST_BF_SQSLOT 
CONST_BFRE_CIRCLE 
CONST_BFRE_CONE 
CONST_BFRE_CYLINDER 
CONST_BFRE_ELLIPSE 
CONST_BFRE_LINE 
CONST_BFRE_PLANE 
CONST_BFRE_SLOT 
CONST_BFRE_SPHERE 
CONST_BFRE_SQSLOT 
CONST_CAST_CIRCLE 
CONST_CAST_CONE 
CONST_CAST_CYLINDER 
CONST_CAST_ELLIPSE 
CONST_CAST_LINE 
CONST_CAST_PLANE 
CONST_CAST_POINT 
CONST_CAST_SLOT 
CONST_CAST_SPHERE 
CONST_CAST_SQSLOT 
CONST_CONE_CIRCLE 
CONST_CORNER_POINT 
CONST_CYLINDER_CIRCLE 
CONST_DROP_POINT 
CONST_EXTRACTED_CIRCLE 
CONST_EXTRACTED_EDGE_POINT 
CONST_EXTRACTED_PLANE 
CONST_EXTRACTED_SURFACE_POINT 
CONST_EXTREME_POINT 
CONST_HIPNT_PLANE 
CONST_INT_CIRCLE 
CONST_INT_ELLIPSE 
CONST_INT_LINE 
CONST_INT_POINT 
CONST_MID_LINE 
CONST_MID_PLANE 
CONST_MID_POINT 
CONST_MIN_CIRCLE_SCAN 
CONST_OFF_LINE 
CONST_OFF_PLANE 
CONST_OFF_POINT 
CONST_ORIG_POINT 
CONST_PIERCE_POINT 
CONST_PLTO_LINE 
CONST_PLTO_PLANE 
CONST_PRIMARY_DATUM 
CONST_PROJ_CIRCLE 
CONST_PROJ_CONE 
CONST_PROJ_CYLINDER 
CONST_PROJ_ELLIPSE 
CONST_PROJ_LINE 
CONST_PROJ_POINT 
CONST_PROJ_SLOT 
CONST_PROJ_SPHERE 
CONST_PROJ_SQSLOT 
CONST_PRTO_LINE 
CONST_PRTO_PLANE 
CONST_REV_CIRCLE 
CONST_REV_CONE 
CONST_REV_CYLINDER 
CONST_REV_ELLIPSE 
CONST_REV_LINE 
CONST_REV_PLANE 
CONST_REV_SPHERE 
CONST_ROUND_SLOT 
CONST_SCAN_SEG_ARC 
CONST_SCAN_SEG_LINE 
CONST_SECONDARY_DATUM_LINE 
CONST_SET 
CONST_SPHERE_CIRCLE 
CONST_TANCIRCLES_CIRCLE 
CONST_TANGENT_PLANE 
CONST_TANLINES_CIRCLE 
CONST_TERTIARY_DATUM_POINT 
CONST_TRANSLATED_PLANE 
CONST_VECT_DIST_POINT 
CONST_WIDTH1D_FEATURE 
CONST_WIDTH2D_FEATURE 
CONST_WIDTH3D_FEATURE 
CONTACT_ANGLE_POINT_FEATURE 
CONTACT_CIRCLE_FEATURE 
CONTACT_CONE_FEATURE 
CONTACT_CORNER_POINT_FEATURE 
CONTACT_CYLINDER_FEATURE 
CONTACT_EDGE_POINT_FEATURE 
CONTACT_ELLIPSE_FEATURE 
CONTACT_HIGH_POINT_FEATURE 
CONTACT_LINE_FEATURE 
CONTACT_PLANE_FEATURE 
CONTACT_POLYGON_FEATURE 
CONTACT_SLOT_NOTCH_FEATURE 
CONTACT_SLOT_ROUND_FEATURE 
CONTACT_SLOT_SQUARE_FEATURE 
CONTACT_SPHERE_FEATURE 
CONTACT_SURFACE_POINT_FEATURE 
CONTACT_VECTOR_POINT_FEATURE 
CORNER_HIT 
CURVE_FEATURE 
DATDEF_COMMAND 
DCCSCAN_OBJECT 
DEFAULT_CASE_COMMAND 
DIMENSION_2D_ANGLE 
DIMENSION_2D_DISTANCE 
DIMENSION_3D_ANGLE 
DIMENSION_3D_DISTANCE 
DIMENSION_A_LOCATION 
DIMENSION_ANGULARITY 
DIMENSION_CIRCULAR_RUNOUT 
DIMENSION_CIRCULARITY 
DIMENSION_COAXIALITY 
DIMENSION_CONCENTRICITY 
DIMENSION_CYLINDRICITY 
DIMENSION_D_LOCATION 
DIMENSION_END_LOCATION 
DIMENSION_END_ROUGHNESS 
DIMENSION_FLATNESS 
DIMENSION_FLATNESS_LOCATION 
DIMENSION_FORMAT 
DIMENSION_H_LOCATION 
DIMENSION_INFORMATION 
DIMENSION_KEYIN 
DIMENSION_L_LOCATION 
DIMENSION_PA_LOCATION 
DIMENSION_PARALLELISM 
DIMENSION_PD_LOCATION 
DIMENSION_PERPENDICULARITY 
DIMENSION_PR_LOCATION 
DIMENSION_PROFILE 
DIMENSION_PROFILE_LINE 
DIMENSION_PROFILE_SURFACE 
DIMENSION_R_LOCATION 
DIMENSION_ROUGHNESS 
DIMENSION_ROUNDNESS 
DIMENSION_ROUNDNESS_LOCATION 
DIMENSION_RS_LOCATION 
DIMENSION_RT_LOCATION 
DIMENSION_RUNOUT 
DIMENSION_S_LOCATION 
DIMENSION_START_LOCATION 
DIMENSION_START_ROUGHNESS 
DIMENSION_STRAIGHTNESS 
DIMENSION_STRAIGHTNESS_LOCATION 
DIMENSION_SYMMETRY 
DIMENSION_T_LOCATION 
DIMENSION_TOTAL_RUNOUT 
DIMENSION_TRUE_D1_LOCATION 
DIMENSION_TRUE_D2_LOCATION 
DIMENSION_TRUE_D3_LOCATION 
DIMENSION_TRUE_DD_LOCATION 
DIMENSION_TRUE_DF_LOCATION 
DIMENSION_TRUE_DIAM_LOCATION 
DIMENSION_TRUE_END_POSITION 
DIMENSION_TRUE_FLATNESS_LOCATION 
DIMENSION_TRUE_LD_LOCATION 
DIMENSION_TRUE_LF_LOCATION 
DIMENSION_TRUE_LOCATION 
DIMENSION_TRUE_PA_LOCATION 
DIMENSION_TRUE_PR_LOCATION 
DIMENSION_TRUE_ROUNDNESS_LOCATION 
DIMENSION_TRUE_START_POSITION 
DIMENSION_TRUE_STRAIGHTNESS_LOCATION 
DIMENSION_TRUE_WD_LOCATION 
DIMENSION_TRUE_WF_LOCATION 
DIMENSION_TRUE_X_LOCATION 
DIMENSION_TRUE_Y_LOCATION 
DIMENSION_TRUE_Z_LOCATION 
DIMENSION_V_LOCATION 
DIMENSION_X_LOCATION 
DIMENSION_Y_LOCATION 
DIMENSION_Z_LOCATION 
DISPLAY_METAFILE 
DISPLAYPRECISION 
DO_COMMAND 
EDGE_HIT 
ELSE_COMMAND 
ELSE_IF_COMMAND 
END_ALIGN 
END_CASE_COMMAND 
END_DEFAULT_CASE_COMMAND 
END_ELSE_COMMAND 
END_ELSE_IF_COMMAND 
END_HYPER_FORM 
END_HYPER_REPORT 
END_IF_COMMAND 
END_MEASURED_FEATURE 
END_MOVE_SWEEP 
END_PROGRAM 
END_READ_TEMPERATURE 
END_SCRIPT 
END_SELECT_COMMAND 
END_SUBROUTINE 
ENDWHILE_COMMAND 
EQUATE_ALIGN 
EW_GROUP_END 
EW_GROUP_START 
EXTERNAL_COMMAND 
FASTPROBEMODE_COMMAND 
FEATURE_CONTROL_FRAME 
FILE_IO_OBJECT 
FILTER_SET 
FLY_MODE 
GAGE_FEATURE 
GAP_ONLY 
GENERIC_CONSTRUCTION 
GET_PROBE_DATA 
GET_PROBECHANGER_DATA 
GOTO_COMMAND 
HYPER_CUSTOM 
HYPER_FORM 
HYPER_LABEL 
HYPER_LEGACY 
HYPER_REPORT 
HYPER_TEMPLATE 
IF_BLOCK_COMMAND 
IF_GOTO_COMMAND 
IGNOREMOTIONERRORS 
IGNOREROTAB_COMMAND 
INBETWEEN_TOL 
IOCHANNELCOMMAND 
ISO_SIZE_COMMAND 
ISO_TOLERANCE_COMMAND 
ITER_ALIGN 
LABEL_CMD 
LASER_CIRCLE_FEATURE 
LASER_CONE_FEATURE 
LASER_CYLINDER_FEATURE 
LASER_EDGE_POINT_FEATURE 
LASER_FLUSH_AND_GAP_FEATURE 
LASER_LINE_FEATURE 
LASER_PLANE_FEATURE 
LASER_POLYGON_FEATURE 
LASER_SCANNING_PROFILE 
LASER_SLOT_FEATURE 
LASER_SLOT_SQUARE_FEATURE 
LASER_SPHERE_FEATURE 
LASER_SURFACE_POINT_FEATURE 
LEAPFROG 
LEVEL_ALIGN 
LOAD_COLUMN 
LOAD_FIXTURE 
LOAD_MACHINE 
LOOP_END 
LOOP_START 
MAN_DCC_MODE 
MANRETRACT 
MANSCAN_OBJECT 
MEASURED_CIRCLE 
MEASURED_CONE 
MEASURED_CYLINDER 
MEASURED_LINE 
MEASURED_PLANE 
MEASURED_POINT 
MEASURED_ROUND_SLOT 
MEASURED_SET 
MEASURED_SPHERE 
MEASURED_SQUARE_SLOT 
MEASURED_TORUS 
MESH_ALIGN 
MESH_OPER_COLORMAP 
MESH_OPER_CROSSSECTION 
MESH_OPER_EMPTY 
MESH_OPER_FILEEXPORT 
MESH_OPER_FILEIMPORT 
MESH_OPER_SELECTION 
MESH_OPER_THICKNESS_COLORMAP 
MOVE_ALL 
MOVE_CIRCULAR 
MOVE_CLEARP 
MOVE_CLEARPOINT 
MOVE_EXCLUSIVE 
MOVE_INCREMENT 
MOVE_PH9_OFFSET 
MOVE_POINT 
MOVE_ROTAB 
MOVE_SPEED 
MOVE_SWEEP_POINT 
MOVE_SYNC 
ONERROR 
OPTIONMOTION 
OPTIONPROBE 
PART_TEMPERATURE 
PLANNER_ANGLE_POINT_FEATURE 
PLANNER_CIRCLE_FEATURE 
PLANNER_CONE_FEATURE 
PLANNER_CORNER_POINT_FEATURE 
PLANNER_CYLINDER_FEATURE 
PLANNER_EDGE_POINT_FEATURE 
PLANNER_ELLIPSE_FEATURE 
PLANNER_FLUSH_AND_GAP_FEATURE 
PLANNER_HIGH_POINT_FEATURE 
PLANNER_LINE_FEATURE 
PLANNER_PLANE_FEATURE 
PLANNER_POLYGON_FEATURE 
PLANNER_SLOT_NOTCH_FEATURE 
PLANNER_SLOT_ROUND_FEATURE 
PLANNER_SLOT_SQUARE_FEATURE 
PLANNER_SPHERE_FEATURE 
PLANNER_SURFACE_POINT_FEATURE 
PLANNER_VECTOR_POINT_FEATURE 
POINT_INFO 
POINTCLOUD 
POINTCLOUD_ALIGN 
POINTCLOUD_MESH 
POINTCLOUD_OPER 
POINTCLOUD_OPER_BOOLEAN 
POINTCLOUD_OPER_CLEAN 
POINTCLOUD_OPER_COLORMAPFACE 
POINTCLOUD_OPER_COLORMAPPNT 
POINTCLOUD_OPER_CROSSSECTION 
POINTCLOUD_OPER_EMPTY 
POINTCLOUD_OPER_FILEEXPORT 
POINTCLOUD_OPER_FILEIMPORT 
POINTCLOUD_OPER_FILTER 
POINTCLOUD_OPER_NEW 
POINTCLOUD_OPER_OLD 
POINTCLOUD_OPER_PURGE 
POINTCLOUD_OPER_RESET 
POINTCLOUD_OPER_SELECTION 
POINTCLOUD_OPER_THICKNESS_COLORMAP 
POLARVECTORCOMP 
POSITIVE_REPORTING 
PREHIT_DISTANCE 
PRINT_FORM_FEED 
PRINT_REPORT 
PROBE_COMPENSATION 
READ_POINT 
READ_TEMPERATURE 
RECALL_ALIGN 
RECALL_VIEWSET 
RETRACT_DISTANCE 
RETROLINEAR_ONLY 
RMEAS_MODE 
ROTATE_ALIGN 
ROTATE_CIRCLE_ALIGN 
ROTATEOFF_ALIGN 
SAVE_ALIGN 
SCAN_SPEED 
SECTION_2DRADIUS 
SELECT_COMMAND 
SET_ACTIVE_TIP 
SET_COMMENT 
SET_WORKPLANE 
SIMULTANEOUS_EVALUATION 
SIMULTANEOUS_TOLERANCE_COMMAND 
SNAPSHOT_COMMAND 
SPC_CHART 
START_ALIGN 
START_MOVE_SWEEP 
START_SUBROUTINE 
STATISTICS 
SURFACE_FEATURE 
SURFACE_HIT 
TABLE_FORMAT 
TEMP_COMP 
TEMP_COMP_ORIGIN 
THICKNESS_GAGE 
THICKNESS_SCAN 
TOUCH_SPEED 
TPS_CUSTOM_COMMAND 
TRACEFIELD 
TRACKER_CUSTOM_COMMAND 
TRACKER_LEVEL_TO_GRAVITY 
TRANS_ALIGN 
TRANSOFF_ALIGN 
TRIGGER_PLANE_COMMAND 
TRIGGER_TOLERANCE 
UNTIL_COMMAND 
VECTOR_HIT 
VIDEOSETUP 
VIEWSET 
VISION_ANGLE_POINT_FEATURE 
VISION_CIRCLE_FEATURE 
VISION_EDGE_POINT_FEATURE 
VISION_ELLIPSE_FEATURE 
VISION_IMAGE_CAPTURE 
VISION_LINE_FEATURE 
VISION_POLYGON_FEATURE 
VISION_PROFILE_2D_FEATURE 
VISION_SLOT_NOTCH_FEATURE 
VISION_SLOT_ROUND_FEATURE 
VISION_SLOT_SQUARE_FEATURE 
VISION_SURFACE_POINT_FEATURE 
WHILE_COMMAND 
WRIST_SPEED 
X_TEMPERATURE 
XML_STATISTICS 
Y_TEMPERATURE 
Z_TEMPERATURE 
Required LONG in the OBTYPE enumeration that denotes what type of object to create.
AutoPosition

Required Boolean that determines what should happen when the new Command object is being inserted in an inappropriate place in the measurement routine.

  • If AutoPosition is FALSE, it will not be inserted at all.
  • If it is TRUE, the new Command will be inserted at the new appropriate position.

Return Type

Command object.

Remarks

PC-DMIS only supports one way for adding commands while executing a measurement routine in PC-DMIS: Insert a script command (select Insert | Basic Script from within PC-DMIS) that points to the BASIC script containing the Add method. Otherwise, you will need to run your script with the Add method first and control measurement routine execution from within your script.

Example

Sub main()

' This sample script shows how to add a GROUP/ and ENDGROUP/ command into the end of your measurement routine.

    Dim pcd As Object

    Dim pp As Object

    Dim cmds As Object

    Dim cmd As Object

    Dim start_grp As Object

    Dim end_grp As Object

    Dim uidstr As String

    Dim RetVal As Boolean

            

    Set pcd = CreateObject("PCDLRN.Application.4.2")

    Set pp = pcd.ActivePartProgram

    Set cmds = pp.Commands

    Set cmd = cmds.LastCommand

     

    cmds.InsertionPointAfter cmd

    Set start_grp = cmds.Add(752, True)

    start_grp.ID = "I"

    start_grp.ReDraw

    

    cmds.InsertionPointAfter start_grp

    Set end_grp = cmds.Add(753, True)

    end_grp.ReDraw

    uidstr = end_grp.GetText(PCDLRN.uid, 0)

    RetVal = start_grp.PutText(uidstr, PCDLRN.REF_UID, 0)

    uidstr = start_grp.GetText(PCDLRN.uid, 0)

    RetVal = end_grp.PutText(uidstr, PCDLRN.REF_UID, 0)

    pp.RefreshPart

End Sub

See Also

Copyright © 2021. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.