Showing posts with label Ribbon. Show all posts
Showing posts with label Ribbon. Show all posts

March 14, 2019

ACA: Suppress Multiple Objects Contextual Ribbon Tab

Someone in my office today asked if the Multiple Objects contextual ribbon tab could be suppressed. That is the tab that displays when you select items of different object types.
The individual did not want to have to go back to the tab that was previously active where the tool to be used resided. I recalled that some years back, there were controls that would allow you to not have the ribbon focus shift to the contextual ribbon tab (it would activate, but not become the current tab), to have it show on a single-click or to have it show on a double-click. Those choices are no longer available.

What remains is the ability to set the maximum number of objects for which a contextual ribbon will display (RIBBONCONTEXTSELLIM System Variable). The allowable range is 0 to 32767, with an initial default value of 2500. The purpose of this is to limit performance issues when trying to act on a large number of objects. When the number of objects selected exceeds the current value of RIBBONCONTEXTSELLIM, then a contextual ribbon tab will not display, and any ribbon property controls will be disabled (grayed out). Setting the value to 0 allows an unlimited number of objects to be selected and still get a contextual ribbon tab, so this cannot be used to turn off contextual ribbon tabs. But setting it to 1 will allow contextual ribbon tabs to display when just one object is selected (which most would find desirable, particularly for AutoCAD® Architecture and AutoCAD® MEP objects), but disable it when more than one object is selected. This effectively suppresses the display of the Multiple Objects contextual ribbon tab, but does also suppress all other contextual ribbon tabs when multiple objects are selected. For example, if you select two or more Walls, the Wall contextual ribbon tab will not display.

In addition to typing RIBBONCONTEXTSELLIM at the command prompt, pressing the ENTER key and then typing 1 and pressing the ENTER key, you can also set this value in the Options dialog, on the Selection tab, in the Ribbon options area by selecting the Contextual Tab States button and then editing the value in the Object selection maximum for contextual tab display edit box.

This value is stored in the User Settings (registry) for a given AutoCAD Profile, so setting it once will apply to all drawings you open.

I personally leave the setting at the default 2500, but if you often select multiple objects of different types with the intent to select a tool on the ribbon that is not on the Multiple Objects ribbon tab and want to avoid having to perform an extra click to get back to where you previously were in the ribbon, then setting RIBBONCONTEXTSELLIM to 1 may improve your workflow.

July 30, 2017

Ribbon Tools in AutoCAD 2018.1 Update

The ".1" update for AutoCAD® 2018 for subscription and maintenance customers was released on July 27, 2017. You can see what's new in AutoCAD 2018.1 by reading the AutoCAD 2018.1 and AutoCAD LT 2018.1 Update Preview Guide. According to the Readme, the AutoCAD 2018.1 Update can be installed on AutoCAD-based verticals, such as AutoCAD® Architecture 2018 and AutoCAD® MEP 2018.

PLEASE NOTE: The update will overwrite the ACAD.cuix file for your 2018 product. If you have made any customizations to the ACAD.cuix file, be certain to back that file up prior to installing the update.
08/03/2017 UPDATE:  I have been told that the ACAD.cuix file does not get overwritten if you have already run the program at least once, but that the file is updated and the new panel and tool are added.  I would still back the file up prior to running the update if you have any customizations. The ACA.cuix or MEP.cuix file will not be updated.

While compatible with the vertical applications, the update will not update the customization files for those verticals that do not use the ACAD.cuix file as the main customization file, such as ACA.cuix and MEP.cuix. I personally have no problem with that, as I would rather maintain the Workspace customizations I have done in my main CUIX file* and manually transfer any new items I deem worthy. Here is how to get the Named Views panel and Insert View tool added in the AutoCAD 2018.1 update into your vertical's customization file. I will be working with the ACA.cuix file, but the same process applies to the MEP.cuix file, or that of any other AutoCAD-based vertical that does not use the ACAD.cuix file.

The first step is to install the AutoCAD 2018.1 update, which you can download from your Autodesk® Account page.

