I occasionally write programs for customers that necessitate the creation of a CUI so they may press a button to either run the command or open a help file. In this post I’ll cover creating a button in the CUI to open a fictitious help file as a PDF.
The first step is to type CUI at the command line to open the Customize User Interface.
Next select the partial cui file you want to add the command to, in this case I’m going to modify the C3DRPointToSnap cui to add a help file button to a PDF file.
Now we need to create a command for the help file. This is done by selecting the star with starburst in the command list section.
Once you do this the right side of the dialog box will show information for the newly created command after you select it. After it comes up fill in the appropriate information for your command.
Once you have what you want it to be enter in the Macro command. The ^C^C is the escape command twice to make sure any running commands are ended before this command should run. In my macro it is:
^C^C(command "_start" "C:/Progra~1/MWHGlo~1/APC3DU~1/MWHAPC~1.PDF")
The command now looks something like this:
Now I need to add the command to the ribbon. The first step is to create a new panel since I want this help file to be in one. If you already have a panel you can just add the command to it and bypass this step. To create a panel right click on the Panels branch and choose new Panel…
This will create a new panel, next drag the command from the bottom of the screen into the newly created panel after giving it a catchy name. I’m adding mine to Row 1. Next on the the right when you select the command in the Row 1 you can set the button style, I’m going with Large with Text (Vertical).
My last step is to add the panel to the ribbon tab. You can do this by dragging the panel up into the appropriate tab.
Now save the CUI (press the save button next to the cui name) and hit the OK button. It should then show up in the ribbon.
No comments:
Post a Comment