Customizing the Revision Entry Dialog
The revision entry dialog that opens when the Home > Create > Sheet > Title Field > Revision Table is started is by default named Enter Revision, and it contains three input fields: Revision, Name and Description.
The name, size and position of the dialog are defined in the change.cmd macro. The location of this file is the project's norms folder %ncgnorms%.
The change.tab configuration file defines which input fields the Enter Revision dialog contains, and the size and position of the input fields. This file can be edited so that the dialog contains input fields for the desired revision information. The default location of this file is %ncgnorms%. A different location can be specified in the change.cmd macro.
Specifying the location of change.tab:
In the default version of the change.cmd macro the location of change.tab is defined in line 92 as the value of variable f.
Changing the Name, Size and Position of the Dialog
Do the following:
-
Open the change.cmd macro in a text editor.
-
Locate the line starting with panel on. In the default change.cmd macro this is line 91:
-
Define the values of the following variables:
-
r – Height of the dialog in pixels
-
c – Width of the dialog in pixels
-
t – Name of the dialog
-
j – Position of the dialog on the screen, defined as x and y coordinates. Both values must be between 0 and 1. Position 0,0 is the bottom left corner of the screen and 1,1 is the top right corner.
-
Defining the Contents of the Dialog
The contents of the revision entry dialog can be customized by editing the change.tab configuration file. The following can be defined in this file:
-
A unique identifier that links a certain line to an entry in the change.cmd macro
-
The elements of the dialog and their position in it
-
The visual formatting of the elements
-
The type of the user interface element. The dialog can contain the following element types: text label, input field, drop-down menu, push button.
-
The element content
-
Optionally, a command to be performed. Allows running a user-defined macro when a button in the dialog is clicked or a certain drop-down menu item is selected. Not used in the default change.cmd macro currently.
Contents of the change.tab File
Each line in the file defines an element in the revision entry dialog box. The syntax is as follows:
identifier, x coordinate, y coordinate, width, height, background colour, foreground colour, element type, 'text label' or '^(array) variable': ‘command on [ENTER]/[BUTTON CLICK] or [DROPDOWN SELECTION]’;
-
identifier
is a unique identifier that is used by the change.cmd macro where interactions with the element are defined (like retrieving information from an input field, or filling information into it). -
x coordinate
,y coordinate
define the position of the element within the dialog. -
width
,height
defines the size of the element in width and height. For the drop-down menu element (type 27) the height should be the total height of the expanded drop-down menu. If the height is not enough for showing all the items in the drop-down list, a vertical scroll bar will be shown. -
background colour
,foreground colour
define the background colour and the foreground colour of the element. Values clBtnText, clBtnFace set the default colours for the element type. It is recommended to use these values. Background colour is not used for all element types. The number of a Hull colour set (1, 2, or 3) can be used as the value. The colours defined for each colour set can be seen in Tools > Settings > User Interface Settings > Colours. -
element type
defines the element type. Possible values are 5 for text label, 6 for input field, 27 for drop-down menu, and 1 for push button. 'text label'
is required for element type text label (type 5) and it contains the label text for a drop-down menu or an input field. For element type input field (type 6) sets the default, pre-filled value for the input field.-
'^(array) variable'
– An array variable is required for element type drop-down menu (type 27). The array variable is defined in the change.cmd macro, and it contains the list items which populate the drop-down menu. See Array Variables. For the other element types a variable can be used to fill in the variable information.
Examples
The following examples explain the contents of the default change.tab file. The image below shows the content of the default file and the corresponding revision entry dialog:

The numbers indicate definitions in the change.tab file and the corresponding elements in the revision entry dialog.
Line 1 defines the "Revision" text label of the drop-down menu at the top of the dialog.
1, 0, 2,120,YB[5], clBtnText, clBtnFace, 5,'Revision' :;
-
1
sets the unique identifier used by the change.cmd macro. -
0,2
sets the x,y coordinate position of the text label. -
120,YB[5]
sets the width and height of the text label. YB[5] sets the height to be the default height of element type 5. -
clBtnText, clBtnFace
sets the background colour and the foreground colour to be the default text label colours. -
5
defines the type of the element to be label. -
'Revision'
sets the text label to read "Revision".
Line 2 defines the drop-down list.
2,125, 0, 75+XB[7],YB[7]+ntbool*3*YB[7], clBtnText, clBtnFace,27,'ChangeList':
-
2
sets the unique identifier used by the change.cmd macro. -
125,0
sets the x,y coordinate position of the drop-down list. -
75+XB[7],YB[7]+ntbool*3*YB[7]
sets the width and height of the drop-down list. The height is set to be the total height of the expanded drop-down list.XB[7]
andXB[7]
mean the default width and height values of the drop-down element. -
clBtnText, clBtnFace
set the background colour and the foreground colour to be the default drop-down list colours. -
27
sets the type of the element to be drop-down list. -
'ChangeList'
specifies that the ChangeList array variable is used for populating the drop-down menu. The variable is defined in the change.cmd macro.
Line 4 (identifier 3) defines the "Name" text label, and line 5 (identifier 4) defines the related input field (note that the element type is 6 for input field). The ^Initials variable in line 5 does not have any effect in the current implementation of the revision table.
Line 7 (identifier 5) defines the "Description" text label, and line 8 (identifier 6) defines the related input field (note that the element type is 6 for input field). The ^Description variable in line 8 does not have any effect in the current implementation of the revision table.
Line 11 defines the OK button. Line 10 is just a comment line.