core

#### Understanding the Subroutine Creation Dialog Box

To access the Subroutine Creation dialog box, select Insert | Flow Control Command | Subroutine.

Subroutine Creation dialog box

The following options are available in the Subroutine Creation dialog box:

Name - This box defines your subroutine. This is the name you will use when calling the subroutine later, so if you have multiple subroutines in a single measurement routine, each name must be unique.

The name is limited to 180 or fewer characters. If you enter 181 or more characters in the Name box, a "Line too long error" message appears.

When you click the OK button, the name is automatically shortened to the first 180 characters, and the Subroutine Creation dialog box closes.

Number of arguments - This list shows the arguments for the subroutine you are creating. Arguments appear in this area in this form:

<NAME> = <VALUE> : <DESCRIPTION>

For example, if one of your arguments was named "Diameter" with a default value of 3, your argument in this list may appear as:

DIAMETER = 3 : The hole's diameter

PC-DMIS uses the default value whenever another value is not passed from the CALLSUB command.

To edit an argument, double-click on the argument you want to change. The Argument Edit dialog box opens, allowing you to make the changes. See "Understanding the Argument Edit Dialog Box" for information on this dialog box.

Add Argument - This button adds new arguments to your subroutine. Click on this button to open the Argument Edit dialog box appears. See "Understanding the Argument Edit Dialog Box" for information on this dialog box.

Delete Argument - This button allows you to delete arguments from your subroutine. Select the argument from the list, and then click the Delete Argument button to remove it.