Reference Topics > Controlling command button properties
Controlling command button properties
You can change the appearance of command buttons in several ways. For example, you may wish just to show text and not the image or, you may wish to show both.
1. Click File > Customize to display the Customize dialog box.
2. Position the pointer over an icon on any toolbar and right-click the mouse button to display the following:
Reset to Default: Resets the selected icon to its default setting.
Copy Button Image: Copies the image to the clipboard.
Delete: Deletes the button from the toolbar. To retrieve it, click the Commands tab, select the appropriate category from the Categories box and drag the icon into the toolbar.
Button Appearance: Lets you change the appearance of existing command buttons. You can also create new buttons by editing an existing image and saving it under a new name.
Image: Replaces the button text with an image.
Text: Replaces the button image with text.
Image and Text: Sets the button to show both an image and text. If you choose image and text, the text becomes the tooltip.
Start Group: Starts a new toolbar group (puts a vertical separator to the left of the button).
Creating new commands and modifying existing commands
With the pixel editor and the macro recorder, it is easy to create new icons and assign a command sequence to them. You can also select existing commands and modify them. This is all done in the User defined Command dialog box, which is displayed when you click New or Modify.
Recording a macro
This example shows you how to record a macro, assign it to a button and place the button in a toolbar. In this example, the macro generates an extruded block having the dimensions 100x50x55.
1. Click File > Customize to display the Customize dialog box.
2. Make sure the Commands tab is enabled.
3. Click New to display the User defined Command dialog box.
4. Under Command ID:
Type Extrude 55 in the Name box.
Select Machine in the Group list.
Select SolidDesigner in the Application list.
5. Under Description, type Extrudes a 55 mm block. This is the prompt text.
6. Under Image, click Browse and select the bitmap image extrude.bmp from ../personality/bitmaps/bmp/commands/SolidDesigner/Machine.
7. Click Modify and use the pixel editor to modify the image in such a way that it is easily recognized. In this example, the number 55 was added.
8. Click Save to save the modified image.
9. Click Record to start recording the macro. Notice that the User defined Command dialog box is reduced to a Stop Command Recording button. Do the following:
a. Click Modeling and then, in the Draw group, click the arrow next to Rectangle.
b. Click Rectangle.
c. In the user input line, type 0,0 100,50.
d. Click Modeling and then, in the Model group, click the arrow next to Pull.
e. Click Pull Linear.
f. If necessary, type a part name (for example, p1)
g. In the Distance box, type 55.
h. Click .
i. Click Stop Command Recording to return to the full User defined Command dialog box.
j. Click OK to close this dialog and return to the Commands tab.
10. Scroll down the Categories box and highlight Machine. Your new command (Extrude 55) should now be available at the bottom of the Commands box. Simply drag this command into your favorite toolbar and close the Customize dialog box.
To verify if the macro works, click the Extrude 55 button to create an extruded block.
Note the following when defining commands and recording macros:
The Localized (Optional) box provides additional fields for localized naming purposes. They are filled automatically if left blank.
You can specify the name of an existing group or enter a new name to create a new group (for example, My Commands).
The UI Behavior box specifies the position of a menu when it is displayed:
Default places the menu below the main menu (assuming it has not been moved).
Relative places the menu next to the button.
On Request means that the menu options are not shown by default. Use the advanced button to view the menu options.
None means no menu.
When recording a macro, clicking in the viewport is not allowed.
Editing an icon does not affect existing icons currently available in toolbars and menus.