About the Command Definition XML Code
Each customized command you define has its own Command Definition. The main elements are summarized below. All elements and attributes are specified in the topics that follow.
About Element and Attribute Types in the Command Definition XML Code
All elements and attributes are the String data type unless their descriptions in this appendix starts with Mixed or Boolean in parentheses as shown below.
• (Mixed) elements can contain both text and other elements.
• (Boolean) attributes can only be set true or false.
Available Elements in the Customized Command Definition XML
<menu>
<command_name>
Mandatory command name element. Specifies the unique name of this customized command. You can use this identifier as a reference in the Ribbon or when you override the command. In addition, this is the identifier you specify when you define the position of another customized command in the right-click menu.
<locked>
(Boolean) Optional locked element. Specifies whether this command can be edited or deleted by any user. This option applies only if this is not a user XML file.
<label>
Mandatory label element. Specifies the command’s label on the Ribbon and the right-click menus.
<tooltip>
Optional tooltip element. Specifies the command’s tooltip.
<icon>
Optional icon element. Specifies the 16*16 icon. The icon file must reside on the same folder as the XML file. The recommended format is PNG.
<icon_large>
Optional icon element. Specifies the 32*32 icon. The icon file must reside on the same folder as the XML file. The recommended format is PNG.
<action>
(Mixed) Option action element. Specifies the action performed with this command. Uses XML attributes to save a view to an annotation set or copy an image to the clipboard. Uses XML content to open a URL. (See
The <action> Element Attributes.)
<rmb_order>
(Mixed) Optional right-click menu order element. Specifies the position of the customized command in the right-click menu. If you do not define this element,
Creo View adds customized commands to the right-click menu in alphabetical order. (See
<rmb_order> Element Attributes.)
Structure of the Customized Command XML
<menu
...>
<command_name>MyCommand 1</command_name>
<locked>true</locked>
<label>Button Label</label>
<tooltip>Button tooltip</tooltip>
<icon>\my\icons\location\icon16x16.png</icon>
<icon_large>\my\icons\location\icon32x32.png</icon_large>
<action>
...
</action>
<rmb_order
name="AnotherCommand"
position="before">
</rmb_order>
</menu>