Command aliases

Command aliases are alternative names for BricsCAD commands. You can launch the LINE command by entering L at the Command line. There is no need to type the complete name. After typing the command alias the command is executed. Some commands have more than one alias: e.g. REC, RECT and RECTANGLE are all aliases for the RECTANG command, whereas the last alias is even longer than the command name. In general, command aliases can increase your speed in entering the commands using the keyboard.

Command aliases are saved in a *.pgp file (P roG ram P arameters file). By default the default.pgp file in the Support folder of the Roamable Root folder is used.

If a command can be executed transparently (= while another command is running), the alias can also be used transparently. To execute a command or an alias transparently, precede the command name or alias with an apostrophe (').

Note:
  • Unlike commands, aliases are only local and cannot be used as global commands preceded by a underscore (_).
  • Command aliases cannot be used in scripts (*.scr).

Editing the alias file in a text editor

In order to modify existing aliases or to create new ones, the default.pgp file can be edited using an ASCII text editor (e.g. Notepad).

The first section of the default.pgp file defines the Shell commands. The second section of the default.pgp file defines command aliases.

The following syntax is used to define a command alias:

alias, *command

alias = the character string to be entered at the command prompt. The command alias must be followed by a comma (,).

command = the BricsCAD command. The command name must be preceded by an asterisk (*).

Comment lines must be preceded by a semicolon (;). Comment lines can be used to add additional information, e.g. when the file was last edited and by whom.

Some commands, such as HATCH or BOUNDARY, can be preceded by a hyphen (-) to access the Command line version of the command instead of the dialog box version. Command aliases can be created for these commands also, e.g.:

vi, *-view

Execute the REINIT command to reload the alias file when it was externally edited.

Using the Customize dialog to edit the alias file

  1. Click the Command Aliases tab on the Customize dialog.
  2. (option) To create a new alias,
    • Do one of the following:
      • Click the Add button.
      • Right-click an alias and choose Add Alias in the context menu.
      • Right-click a command and choose Add Alias in the context menu to create an alias for the selected command.

      The Add Alias dialog box appears.

    • Type the command alias in the Alias field.

    • Click the down arrow at the right hand side of the Command field, then select a command. You can start typing the command name in the Command field to easily find the command in the list.
    • Click the OK button.
  3. (option) To edit an existing alias,
    • Select the alias in the list.

    • Click the Edit button, or right-click the alias and choose Edit Alias in the context menu.

      The Edit Alias dialog box appears.

    • Type a new alias in the Alias field.

      If the alias already exists, you are prompted to overwrite the existing alias.

    • Click the OK button.
  4. (option) To delete an alias,
    • Select the alias in the list.

    • Click the Delete button, or right-click and choose Delete in the context menu.

      A Confirm dialog box appears.

    • Click the OK button on the Confirm dialog box to delete the alias.
Note: If you use these procedures to edit the .pgp file, it is not necessary to execute the REINIT command.