With the updated ACAD.cuix file for 2018 in place, you can now use the Transfer tab of the Customize User Interface dialog to copy the panel and the tool to your customization file. The following Screencast shows how to do so.
  1. After installing the AutoCAD 2018.1 Update, launch your vertical product.
  2. Start the CUI command to open the Customize User Interface dialog. Select the Transfer tab.
  3. The left pane of the transfer tab may already have your current main customization file open. If not, open it on this side.
  4. On the right pane, use the open tool and navigate to the location of the ACAD.cuix file in your user profile. Mine was located at
    C:\Users\dkoch\AppData\Roaming\Autodesk\ACA 2018\enu\Support
    Substitute your user name for "dkoch". Depending upon where you are in the world and what language version you have installed, the "enu" folder may have a different name. If you have your roaming Windows profile files on your network, then look there for the AutoCAD Vertical Product 2018 Support folder. Also keep in mind that the AppData folder is a hidden folder in Windows, so you will have to turn on the display of hidden files and folders if you plan to use the Search feature or navigate to the folder.
  5. On both the left and right panes, expand the Ribbon node and then the Panels node below that. Scroll down to find the Layout - Viewports panel in each customization file. Expand that panel's node and then expand the Row 1 node below that.
  6. On the right pane (ACAD.cuix), select both the Separator after Sub-Panel 1 and the Sub-Panel 2 node. The Sub-Panel 2 Node contains the Insert View tool.
  7. Hover the mouse over one of the highlighted items, press and hold the left mouse button down and drag those two items over to the left pane. Position the cursor just below the Sub-Panel 1 node. When you see the blue bar, release the left mouse button to drop those two items into the ACA.cuix version of the Layout - Viewports panel.
  8. If the Separator comes in below the Sub-Panel 2 node in the left pane, drag it up so that it is in between the Sub-Panel 1 and Sub-Panel 2 nodes.
  9. In the right pane (ACAD.cuix), scroll to find the View - Named Views panel.
  10. Drag the View - Named Views panel from the right pane to the left pane, under one of the nodes under the Panels node and drop it, to copy it to the ACA.cuix.
  11. Select the Customize tab in the Customize User Interface dialog.
  12. In the upper left pane, under the ACA node (or the node for the main customization file for your vertical product), expand the Ribbon node, and then expand the Tabs node under that.
  13. Scroll down to find the View - ACA ribbon tab, and expand that node. You will see a listing of the panels currently assigned to that tab.
  14. Scroll down and expand the Panels node under your main customization file. Scroll down to find the View - Named Views panel that you just copied.
  15. Drag the View - Named Views panel up toward the top of the list box in the upper left pane. The list box should start scrolling when you get close to the top. Keep scrolling until the View - ACA ribbon tab is visible.
  16. Drop the View - Named Views panel into the list of panels under the View - ACA node. I find that it is difficult to drop an item at the very end of a list of things under a node, so I usually drop it just above the current last item, and then drag that item above the item I just dropped, if I want the added item to be the last in the list.
  17. Select the OK button to ratify your changes and dismiss the Customize User Interface dialog.
  18. If a layout is not already set current, select a layout. The Layout contextual ribbon tab should appear. Select it and verify that the Separator and the Insert View tool were added to the Layout Viewports panel.
  19. Select the View ribbon tab and verify that the Named Views panel was added.

* - To make moving to a new release easier, I try to limit customization of the ACA.cuix file to those things that have to be there, such as Workspaces, and put as much as I can into a separate customization file, loaded as a partial customization file. That keeps my "stuff" mostly separate and I can adopt the ACA.cuix file that ships with the new release.

August 30, 2014

ACA 2015: Restoring AecCameraAdjust to Ribbon

I do not do a lot of rendering or visualization (changing to a non-orthographic view direction and setting the Visual Style to Shaded is about as far as I usually go), but those who do may make frequent use of the Adjust Camera position dialog.

Since the 2010 release, this dialog was accessible from the Render ribbon tab, on the flyout of the Camera panel, by selecting the Adjust tool, as seen below in its 2014 incarnation.

In AutoCAD® Architecture 2015, the Camera panel got a makeover, and the button styles of the Create Camera and Show Cameras tools were changed from Large with Text (Vertical) to Small With Text and stacked one above the other instead of being side-by-side. A blank third row was included, and the flyout eliminated, removing the Adjust tool with it.

