AEC Content on the RibbonAuthor: David Koch, EwingCole
Date Published: December 13, 2009
The out-of-the-box AutoCAD Architecture ribbon tabs include a number of tools that allow you to add AEC content. Rather than duplicate the abilities of tool palette tools to import styles or definitions from a source file when necessary and to preset property values, these ribbon tools “run” a tool palette tool, through the AECRIBBONTOOL command.
To create a ribbon tool for your own custom content, you will need a tool palette tool for the content and an editable customization file in which you can add a ribbon tool.
Tool Palette Tool
Any tool palette tool that exists in the current workspace can be referenced from a ribbon tool, whether or not it is available in the current tool palette group. If the ribbon tool is to be shared with others, everyone will need to have the referenced tool and the palette on which it resides should not be easily deleted or edited. The out-of-the-box setup achieves this by having the ribbon tools reference tools that are on a read-only palette that is not part of any of the out-of-the-box tool palette groups. To see this palette, you need to set “All Palettes” current. You may want to set up a similar read-only palette for the tools that will be referenced by your ribbon tools, if you do not have a read-only, network-based tool palette location that everyone has in their workspace.
Figure 1 – Custom Ribbon Tools palette with tools to be added to the ribbon
Ribbon tools are created in a CUIx file by placing commands on a ribbon panel. Ribbon panels are added to ribbon tabs, which are then added to one or more Workspaces. All of this is done within the Customize User Interface dialog.
Where to create your ribbon customizations is up to you, but it is generally considered good practice to keep your customizations separate from the out-of-the-box files whenever possible, to ease maintenance and migration to future releases. The example here will create a CUIx file (AECRibbonTool.cuix), loaded as a partial customization file, to hold custom commands and ribbon tools, a panel, and a tab. A ribbon panel defined in a partial customization file can be added to a ribbon tab defined in any currently loaded customization file, so you could create your new commands and ribbon panel in your own customization file and limit your modification of an out-of-the-box customization file to adding the new panel to the ribbon tab.
Create and Load the Partial Customization File
Create the New Panel
Populate the New Panel
Create a Ribbon Tab and Add the Panel
Add the Ribbon Tab to Your Workspace (New Tab Only)
You will now need to manually add a new tab to the desired Workspace(s). (If you set the panel to be added when loading as a partial file, you could unload the file and then reload it to add the tab to all Workspaces.)
Your new tools should now be available. Click on the appropriate tab and try them out.
Figure 8 – The Ribbon Tools panel on the AEC Content tab