Managing Preferences > Disabling Commands
  
Disabling Commands
Each control in the user interface has a unique command. For example, the command for the Print button is PrintCmd. You can use a preference file to disable access from the user interface to one or more commands on buttons or ribbons. You cannot disable commands on shortcut menus. Instructions for finding and disabling a command follow.
Finding a Command
1. To find a command for a button, set the following environment variable:
set PVIEW_DISPLAY_COMMANDS=1
2. Open Creo View, and then place the pointer over the button. A tooltip appears with the command. For example, PrintCmd.
Using the Preference File to Disable the Command
Follow the instructions in this procedure to disable the Print button.
1. Open admin_prefs.xml or server_prefs.xml in a text editor.
2. At the end of the file, add the following section:
<preferences>

<category name="General">
<subcategory name="UI_Config">
<preference name="disabled_commands" value="PrintCmd"/>
</subcategory>
</category>
</preferences>
3. To disable more than one command, list them, separated by commas, as the value for disabled_commands.
4. Save admin_prefs.xml or server_prefs.xml and close the file.
The command is now disabled. When all of the preference files are read, the values in each disabled_commands section are cumulatively disabled.
Some server preference options cannot be configured using the preference editor, and they only apply when Creo View is embedded in a web page. This option disables the automatic unlock of an annotation set when closed:
<?xml version="1.0" encoding="utf-8"?>
<preferences>
<category name="Annotations">
<preference name="disable_auto_lock" value="True"/>
</category>
</preferences>