## Inserting Programmer Comments

Comment dialog box

The Insert | Report Command | Comment menu option allows you to add operator notes, instructions, or supported media files into the Edit window that will be displayed in a message box when the part program is executed or when the inspection report is printed. There is no limit to the length of the comment text; however, in Command mode only 255 characters will fit per line. When the text reaches the right side of the Edit window, press the ENTER key. (This allows the entire text to be viewed in the Comment Text box.) To create a new line, place the cursor in the desired location of the Comment Text box and press the ENTER key.

Typing Comments

You can also type a comment into the Edit window in Command mode. Simply type COMMENT press TAB and type the comment type you want: such as OPERATOR or REPORT and so forth. Press TAB to accept the command or to move to the field containing the comment text.

Important: When typing your comment text directly into the Edit window in Command mode, PC-DMIS interprets the first ENTER key that you press as an additional text line in your comment. If you want to type a new command following your comment, press ENTER twice at the end of your comment text.

Using Variables in Comment Strings

Suppose you want to concatenate, or add, a variable to an existing comment string. You can do this in two ways. First, you can press ENTER, and type the variable on a new comment line, like this:

C1 =COMMENT/INPUT,NO,Full Screen=YES,Auto-Continue=NO,

Type your variable

ASSIGN/V1=C1.INPUT

COMMENT/OPER,NO,Full Screen=YES,Auto-Continue=NO,

Your V1 variable is

,V1

Second, you can place variables and your comment string on the same line by placing quotation marks around the non-variable string and using the plus sign operator to add the variable to the string, like this:

COMMENT/OPER,NO,Full Screen=YES,Auto-Continue=NO,

"Your V1 variable is " + V1

Changing Comment Color

You may want your comments to stand out more. You can do this by changing your comment color.

- To change them in the Edit window, see "Defining Edit Window Colors".

- To change comment colors for comments that appear in the Report window, change the Colors property of the TextReportObject in the in the Report Template Editor.

Hint: Another way to change a comment's color in the report is to insert this special prefix directly in front of the comment text:
~~#
This tells the comment to use the defined text color for Marked, Unmarked, Step Mode, or Error found in the Edit Window Colors dialog box.
For # you would type 1, 2, 3, or 4; these four numbers stand for the Unmarked, Marked, Step Mode, or Error colors respectively.
So, if you want to display some comment text in the text color assigned to Error, your command would look like this:
COMMENT/rept, ~~4 Some Comment Text

More:

Operator

Report

Input

Document

Yes / No

Readout

Display On Report

Auto-Continue Execution

Display Full Screen

Import Media

Remove Media

Comment Text