BackToCAD Technologies LLC |  Artificial Intelligence and Software Developing  |  Clearwater, USA; Stuttgart, Germany |  Kazmierczak®  Company

Customizing the main window using a .cui file

 

Many users customize areas of the CADdirect 2022 main window, namely menus and tool-bars, using the Customize command. Another method is to edit a single .cui file using any ASCII or Unicode text editor to contain the settings you want for the following areas of the CADdirect 2022 main window:

 

  • Ribbon
  • Workspaces
  • Menus
  • Toolbars

 

Customizing a .cui file using an editor

 

A .cui file is an XML file format, which can be edited using any ASCII or Unicode text editor. However, it is best to edit .cui files using an XML editor such as Visual Studio or Notepad++. If you are developing with CADdirect 2022, you already have Visual Studio.

 

Use caution when manually editing a .cui file and use the following tips about the for-mat of the file:

 

Content of .cui files is case-sensitive. For example, the following is correct; no errors will be shown but ID attribute will be ignored:

 

<ToolTip id=”123”>Help</ToolTip>

 

The following is also correct; ID will be equal to 123:

 

<ToolTip ID=”123”>Help</ToolTip>

 

Content of .cui files contains special symbols, similar to an .xml file: & (ampersand), ‘ (quote), and more. Replace these special symbols with corresponding escape sequence or use XML CDATA structure instead. For example, the following is not correct:

 

<ToolTip id=”123”>&Help</ToolTip>

 

Correct:

 

<ToolTip ID=”123”>&amp;Help</ToolTip>

 

Not correct:

 

<Command>’_HELP</Command>

 

Correct:

 

<Command><![CDATA[‘_HELP]]></Command>

 

Properties of several entity types can be described in both node-style and attribute-style. For example, the following two toolbar buttons are the same:

 

<ToolbarButton UID=”unique-id” IsSeparator=”true

 

Visibility=”CUI_LEV_ALL,CUI_MDI_OPN,CUI_OLE_SEM”

 

EntityVisibility=”RCM_ENT_ACS,RCM_ENT_MUL”/>

 

<ToolbarButton UID=”unique-id”>

 

<IsSeparator>true</IsSeparator>

 

<Visibility>CUI_LEV_ALL,CUI_MDI_OPN,CUI_OLE_SEM</Visibility>

 

<EntityVisibility>RCM_ENT_ACS,RCM_ENT_MUL</EntityVisibility>

 

</ToolbarButton>

 

To customize a .cui file using an editor

 

Do one of the following to choose Customize:

 

  • On the ribbon, choose Tools > Customize (in Manage).
  • On the menu, choose Tools > Customize.
  • Type customize and then press Enter.

 

Click the Menus tab, then click Export.

 

Specify the directory and file name you want to use to save the menu file.

 

In Save as Type, select CUI Customizations file (.cui).

 

Click Save, then Close.

 

In any ASCII or Unicode text editor, open the .cui file and make changes according to the following format.

 

There are many editors, but if you are developing with CADdirect 2022, you already have Visual Studio, which is a good XML editor for .cui files.

 

Understanding versioning of a .cui file

 

Each .cui file has a node that controls versioning:

 

<FileVersion MajorVersion=”1” MinorVersion=”2” UserVersion=”0” IncrementalVersion=”91”/>

 

  • IncrementalVersion Must be incremented with any change in the Icad.cui file.
  • UserVersion Incremented automatically when a user customizes CADdirect 2022. In the default Icad.cui file, this must be always equal to 0 and never edited manually.
  • MinorVersion Must be incremented with a change or creation of a versioned entity (PopMenu, Toolbar, MenuMacro->Macro, ...).
  • MajorVersion Must be incremented with the following:
  • Change of Icad.cui file schema (for example, added/deleted sections or added new type of entities).
  • Deletion of a versioned entity.
  • Change of UID attribute of an existing versioned entity or change of Name
  • If MajorVattribute in ersion is incremented, the user’s case of a Workspace entity. .cui file will be replaced with an updated .cui file.

 

The .cui file also contains versioned entities: Workspace, MenuMacro->Macro, Pop-Menu, Toolbar, AppButton, QuickAccessToolbar, RibbonPanelSource, and RibbonTabSource. Each versioned entity also has a node:

 

<ModifiedRev MinorVersion=”2”/>

 

After a versioned entity is modified or created, FileVersion->MinorVersion must be incremented, and then the result must be assigned to ModifiedRev->MinorVersion of the modified entity.

 

Understanding the format of a .cui file

 

A .cui file can contain settings for the following areas of the CADdirect 2022 main window:

 

  • Ribbon
  • Workspaces
  • Menus
  • Toolbars

© Copyright 2021 BackToCAD Technolgies LLC . All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. CADdirect 2022 is a trademark of Expert Robotics Inc. Print2CAD and CAD2Print are Trademarks of BackToCAD Technologies LLC. DWG is the name of Autodesk’s proprietary file format and technology used in AutoCAD® software and related products. Autodesk, the Autodesk logo, AutoCAD, DWG are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. This website is independent of Autodesk, Inc., and is not authorized by, endorsed by, sponsored by, affiliated with, or otherwise approved by Autodesk, Inc. The material and software have been placed on this Internet site under the authority of the copyright owner for the sole purpose of viewing of the materials by users of this site. Users, press, or journalists are not authorized to reproduce any of the materials in any form or by any means, electronic or mechanical, including data storage and retrieval systems, recording, printing or photocopying.