Seems to me that the blank row is just crying out to have the Adjust tool placed there. The AECCAMERAADJUST command is still available in 2015; only the ribbon tool was omitted. Adding it back is quite easy, as can be seen in the Screencast below. Here is an outline of what I did - watch the video to see the specifics:
  1. Open the Customize User Interface dialog. [One way - type CUI and press the ENTER key at the Command: prompt; I selected Customize from the Workspace Switching tool pop-up menu on the Application Status Bar.]
  2. In the upper left pane, under the ACA node, expand the Ribbon node.
  3. Expand the Tabs node.
  4. Scroll down and expand the Render - ACA node. Make note that the actual name of the Camera panel is Render Camera - ACA. "Camera" is the display text.
  5. Expand the Panels node.
  6. Scroll down to the Render Camera - ACA node and expand it and the subnodes below it to examine its contents.
  7. Select the Render Camera - ACA node and verify the panel preview shows the correct panel. [There are often several similarly-named panels; checking for the actual panel name and verifying the preview can help prevent editing the incorrect panel.]
  8. In the lower left Command List pane, type adjust in the search box.
  9. Select the Adjust command from the list of search results.
  10. Verify that this is the correct command [AECCAMERAADJUST].
  11. Left-click, hold and drag the Adjust tool from the lower left pane up onto the upper left pane and drop it just below the Ribbon Control - Empty Row Aligner item under Row 3 of the Render Camera - ACA panel. Note that I find if I drag straight up to the upper left pane, the pane scrolls in unpredictable ways as the bottom boundary is crossed. That is why I take a somewhat circuitous route over the right panes, crossing over to the upper left pane from its right side. Also note that as you drag across the upper right pane, you will see blue markers to help indicate when you should drop the command. You want to have a blue line with short vertical lines at either end, right under the Ribbon Control - Empty Row Aligner item when you release the left mouse button.
  12. Select the Ribbon Control - Empty Row Aligner item, right click and choose Remove from the context menu.
  13. Select Yes when the alert dialog asks if you want to delete the element.
  14. In the upper left pane, select the newly added Adjust item.
  15. In the lower right pane, edit the properties of the Adjust tool. I chose to duplicate the properties that the 2014 version had. Refer to the image below the embedded Screencast if you do not have a previous version available.
  16. Select OK to dismiss the Customize User Interface dialog and ratify your edits.
  17. Wait for the program to process your changes, and then select the Render tab. You should see the amended Camera panel, with the added Adjust tool.
  18. Select the tool and verify that the Adjust Camera Position dialog opens.


Here are the properties of the Adjust tool in 2014.
As always, click on any reduced-size image to see the image full size; use the back arrow on your browser to return here, if necessary.

April 02, 2014

Revit - Contextual Ribbon Fixes for 2012 & 2013

Those still using Autodesk® Revit® products from the 2012 and 2013 releases but who have installed a 2014 or later release product from Autodesk or have in some other way had .NET 4.5 installed on their computer will find that this creates issues with the contextual ribbons in Revit. Due to the recent overhaul of the Autodesk website and the introduction of the Autodesk Knowledge Network, old links to the required updates (2012 & 2013) and hotfix (2012 only) may no longer work. To save others from the effort to search for the reuqired files, here are the current URL's:

2012 - Make sure you have Update Release 2 for your product installed before applying the hotfix.
Revit Architecture 2012 Update Release 2
Revit MEP Update Release 2
Revit Structure Update Release 2

Hotfix - Autodesk Revit 2012 - Ribbon behaviour due to .Net 4.5 installation


2013 - Install the correct version of Update Release 3 for your product. Note that the "one box" version that ships with the Building Design Suites has a different update file than the Revit Architecture, Revit MEP or Revit Structure versions.
Revit Architecture 2013 Update Release 3
Revit MEP 2013 Update Release 3
Revit Structure 2013 Update Release 3
Revit "One Box" (Building Design Suite) 2013 Update Release 3

October 19, 2013

ACA: AEC Content on the Ribbon

In December of 2009, I contributed an article to AU Tech Talk, about adding tools for AEC Content to the ribbon in AutoCAD® Architecture. That article no longer appears to be available on the Autodesk website, so I am reposting it here:

The out-of-the-box AutoCAD Architecture ribbon tabs include a number of tools that allow you to add AEC content such as elevation and section marks, keynotes, leaders, display themes, schedule tags and schedule tables. 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 the palette on which the tool resides is included 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 you will not want the tool or the palette on which it resides to 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. Depending on what profile is set current, this palette may be called Ribbon Tools – AutoCAD Architecture (US Imperial), Ribbon Tools – AutoCAD Architecture (US Metric), Ribbon Tools – AutoCAD Architecture (UK) or a palette associated with the localized content your are using. 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.

Customization File
Ribbon tools are created in a CUIx file by placing commands on a ribbon panel. Ribbon panels are made visible in the workspace by adding them to a ribbon tab. All of this is done within the Customize User Interface dialog (on the Manage ribbon tab, on the Customization panel, click the User Interface tool, or type CUI at the Command prompt).

