Customizing Bricscad - Keeping my customization and new tools added

Hi,

     Before an update, I renamed my default.cui file as custom.cui file and load it as my main cui file.  I have made a lot of customization (new toolbars, mouse click, change some Bricscad command, change som Bricscad button image etc.) and don't want to lose it.

After the update, I considered the "Customizing Bricscad" Help article:

"However, if new tools are added in an update, you will not be able to access them until you load the new default.cui."

"Another approach to keeping your menu customization when changing to a new version of Bricscad is to make your custom CUI file the "main" CUI file (see: To load a main cui file), and attach "default.cui" to it as a "partial" CUI file (see: To load a partial cui file). Then you don't have to do anything when you update."

But when I try to load the new default.cui file as a partial cui, I got the following error message: "Unable to load CUI file: MenuGroup Bricscad already exists."

Maybe I missed one thing?

Thanks

Comments

  • I am afraid that your approach is flawed. You have added all your customizations to the default.cui. That is not a good starting point for keeping your customizations separate. Having said that, the advice from BricsCAD is not perfect either. If you load the default.cui as a partial menu its 'customizations' will have priority over those in the main menu. The best advice is to use an (almost) empty menu as the main menu (MenuContainer), then add BricsCAD's default.cui and finally add a new partial menu for your own customizations (or an existing partial menu if you already have one). This approach should give you the least problems when updating and also ensures that your 'stuff' has priority.

    Here you can find a previous discussion on this topic and an example of an empty main menu.

    If I were faced with your current situation I would follow these steps to try and sort things out:
    0. MAKE BACKUPS OF ALL MENU FILES FIRST!!!
    1. Load MenuContainer.cui as the main menu.
    2. Load the new default.cui from BricsCAD as the first partial menu.
    3. Create a new partial menu to hold your customizations: custom_new.cui.
    4. Open your old custom.cui in a (plain) text editor and look for:
    5. Change this to:
    6. Load the modified custom.cui as the third partial menu.
    7. Try to add as much as possible from the old custom.cui to custom_new.cui.
    8. Unload the BRICSCAD_TEMP partial menu.

    A completely alternative approach is to use file comparison software and create your new partial menu in a text editor with xml syntax highlighting.
  • OOPS... Point 4 and 5 got mangled by the forum they should read:
    4. Open your old custom.cui in a (plain) text editor and look for: <menugroup name="BRICSCAD">
    5. Change this to: <menugroup name="BRICSCAD_TEMP">
  • Might be worth considering confining customisations to a file you add on, leave the factory CUI to what it wants to do.

    I wrestled with main menu changes for years, at least MNU's worked in a text editor.

    Icad98 came along with ICM - it worked like CUI, but later got dropped in favour of it for compatibility I guess.

    Having committed to ICM I wouldn't be caught again so reverted to using a MNU file which is appended with each upgrade and edited outside Bcad as necessary.

    Old fashioned, but customised menus are very portable. Perhaps not the answer to Jean-François' immediate issue, but it will happen again in future.

  • Hi Jean

    You might like to take a look at the sample cad library on my website
    http://www.cadconcepts.co.nz/sample-cad-library-v13/

    Created it to demonstrate some of the different customisable elements available with BricsCAD. It uses a partial cui, rather than playing with the base/main cui. You may be able to utilise the folder structure to sort out your own setup.

    If you must customise the default cui, then I would recommend that you copy it to a different location and rename it, along with the menugroup reference. Which you would have to repeat each time Bricsys update it.

    Notepad++ http://notepad-plus-plus.org/ has formatting for xml & LISP. You can also open using the excel 2010, but it may not allow you to save changes.

    Regards,

    Jason Bourhill

    CAD Concepts


  • Thanks all for your advices.

    I'll have to create a partial CUI for sure. 

     Roy, can you tell me why we have to create an empty container?  I can just use the default.cui and load my partial CUI in it?

    I have two questions with the partial CUI regarding what I'm tryting to do:

    If I have modified some Bricscad commands (such as copy with basepoint: I add an icon on it and add 0,0,0 in the command and put it in one of my customize toolbar) I'll lost it everytime I'll do an update?  Is there a way to keep it?

    My cuswtomize Files menu wich I can save in my partial CUI will append when I'll load it.  But, it will be the last in line and the Files menu of the default CUI will still be there, first in line.  Will it be possible to move my customize Files menu to be the first and to eliminate the default Files menu forever (i.e. suppose I dont't want to delete it update after update).  

                                          

  • @ Jean-François

    1. Do you have to create an empty container?
    No. The empty container is really just a way to combine the 'convenience' of not having to do anything when you update, with loading your customizations as the last partial menu. And the level of convenience is relative: for every major version (e.g. when you upgrade from V13 to V14) you will probably still have to set things up manually. The empty container concept can be useful if you have more than one partial menu that you want to load in a particular order:
    --MenuContainer.cui (main menu)
    ------MyMenuCustomizations.cui
    ------default.cui
    ------MyMouseCustomizations.cui
    ------MyFavoriteApplication.cui

    2. If you customize a BricsCAD tool will this customization be lost when you update?

    If you first add the tool to your own menu, effectively copying the tool, your customizations won't be lost. But if you edit a BricsCAD tool that is part of the bricsCAD menu your customizations will be lost. This is what is wrong with your old approach.

    3. Can you influence the order of the items in the menu bar?
    Yes it all depends on the order of the main and partial menus. In the example above the items from MyMenuCustomizations will come before those in the default.cui.

    4. Can you (permanently) switch of a menu item in the default.cui so that you don't have to erase the item when you upgrade?
    To my knowledge this is not possible.

    Not one of your questions (in a way the opposite of question #2), but interesting none the less:
    5. Can you add a BricsCAD tool to a custum menu without copying the tool, so that the custom menu always uses the latest version of the tool?
    Yes, but if you want to do that you have to edit the menu manually. Inside a .cui file you can use the 'dot' notation to reference tools from other menus.
    Example:
    <MacroRef MenuMacroID="BRICSCAD.copy"/>
  • Thank you very much Roy. 

    You make things clearer for me!  Very very helpful!

  • Hi

    Just bumped into this issue. I want a different layout for my edit-context menu and also ' on some of my esnaps to keep them sticky.

    Thought I vas smart and created new edit-context menu in my partial .cui. ( should it not override? ) THAT didn't work. How do I get this to stay when updating.

  • Patrik, that should work. The context menus in the partial CUI file should override those in the main file.

    Are you customizing the right context menu? There are 3 of them:
    - Command works when a command is active,
    - Edit works when no command is active but there is a selection set, and
    - Default works when there's no active command or selection set.

    (default.cui lists 13 others, but I don't know what they're for)
This discussion has been closed.