Ever need to create your own toolbar or command in AutoCAD? Maybe you have some custom lisp routines you been using for years and need to add them to your current version of AutoCAD MAP3D. Even if I’m pro-ribbon there may be a time when a toolbar may be easier to get to those custom routines.
To do so we need to check a few things and think out what we want. Most all commands now will allow to to link a icon to them. So first we need the icons and a folder to store them. For this the icons need to be bmp format and 64×64 pixies work fine for me. Next is the folder these need to be in. Look at the Options and see where it looks for them.
Next is the folder that your lisp files or scripts are located in. Again these need to be in the support path and I like to them all in their own folder on my local drive. (network location if you want to share them same for the icons.) Keeping them separate from the program files/ AutoCAD directory makes it easy to upgrade or do a repair, you don’t have to worry about them getting deleted on a uninstall.
Now after you create your icons, paint works fine for me, and the folders set up we start in the Customize Users Interface or CUI. The CUI command will open it for you. The first step I do is create a new CUIX file, again this is one of the safe ways to keep your custom toolbars/ribbons etc. from being deleted and allow sharing. In the CUI (expand it) click on the transfer tab at the top. Then on the right side select click on the icon to create a new Customization file. (looks like a new folder icon) Provide a name for the CUIX and set the location in the folder you have listed in your Options Support files.
Once you create the file go back to the left and click on the Customize tab at the top. All you did was create an empty CUIX file so now we need to load it and add our toolbars or ribbon tabs/panels. To load it scroll down to the Partial Customize Files in the tree to the left side and right click > Load Partial Customized File. Browse to the file you created and load it.
Once you load it that partial CUIX should be the one listed in the drop down list at the top. If not switch to it. This is where we want to create you custom toolbar.
Expand the tree for the toolbar section, right click on the Toolbar and select New Toolbar.
The right side of the CUI changes it’s display and allows you to name the tool. The default name is Toolbar1, just rename it by typing over the name. The rest of the parameters for it can stay with the defaults.
Now we just need to create the commands to add to our toolbar. To do so at the bottom section of the CUI is where the commands are for the custom CUIX file. By default it has none in the list. So click on the icon to create a new command. (the icon with a STAR and orange color sun on it)
As the right side changes display we start to fill in our parameters for that command. Provide a name for the command, set the Macro to run the custom command, this can be the command to run a lisp routine or create your own macro if you know how to use macros. Next select the image(s) to use for that command.
Now we have a complete command in the command list. The next step it to add that command to the toolbar. Select the command and drag it to the toolbar above.
Now create the rest of your commands and drag those up to your toolbar as well. When you have all of your custom commands create switch to the All Customized Files at the top in the drop down list. Highlight your current workspace in the tree on the left, then on the right side expand the tree for the toolbar and you should see your new toolbar.
If not you can load that toolbar into the workspace by Clicking on Customize Workspace button on the right, then expand the partial customize files on the left, expand your custom CUIX and place a check mark in the box for the tool.
When you are done click the Done button on the right side.
Click the Apply button at the bottom to close the CUI and you should have your new toolbar in AutoCAD MAP3D. These same steps will allow you to create a new ribbon tab and panel with your custom commands as well. Just remember a command goes in a Panel, a Panel goes goes in a TAB of the ribbon. Create the Tab then the Panel, place the commands on the Panel then drag the Panel to the Tab.