Where to create your ribbon customizations will depend upon your particular situation and preferences, but it is generally considered good practice to keep your customizations separate from the out-of-the-box files whenever possible. This will make it easier to track and maintain them, as well as bring them forward when deploying a new version in the future. The example here will make use of a separate CUIx file (AECRibbonTool.cuix), loaded as a partial customization file, to create ribbon tools on a new ribbon panel, which will then be added to a new ribbon 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 even if you want to add your new panel to an existing ribbon tab, you can define it in a separate partial customization file and limit your customization of an out-of-the-box customization file to adding the new panel to the ribbon tab.

Create and Load the Partial Customization File
  1. On the Manage tab, on the Customization panel, click the User Interface tool (or type CUI at the Command prompt).
  2. Click the Transfer tab, if it is not current.
  3. On the right side, click the Create a new customization file button.
  4. In the Save As dialog, navigate to the folder in which you want to save the new customization file, enter a name for the file (AECRibbonTool.cuix will be used below) and click Save.
  5. Click on the Customize tab. At the lower right corner, if the arrow button is pointing to the right (">"), click on that button to expand the dialog. If the button is pointing to the left ("<"), the dialog is already expanded and the button should not be selected.
  6. On the left side, near the top of the Customizations in... pane, click on the Load partial customization file button.
  7. In the Open dialog, navigate to the folder where you saved your new customization file, select the file and click Open.
Create the New Panel
  1. With the Customize User Interface dialog still open, in the Customizations in… pane, verify the drop-down list just below the title bar shows the name of your new customization file (aecribbontool.cuix); if not, select your file name on the drop-down list to filter the information shown to just that of the partial file.
Figure 2 – AECRibbonTool.cuix partial customization file loaded and selected.
  1. In the Customizations in... pane, expand the Ribbon node.
  2. Right click the Panels node, and choose New Panel.
  3. Enter a name for your panel. The example panel will be used on a ribbon tab called "AEC Content", so the panel is named AEC Content - Ribbon Tools. Press ENTER to register the name.
  4. In the Properties pane, notice that both the Name and Display Text properties have been set to your panel name. If you prefixed your panel name with the name of the tab, edit the Display Text property to show just the panel name (Ribbon Tools). This is what will show on the title bar of the panel.
  5. KeyTips provide access to ribbon tools via the keyboard (after pressing the ALT key). For panels with tools in the slideout, enter a string of up to three characters in the KeyTip property to enable the user to expand the panel from the keyboard and access the tools in the slideout. Panels without slideout tools do not need a KeyTip string.
Figure 3 - Ribbon Tools Panel properties.
  1. Repeat Steps 10 - 13 as required to create the panels you need. When you are done creating panels, click the Apply button to save the current changes to the CUIx file.
Populate the New Panel
  1. With the Custom User Interface dialog still open, in the Command List pane at bottom left, click the Create a new command button.
  2. In the Properties pane, enter the following information for the ribbon tool command:
    • Name: Enter the tool name (Vending Machine).
    • Description: Describe the purpose of the tool, for the tool tip.
    • Extended Help File: Optional! See the Customization Guide in the Help for information on creating an XAML file to provide extended help in the tool tip.
    • Command Display Name: Enter a string representing the command macro, for the tool tip (AECRIBBONTOOL Vending Machine).
    • Macro: Enter the macro string that the command will execute directly in the edit box or click on the ellipsis button to enter/edit the macro in the Long String Editor dialog. An AECRibbonTool command macro should look similar to this:
      ^C^C_AecRibbonTool Vending Machine - ribbon;
      Replace Vending Machine - ribbon with the name of the tool palette tool you want the ribbon tool to invoke.
    • Tags: Enter any key words to be associated with your ribbon tool. These are used as part of the command search feature on the Application Menu.
    • Element ID: A default value is entered automatically, and is used to reference the macro programmatically. Enter your own value, if you like.
    • Images: The small (16 x 16 pixels) and large (32 x 32 pixels) images can be specified from external files here, or use the Button Image pane to select from the available images, import a file (BMP) or draw your own.
      TIP: Click the Edit button in the Button Image pane to open the Button Editor. The light gray color at the bottom of the left column of colors will be treated as "clear" allowing the background color of the ribbon to show through, including the blue-green highlight when hovering over a button. Use this color for pixels at the edge, beyond the image proper.
