Managing Customized Commands

Understanding how customized commands are stored in PowerDesigner will allow you to easily plug your programs in PowerDesigner while installing them.

Storage

Customized Commands are saved in the Registry. You can define values for customized commands in the CURRENT USER Registry or in the LOCAL MACHINE Registry.

If you define values in the LOCAL MACHINE Registry, customized commands are available for any user of the machine. Thus, when you remove a customized command defined in that Registry from the Customize Commands dialog box, you only remove the line from the list but not the corresponding Registry entry. When you do so, the default value (the one defined in the LOCAL MACHINE Registry) is restored when you open the dialog box again.

The location of customized commands definition can be:

  • HKEY_CURRENT_USER\Software\Sybase\PowerDesigner <version>\PlugInCommands

  • HKEY_LOCAL_MACHINE\Software\Sybase\PowerDesigner <version>\PlugInCommands

Each customized command is stored in a single Registry string value:

  • The name of the customized command is a Registry entry, which has the same name as the command

  • The submenu of the customized command is a Registry key, which has the same name as the submenu

  • Other command properties are stored in the Value Data field of the Registry entry (Registry entry value)



Definition Format

The syntax of the Registry entry is the following:

[Hide:][Key:<key specification>:][Script:]<command>[ |comment]

Note that none of the above quoted prefix is localized.

Syntax Keyword

Description

Hide:

Defines the command as hidden

Key:<key specification>:

Allows the association of a keyboard shortcut to the command. This is an optional field. The <key specification> element can include the following optional prefixes in this order:

  • Ctrl- for CONTROL flag

  • Shift- for SHIFT flag

Immediately followed by a single character, included between "0-9" (for example:Ctrl-Shift-0)

Script:

Defines the command to be interpreted as an internal script

<Command>

Defines the filename with optional arguments for the command. The command is mandatory and is terminated by a '|' character. If you want to insert a '|' character within a command, you must double it

Comment

Describes the command. This is an optional field

Note: The Customize Commands dialog box only supports "Ctrl-Shift-0" to "Ctrl-Shift-9" keyboard shortcuts. If you define a keyboard shortcut outside that range, conflicts with some other built-in keyboard shortcuts may occur and lead to unpredictable results. The reuse of the same keyboard shortcut for two distinct commands may also lead to unpredictable results.