Configuration Settings in CadEnhance Tools


CONFIGURATION SETTINGS (CSETS)

All CadEnhance Tools Use CONFIGURATION_SETTINGS (CSETs) to store options and control tool behavior. 

A CSET is a named storage item used by the tool to control important functions. They can be used to store a file_name, a directory, or it can store a list of items, a list of items and values, or some kind of enable/disable function.

In this view of the main PartBuilder UI, The PART_NAME, NUM_PINS, PIN_REPORT_TYPE,PIN_REPORT_FILE, and the SDL_FILE entries are all stored in a CSET. The 'Extended Settings...' Button will open another UI allowing the user to access and control the values of another larger collection of CSETS.  The Search For Config Setting Button opens another UI allowing the user to search for CSETS by name or Value 

Helpful Videos:

https://scast.cadenhance.com/working-with-csets

Sources of CSET Values

The current value of a CSET can be set from multiple sources.

  1. Tool Defaults

  2. Local Configuration File

  3. Site Configuration Files

  4. User Interactions

  5. Command Line

Tool Defaults:

Every CSET provided by one of the tools has a default setting which can be overridden by the Local Configuration file, any Site Configuration file, or by User Interactions.

Local Configuration File:

This is the Configuration File that was chosen when starting the tool. In the image above, it is displayed in the Working Configuration File shown in the first Entry at the top.
When the user starts the tool, the tool will automatically look for a specially named configuration file in the directory it was started from. If that file exists, it will be selected as the working file and will be loaded. If the file does not exist, the user will be prompted to select a new working file from a list of recent files, or
A File in the current working directory containing CSET_NAME=VALUE pairs. The Items are read in order, and the CSET value is changed to match the Value. While the Values may contain spaces, CSET names generally do not.

If the same CSET_NAME appears more than once in a user config file, the final value of the CSET_NAME will be set to the last value found in the file.

While using the tool, users may change the value of a CSET in a GUI popup window. The new value is used by all subsequent operations in the tool. The modified settings can be saved to the Local Configuration file either through a dialog or using the Save Changes Button on the main UI or Save All Config Settings in the CSET search popup.

If the user modifies a CSET value, they will always be notified and prompted to choose whether to save the changes to the Local Configuration File upon closing the tool.

SITE Configuration File(s):

Site Configuration Files are very important. They are similar to the local configuration files, but they are found in the users SITE Directory. They are used to configure global rules for the tools so that every user at the same organization starts the tools using the same configuration for any CSET listed in these files. Site Files are normally created and modified manually under supervision of the cadEnhance Tool Administrator.

The CSET Search Menu provides a helpful report utility to create the text that can be copied into the Site File.

The SITE Directory can be defined by the CE_SITE_DIR environment variable, otherwise it defaults to: C:\CadEnhance\site in Window or ~/cadEnhance/site on a linux host.

Any File matching *ctl_settings*.txt, *prop_loc_ctl*.txt and *propLocCtl*.txt found in the SITE Directory or any directory below will be loaded:

  1. When the tool starts

  2. When a new Local Config file is chosen, and

  3. When the user selects reload

SITE File CSET Types

There are 2 types of CSET Values that can be loaded from Site Files

  1. Locked Site Settings

  2. Default Site Settings

 

Locked Site Settings:

These are entered as CSET_NAME=VALUE pairs with no prefix. Locked settings can be overridden temporarily by a user, but the new value will NOT be stored in the LOCAL config file when it gets saved.
The only way to permanently change the value is to change it in the SITE File.

Default Site Settings

These are entered as !SITE_DEFAULT:CSET_NAME=VALUE pairs with the !SITE_DEFAULT: Prefix.

They override the Tool Default Value and provide the way for all users of a tool at the same organization to start with the same Settings, but their value can be changed by the LOCAL Configuration file.

 

User Interactions

The value of a CSET can be changed when users interact with the GUI. Many CSETS can be accessed in several places within the Tool.
The main GUI may provide an entry or check button to change the value of the CSET, and a subsequent popup GUI may provide access to the same CSET for convenience.  
The Configuration Settings Popup Gui is available in every tool and provides access to EVERY available CSET, some of which may not be accessible in any other menu.

The CSET Search Menu provides a convenient way to find and modify a CSET or group of related CSETS based on Name, Value or Category.

Command Line

If the tool is started from the command line in windows or Linux, extra arguments may be added on the command line CSET_NAME=VALUE

CSET precedence

When the user opens the tool, selects a new Configuration file, or reloads the tool, The final value of each CSETS is determined in a controlled fashion.

  1. Every CSET is initialized to the default value coded in the tool.

  2. CSET_NAME=VALUE pairs from the SITE Files are applied to change the default values. Here the tool tracks whether each pair in the file was a Locked Site Setting or a Default Site Setting.

  3. CSET_NAME=VALUE pairs from the Local Configuration files are applied to the selected CSETS (unless the Value of the CSET_NAME was set by a Locked Site Setting)

  4. Finally, any CSET_NAME=Value pairs from the command line are applied