The good news is that the ribbon controls are still defined in the ACA.cuix and MEP.cuix and that it is relatively easy to add whichever ones you like to a ribbon panel and add that panel to the ribbon tab of your choice. I made a Screencast to show just how easy it is. I do not have a good setup for adding narration to the Screencast (and I am not particularly skilled at talking and doing at the same time, either), so I will include some notes here on the process, in case it is difficult to see on the Screencast. You can click on the double diagonal arrow icon in the lower right corner of the embedded Screencast to go to full-screen mode, or you can hover over the Screencast and click on the title in the upper left corner to view the Screencast on the Screencast website. You will be able to see the command timeline on the Screencast website.
Notes:
- The examples shown in the video are just that, examples to demonstrate the techniques. Want a different arrangement, or want to add and/or remove commands and controls? Go for it - it is, after all, your customization.
- Creating a new ribbon panel requires using the Customize User Interface dialog. You can type CUI at the command prompt, or use the Workspace Switching tool on the Application Status Bar, and selecting Customize on the pop-up menu. The Screencast shows the latter method.
- I prefer, and recommend, that customizations be created in a separate customization file other than aca.cuix or mep.cuix, even if you eventually intend to add the customizations to those files. This makes it easier to back up your customizations and to move to later releases without having to drag the old main CUIX file along with you, possibly missing out on new features added to the new aca.cuix or mep.cuix. To do so, I use the Transfer tab to create a new customization file, which I then load as a partial customization file on the Customize tab, in the upper left pane.
- After loading the new partial customization file, the upper left pane will show just that file, and you will note that there are no commands shown in the lower left pane, because this CUIX is currently "empty".
- To get a list of commands and controls to add to our new file, change the setting of the upper left pane to show All Customization Files, using the drop-down list. Scroll down in the upper left pane, if necessary, and expand the following nodes: Partial Customization Files, your customization file name and Ribbon.
- Select the Panels node, right click and choose New Panel from the context menu. Give the panel a name, such as Properties.
- Right click on Row 1, and choose New Sub-Panel. Repeat this a second time, to add a second sub-panel. You could just add rows, and stack things up that way, but creating two sub-panels to handle two columns of controls builds in some flexibility, as you will see later in the Screencast.
- Right click on Sub-Panel 1 and select New Row to add a second row to the Sub-Panel. (Commands and Controls are always added to rows, so each panel and sub-panel will always start with one row when created.) Add a third row to this panel, and then add two additional rows to Sub-Panel 2.
- The framework is now in place for the first ribbon panel, and we need to add the Commands and/or Controls we want. In this example, all of the items are Controls, so the first thing to do is, in the lower left pane, change the selection in the drop-down list from All Commands Only to All Commands and Controls.
- Using the search feature in the lower left pane, search for the Command or Control you want to add. (You can scroll the list, but it will be easier and faster if you type in a key word or two to narrow the list.)
- When you find the item you want, such as the Object Color Gallery, left click, hold, and drag it to the upper left pane. I find that if I take the direct route, straight up, that the upper left pane will usually scroll away from the place I want to put the item, so I usually swing over to the right side and then up and back over to the upper left pane, entering it from its right side. There will occasionally still be some scrolling, but generally not enough to move the destination beyond the visible part.
- Hovering over the destination row in the upper left pane, release the left mouse button to add the control to that row. To see a preview of the results so far, select the panel name, or any part of its "structure," such as a row or sub-panel. The preview will show in the upper right pane.
- Repeat the previous three notes for each additional Command or Control you want to add to your panel. I added the Layer List Combo Box, Ribbon Combo Box - Linetypes, Ribbon Combo Box - Lineweight, Transparency Method Drop-down (changing the button style from Small Without Text to Small With Text and Transparency ribbon controls in the example). See below for additional observations on the Transparency Method Drop-down.
- Now that the panel is completed, it needs to be added to a ribbon tab, so that it can be displayed in the workspace. I chose to create a Test 01 panel in the newly created partial customization file. You may want to add it to an existing tab in another CUIX file that you have loaded. If you do so, note that this will copy the panel into that CUIX file, so any future changes would need to be made in both places. Right click on the Tabs node (under the Ribbon node) and choose New Tab from the context menu and then give the new tab a name.
- Left click and hold the Properties panel node under the Panels node, and drag it up to the destination tab. In this example case, there are no other panels on the Test 01 tab, but if there are panels on the tab where you are trying to place a panel, you can drag the mouse (with the left button still held down) to the desired position (indicated by a blue horizontal line) relative to the other panels where you want the new panel placed. When you have the right position, release the left mouse button to add the panel to the tab.
- If you created a new ribbon tab, select the tab to see its properties. If the Default Display property is set to Add to workspaces, when you load the partial customization file, this tab should be automatically added to all Workspaces in the main CUIX. This will not occur now, because we added the ribbon tab after we loaded the partial customization file.
- Select the OK button to close the Customize User Interface dialog. Note that the new ribbon tab did not appear in the interface. (If you added your panel to an existing tab that was already in the current Workspace, you can skip the next few steps.)
- Re-open the Customize User Interface dialog. Under the main customization file (ACA in this example, as I did the Screencast using AutoCAD Architecture 2016), in the upper left pane, expand the Workspaces node, if necessary, and select the current Workspace. In the upper right pane, expand the Ribbon Tabs node and note that the Test 01 tab is not on the list.
- Select the Customize Workspace button at the top of the upper right pane. Note that all the items in the upper right pane turn blue. This indicates that you are in the Workspace editing mode.
- In the upper left pane, find and expand the customization file that has the ribbon tab with your new panel. Expand the Ribbon node and then expand the Tabs node. Note the toggles in front of the items that can be added to a Workspace while you are in Workspace editing mode. In the Screencast, I clicked on the toggle in front of the Tabs node to add all of the tabs to the current Workspace, since there was only one tab in that customization file. If you have multiple tabs, and you do not want to add all of them to the current Workspace, use the toggles in front of each individual tab to control which ones are in the current Workspace.
- Back in the upper right panel, notice that the Ribbon Tabs node expanded itself and the newly added tab is shown, in black type. You can drag the tab to a different position in the listing if you do not want the new tab at the end; I chose to leave it at the end.
- Select the Done button in the upper left pane to ratify the changes made to the Workspace, and to exit the editing mode. Select the OK button to close the Customize User Interface dialog and to confirm the changes made. Give the program a few moments to process the change and display the new tab in the interface.
- Those who added the new panel to an existing ribbon tab can jump back in at this point. Select the tab with the new panel to make it current, and check out the Commands and Controls you added, to verify that they work as expected. You have successfully created a new panel, with properties-related controls, and had it displayed in your Workspace.
- The balance of the Screencast shows the creation of a second panel, this time with just one "column" of controls, placing those beyond the third row in the "Slideout". These can be seen by selecting the panel title (which will feature a downward pointing arrow icon to let you know there are more tools). It also shows the benefit of having used sub-panels in the first example, as we can copy those to the new panel to get that panel started.
- Reopen the Customize User Interface dialog, and, in the upper left pane, find and expand the node for the new partial customization file created for the Properties panel. Expand the Ribbon and Panels nodes.
- Expand the Properties panel node, and the Row 1 node beneath it.
- Create a new panel by right clicking on the Panels node and choosing New Panel. Provide a name for the panel; in the Screencast, I used Properties 2.
- Rather than start this version of a Properties panel from scratch, I chose to copy the sub-panels from the previously created one. Select Sub-Panel 1 under Properties (under Row 1), right click and select Copy from the context menu.
- Select Row 1 under the Properties 2 panel, right click and select Paste from the context menu. A copy of the panel will appear.
- Select the Properties 2 panel and add a new row. Notice that since Row 1's sub-panel fills all three rows that are always visbile, Row 2 appears under the SLIDEOUT item.
- Copy Sub-Panel 2 from the Properties panel, and paste it to Row 2 under the Properties 2 panel.
- I chose to add two additional rows to the sub-panel under Row 2, and add the Locked layer fading and Xref fading Controls to them.
- In order to test the new panel, I added it to the Test 01 ribbon tab, and then selected the OK button to ratify the changes and return to the drawing.
- The Properties 2 panel now appears on the Test 01 ribbon tab. The three Controls from the original Sub-Panel 1 appear on the panel, and the Properties 2 title bar has a downward-pointing arrow icon adjacent to the panel name.
- Selecting the panel title expands the panel and displays the balance of the Controls. Selecting the pin icon at the left side of the expanded panel title pins the panel in the expanded position. (Press again to un-pin the panel.)
I did not look at the vanilla AutoCAD Properties panel (ACAD.cuix) prior to creating this video. This version stacks all of the controls in one "column", but includes a large button for the Match Properties command, which could easily be added to the Properties 2 panel I created, by placing it on Row 1, before the Sub-Panel on that Row. I also failed to include the Plot Style Gallery Control. This could easily be added to Properties 2 by adding another row to the Row 2 Sub-Panel. A third Sub-Panel would be required to add another Control to the Properties panel, provided that you want all the controls to be visible all the time for that version. The vanilla AutoCAD version also includes a dialog launcher (indicated by the open arrow icon at the far right side of a panel title bar) for the Properties palette. This can be added to either of the panels created in the Screencast by dragging the Properties command (from the ACA or MEP customization files; choose the one with the Element ID of ID_Modify) up to and drop it on the Panel Dialog Box Launcher item. The image below shows the Properties and Properties 2 panels, with the Properties 2 panel pinned open. The Plot Style Gallery Control and the Properties dialog launcher have been added to the Properties 2 panel in the image below. The Match Properties tool was not added, as that is available on the ACA and AMEP Home ribbon tab, Modify panel.
You may have noticed that there were two Transparency Method Drop-down ribbon controls, and that I selected the one further down on the list, rather than the first one. I tried using both, and found that the "upper" tool would not allow me to set the drawing default transparency (with no object selected) and would not change the displayed value when the drawing default setting was changed, whereas the "lower" tool did both. I cannot promise that these two controls will always maintain that repsective relationship, but if you make certain that the current drawing default value is set to ByLayer before you open the Customize User Interface dialog to begin creating your panel, the "right" control will display the ByLayer icon (three stacked parallelograms, top one blue, other two white). The "wrong" control will show the "Use Current" icon (thin blue square around what looks like closely packed blue dots) and text, if you change the button type to Small With Text.
No comments:
Post a Comment