Figure 4 - Vending Machine command properties.
  1. In the Command List pane, left click and drag your newly defined command up onto the Customizations in… pane, position your cursor on the Row 1 node of the ribbon panel created in Step 10 and release the mouse button to add the command to that row.
Figure 5 - Drag-n-drop the command on the panel.
  1. On the right side, you will see a preview image of the panel and have access to the Button Image and Properties panes.
    • Enter a value for the Name property only if you want the ribbon tool name to be different from the command name.
    • Choose a Button Style, which controls the button size and associated text, if any.
    • Most of the other properties will be filled in with the same values as those specified for the command, and changing them here will also change them for the command.
    • Enter up to three characters in the KeyTip property to specify a key sequence unique to the ribbon tab on which the tool’s panel will appear.
  2. Repeat Steps 15 – 18 to create and place additional commands. Add rows, sub-panels, and drop-downs to organize your tools, as desired. When you are done creating and adding commands, click the Apply button to save the current changes to the CUIx file.
Figure 6 – Ribbon Tools panel with Vending Machine as a tool and an Office Equipment split button with three tools on the drop-down.

Create a Ribbon Tab and Add the Panel
  1. Skip down to Step 24 if you intend to add your new panel(s) to an existing ribbon tab. Otherwise, with the Customize User Interface dialog still open, in the Customizations in... pane, right click on the Tabs node and choose New Tab from the context menu.
  2. Type a name for your tab (AEC Content) and press ENTER to register the name.
  3. In the Properties pane, use the Default Display property to set whether or not the tab is automatically added to the Workspace(s) when loaded as a partial CUIx.
  4. Enter up to three characters for the KeyTip property. You must do so for the tab if you want the KeyTips entered for the tools to work.
  5. Skip to Step 25 if you created a new tab for your panel(s). If you are adding your panel to an existing ribbon tab from a different CUIx file, choose All Customization Files in the drop-down at the top of the Customizations in... pane.
    • Expand the nodes to expose Customization File Name > Ribbon > Tabs for the customization file that has the target tab.
    • Expand the nodes to expose the panels to be added, under you newly created customization file (AECRIBBONTOOL).
  6. In the Customizations in... pane, left click and drag the name of the panel to be added (AEC Content - Ribbon Tools) from under the Panels node to the name of the target tab and release the mouse button.
Figure 7 - Drag-n-drop the panel on the tab.
  1. Add additional panels, if you have them. Drag the panel names under a tab to change the order of the panels on the tab.
  2. When you are done adding panels to tabs, click the Apply button to save the current changes to the CUIx file.
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.)
  1. With the Customize User Interface dialog still open, set the drop-down at the top of the Customize in... pane to All Customization Files.
  2. Under the main customization file (ACA in the example here), expand the Workspaces node and select the name of a Workspace to which you want your new tab added.
  3. In the Workspace Contents pane at top right, click the Customize Workspace button.
  4. In the Customizations in... pane, expand the nodes to expose Partial Customization Files > Customization File Name (AECRIBBONTOOL) > Ribbon > Tabs.
  5. Click the toggle in front of each tab name to be added to the Workspace, or click the toggle in front of the Tabs node to add all of the tabs under the node.
  6. In the Workspace Contents pane, select a tab name and review its properties. Tabs can be included in a Workspace but not displayed, if the Show property is set to No. A ToolPalette Group can be associated with a ribbon tab, if you want.
  7. Click on the Done button to exit the editing of that Workspace.
  8. Repeat Steps 29 - 34 to add your new tab to additional Workspaces.
  9. Click the OK button to accept the changes made, close the CUI dialog and return to the drawing.
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.

December 18, 2009

AEC Content on the Ribbon - AU Tech Talk

October 19, 2013 Update: The links to the Autodesk website no longer work for me, so I assume that the AU Tech Talk content has been taken down. I have posted the contents of my article on putting AEC Content on the ribbon in this post.

The December 2009 Edition of the AU Quarterly Newsletter is out. If you do not already receive the newsletter, you can do so by becoming a member of the AU Online site and requesting the newsletter in your profile, under the Preferences category. This edition includes a link to an AU Tech Talk article I wrote about accessing AEC Content from the ribbon. I had a chance to look into this topic more deeply since I last blogged about this topic.

The article is a fairly detailed tutorial (with pictures!) on how to customize a CUIX file to add a ribbon tool that "runs" a tool palette tool, enabling you to add your own custom AEC Content to a ribbon tab. You can access the AU Tech Talk page and look for my smiling face,or go right to the article (sorry, there is a picture of me there, too).