### Working with User Assigned Properties

In the Report Template Editor in version 4.0, the Properties dialog box contains a very handy feature, the ability to make a property user definable. This allows you to let program operators change object properties at runtime.

For example, suppose you want your report title to change dynamically according to whatever the current part program operator wants. You can easily add an interactive approach such as this to your reports by using this functionality.

To Make a Property User Assigned:

1. Select an object in one of the editors. For our example above, you would select a Text object.

2. Right-click on the object. This causes the property sheet for that object to appear on the right side of the editor. On the left side of the property sheet you will see check boxes next to most properties. These check boxes determine what properties you can make user definable.

   Sample Property Sheet for a Text object. Notice the user definable check boxes on the left.

3. Select the check box next to the property you want to make definable. For our example above, you would select the Text property for a Text object. A User Assigned Property dialog box appears asking you to determine the message that will prompt the user for the property value and when the user should be prompted.

   User Assigned Property dialog box

4. In the Prompt box, type the prompt the user will receive, then select from one of the two option buttons when the user will receive the prompt. You can choose to prompt the user either during template selection or part program execution.

5. Click OK. The User Assigned Property dialog box closes.

6. Save the report template and return to your part program.

7. Now to test this, use the Report window, click the Template Selection icon and select the report template from the dialog box, then execute your part program.

8. At some time during the previous step, PC-DMIS will display the Define User Assigned Properties dialog box to prompt you for the properties' values according to the option button you selected in the User Assigned Property dialog box

   Define User Assigned Properties dialog box

To View and Manipulate all Your User Assigned Properties:

1. Access a report or label template that has user definable properties.

2. Select Edit | User Assignable Properties. The User Assigned Properties dialog box appears. This dialog box shows those properties that will be presented during template selection or part program execution.

   User Assigned Properties dialog box

3. Select an item from the Prompt Style drop-down list to filter what gets displayed in this dialog. The user assigned properties appear in the list box below. The list box tracks all the properties, what objects they belong to, and their prompts.

1. - To remove a property, select the property and click the big red X. That object's property will no longer be user definable and will use the default value already defined in the template.

     Delete Property icon

   - To reorder a property, select the property you want to move and then click the red up or down arrows. This will move the selected property up or down in the list.

     Red Up and Down Arrows

   - To change a property's prompt or when the prompt should appear, double-click on the property in the Feature column. PC-DMIS displays User Assigned Property dialog box, allowing you to make the change.

     User Assigned Property dialog box

Important: If you selected Prompt when user selects template from the User Assigned Property dialog box, PC-DMIS will only prompt you once for any user assigned values. Thereafter, for that part program, PC-DMIS will automatically use the initial property value until you clear out all template associated data. See the "Clearing Template Associated Data" topic in this chapter.
If you selected Prompt when report is executed, then PC-DMIS will automatically display the Define User Assigned Properties dialog box each time the part program is executed.