Problem loading default.cui as partial cui
Hello everybody,
I am trying to follow this tip by Anthony Apostolaros (#12). But I can't seem to get this to work. These are my steps:
1. BC 10.3.11 is installed without any CUI changes.
2. Create an empty partial CUI Test.cui. See code below.
3. Select Test.cui as the main CUI.
4. Load default.cui as a partial CUI. This looks very promising at first: all the toolbars are displayed, but hitting Apply or OK result in the default.cui being "rejected".
What am I doing wrong?
Thanks in advance, Roy.
Test.cui:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<CustSection xml:lang="en-US">
<MenuGroup Name="TEST"/>
</CustSection>
Comments
-
I didn't start with an empty CUI file. Maybe that's the problem? I started with default.cui, adding my custom menu folders to it and then saving it as ANA.cui.
After the first update, I attached ANA.cui as a partial to the new default.cui. Of course, that resulted in a lot of duplication, so then I deleted all the non-custom folders from ANA.cui.
After that, there was still the problem that the context menus in default.cui were used instead of mine. That's how I hit on the idea of reversing the roles of the two files.
Since my custom menu started out as default.cui, it may contain certain code without which a partial CUI can't be attached, code which may be missing from your empty CUI file.0 -
Anthony you are right. My Test.cui was just a little "too empty". MenuContainer.cui (see code window below) seems to be the absolute minimum for a main CUI.
<?xml version="1.0" encoding="UTF-8"?>
<CustSection xml:lang="en-US">
<Header>
<CommonConfiguration>
<CommonItems/>
</CommonConfiguration>
</Header>
<MenuGroup Name="MENUCONTAINER">
<MenuRoot>
<ToolbarRoot/>
</MenuRoot>
</MenuGroup>
</CustSection>0 -
Strange:
After some experiments I find that the context menu from the last partial CUI is used, and not the context menu from the main CUI. Maybe this priority order is version dependant?0 -
I haven't changed to v10 yet (I haven't had any work), but Greg Hahn, in post #17 in the forum thread you linked to, reports that the priority order changed with v10.
The new way is the logical way to do it, if partial CUI files are intended to contain customization. But it means that the idea of making one's custom file the main CUI file is no longer advisable. The obvious choice now is to use default.cui as the main menu file, with one's customized file a partial CUI attached to it; and then to re-attach it after each update.
0 -
Thank you Anthony for pointing that out.
The way to go for BC10 if you want to keep your menu customization when changing to a new version of Bricscad, but also want your own context menu to have priority seems to be:- Create an empty menu container MenuContainer.cui (see my post #3) using a text-editor.
- Load MenuContainer.cui as the main CUI.
- Load Bricscad's default.cui as the first partial CUI.
- And then load your own partial CUI-file(s). The context menu from the last partial CUI will have priority over the menus from other CUI-files.
0 -
Good idea!
0 -
I'm trying out v16, and finding differences in the Customize dialog since v13. I can't rename any of the Main Menus in default.cui, which is loaded as a "partial" cui file to my container cui file. In v13 I was able to rename any menu by editing the "Title" field, but that doesn't work in v16. The Customize dialog accepts the editing, but when I close the dialog I find that the menu bar hasn't changed to reflect my editing.
I found that I was able to rename menus in v16's default.cui while it's loaded as the "main" cui file. But doing so damaged the file in some way, so that several of the menus didn't appear at all on the menu bar, and when I changed back to my container as "main" with default.cui as "partial," the changes I had made didn't appear, neither in the way I had tried to make them nor in the damaged way with several menus missing, and neither in the Customize dialog nor in the actual menu bar.
Is there any way to rename a menu in a "partial" cui file now?0 -
Display issues could potentially be due to the influence of workspaces. Workspaces govern what menu/toolbar items are displayed.
I would try unloading then reloading the partial cui. This will clear the workspace settings. By default when you load a partical cui for the first time all menus are shown across all workspaces.
Workspaces came in starting with V15.
Regards,Jason Bourhill
0 -
Thanks for the tip, Jason. Unloading and reloading default.cui as a partial CUI file did get the Customization dialog working properly.0