Monday, February 23, 2009

How to edit CUIx files introduced in AutoCAD 2010

CUIx (customization files) is a new thing in AutoCAD 2010 replacing the CUI (legacy customization files). The best and safest way is to use the CUI command within AutoCAD. Second choice is using the API but if you are careful you can edit them in an XML editor like XML Notepad (not supported by Autodesk).

The CUIx files is just a ZIP container (just like DOCx, XMLx and DWFx) so you can rename it to have a zip extension and you will be able to unzip its content. If you use for example 7-zip you can just right click and unzip the CUIx files directly.

If you load a CUI file into AutoCAD it is automatically converted to CUIx.

Here is for example the content of acad.cuix. The file contains several cui and xml files.

 acad.cuix

This explains why the CUIx files makes the Ribbon and CUI work quicker than in AutoCAD 2009. Because the content is split into several files loading often is quicker than having to load the whole CUI. This also improves performance when you have the CUIx files on a network as the compression/decompression happens on the local machine and there is no need to send the quite large CUI (text based XML) files over the network.

CUIx files also allows bitmaps (like BMP or PNG for icons) to be included and is improving performance. Resource DLL’s can still be used. But compared to having hundreds of bitmaps on the network having them in the CUIx is much better.

Finally. The MNR files are still used by AutoCAD as the CUIx files are automatically converted to MNR when needed.

8 comments:

  1. Hello,
    I have a question.
    What version of NET Framework is installed with AutoCAD 2010?
    Thank you,
    Quinn

    ReplyDelete
  2. It is .NET Framework 3.5 SP1 that comes with AutoCAD 2010.

    ReplyDelete
  3. [quote]Resource DLL’s can still be used. But compared to having hundreds of bitmaps on the network having them in the CUIx is much better.[/quote]
    I disagree on this. If you have hundreds of bitmaps the zipping and unzipping is much slower!
    With over 600 bitmaps the CUI command is getting real slow when you have to compile the menu again.
    If your CUIx has so many bitmaps you can make the compiling faster if you put the bitmaps in a .dll. Another option is to make a small CUIx with bitmaps first and when everything seems to be working OK, use transfer to bring those changes to your main CUIx.

    ReplyDelete
  4. Jasper, thanks for sharing your experience.

    ReplyDelete
  5. We have about 300 bmps and the cuix is very slow when loading (about 10 seconds).
    What does that mean to "put the bitmaps in a .dll"?
    There is no way to make it faster in the "simple" cui-editor and we have to program over wpf-interface?
    The other option (making small cuix first,..) is not working for us.
    Thanks,
    fritz

    ReplyDelete
  6. fritz, to put bitmaps in a resource DLL did not help according to Jasper's experience but if you want to try it you have to find a program that can do this.

    ReplyDelete
  7. Jimmy,
    Any recommendations for a program that will compile your bitmaps into a .dll?

    Fred

    ReplyDelete
  8. Fred, I use tools that comes with Visual Studio for it but I guess there are several other Resource Editor programs for this specific purpose.

    ReplyDelete