Customizing Your Environment on UNIX

This task explains how to customize an existing environment on UNIX.

To create or customize an environment using the catiaenv command

There is now an interactive tool available for customizing values for runtime environment variables: the catiaenv command. 

Run the command as follows:

UNIXInstallPath/OS/code/command/catstart -run CATIAENV

where  "OS" is:

  •  aix_a
  •  hpux_b
  •  solaris_a.
The Environment Editor appears. The user interface and functions are the same as on Windows. For more information, refer to the Windows description of the Environment Editor.

To create or customize an environment using the setcatenv command

The setcatenv command is available for customizing environments.

Run the command as follows:

UNIXInstallPath/OS/code/command/catstart -run setcatenv

where  "OS" is:

  • aix_a
  • hpux_b
  • solaris_a.

The full list of options for the command:

setcatenv

is as follows:

Operating Environment Options

These options specify the general operating environment:
  • -cs: specifies the name of the product line for which the environment is being created. 

    The value is CATIA (default) for the CATIA product line.

    ENOVIAV5VPMENOVIAV5VPM

  • -e: environment file name ; the "-e" option is mandatory
  • -d: specifies an existing directory in which the environment file will be created ($HOME/CATEnv by default); the directory is not created if it does not exist
  • -p: specifies the installation directory, and is mandatory (by default, set to the default installation directory: UNIXInstallPath)
  • -server: creates an environment suited for server type environments. The CATUserSettingPath variable value differs between a server environment and an interactive environment. The "-e" option is mandatory when specifying server environments, and always overwrites an existing environment with the same name. Consequently, system administrator rights are required for using this option.
  • -cf: specifies the name or path of an existing environment from which you create a new environment.
    For example, the command:
    setcatenv -e MyNewEnv -cf CATIAEnvironmentName
    creates the new environment MyNewEnv from a copy of CATIAEnvironmentName.
    This allows you to inherit previous customizations without having to recreate them in the new environment.
    For example, the CATReferenceSettingPath variable is frequently used to store settings locked by the administrator, and may concatenate several different levels of settings. Copying an existing environment saves you time because you do not having to customize the new environment.
    Note that if you do not use the "-cf" option, all the variables are set with their default values in the new environment. If only the name is specified in the "-cf " option, the template environment is searched in the default storage directories (user or global).

Behavior Options

These options determine a type of behavior when creating or updating environments:
  •  -v yes/no:
    • -v yes (default): verbose mode
    • -v no: non-verbose mode.
  •  -new yes/no:
    • yes (default): an environment with the same name (if it exists) is overwritten
    •  no: if an environment has the same name, this time it is not overwritten (nothing happens)

    However, note that if no environment using the same name is detected, a new environment is created in both cases (whether you use "yes" or "no").

  • -desktop yes/no: sets up the desktop representation of the environment, if it does not already exist. The default is "yes".

Action Options

These options specify a particular creation or modification action:
  • -a user/global: specifies whether you are creating a user or global environment. The default value is "user". Note that you need administrator rights to create a global environment.
  • -regserver: registers the application on the workstation by adding or modifying a certain number of files required to support dragging and dropping of documents inside the desktop environment, and associates the behavior when double-clicking Version 5 documents. This needs to be performed for each product line.

    This option creates the following files for the CDE Desktop:
    • $HOME/CATEnv/CATCDE/CATIA/dt/appconfig/types/C/CATIAFiles.dt (action description file for CATIA document types)
    • $HOME/CATEnv/CATCDE/CATIA/dt/appconfig/icons/C (contains icons for document types)
    • $HOME/CATEnv/CATCDE/CATIA/dt/appconfig/types/C/CATIA.dt (action description file for CATIA directory in the CDE desktop)

    ENOVIAV5VPMENOVIAV5VPMENOVIAV5VPMENOVIAV5VPMENOVIAV5VPMENOVIAV5VPMENOVIAV5VPM

    If a base configuration is already installed, this option serves no useful purpose since the desktop environment is already present. Only use the "-regserver" option if no base configuration is already installed. It should be used after creating a reference environment, and can be used only by an administrator.

  •  -h: displays help.
Any environment created by either an administrator or an end user using the setcatenv command is a user (not global) environment.

What Is the Impact On My Workstation?

Creating a global environment GLOBAL1 and a user environment USER1 using the setcatenv command creates the following files:

$HOME/CATEnv

Default environment:

CATIAEnvironmentName.txt
DELMIAEnvironmentName
ENOVIADMUNavigatorEnvironmentName
ENOVIAV5VPMEnvironmentName
ENOVIA3dcomEnvironmentName

Global environment: 

GLOBAL1.txt 
The name of this environment is specified by using the "-e" option

User environment: 

USER1.txt 
The name of this environment is specified by using the "-e" option.

On AIX, HP-UX, SUN systems running the CDE desktop

The setcatenv command creates in your $HOME directory the following filetree:


$HOME/CATEnv/CATCDE/MyProductLine/dt/appconfig/appmanager/C/MyProductLine
/etc/dt/appconfig/appmanager/C/MyProductLine

Contains files required for graphic representation of the default global environment and global environment in the CDE desktop:

CATIAEnvironmentName
ENOVIADMUNavigatorEnvironmentName
DELMIAEnvironmentName
ENOVIAV5VPMEnvironmentName
ENOVIA3dcomEnvironmentName
GLOBAL1


$HOME/CATEnv/CATCDE
/MyProductLine/dt/appconfig/types/C
/etc/dt/appconfig/types/C

Action description file for default global environment and global environment icon:

CATIAEnvironmentName.dt
DELMIAEnvironmentName
ENOVIADMUNavigatorEnvironmentName
ENOVIAV5VPMEnvironmentName
ENOVIA3dcomEnvironmentName
GLOBAL1.dt

Action description file for MyProductLine directory:

CATIA.dt


ENOVIAV5VPM

(file created by the option "-regserver"; the file name depends on the product line).

Action description file for MyProductLine document types:

CATIAFiles.dt
(file created by the option -regserver; identical for all product lines).


$HOME/CATEnv/CATCDE
/MyProductLine/dt/appconfig/icons/C
/etc/dt/appconfig/icons/C

Icons for MyProductLine document types.

Files created by the option -regserver; file names depend on the product line.


$HOME/.dt/appmanager/My_
MyProductLine

File required for graphic representation of user environment in he CDE desktop:

USER1


$HOME/.dt/types

Action description file for user environment icon:

USER1.dt

Note: the files MyProductLine.dt and CATIAFiles.dt are not present in this directory because they are already present in: $HOME/CATEnv/CATCDE/MyProductLine/dt/appconfig/types/C
/etc/dt/appconfig/types/C


$HOME/.dt/icons

The MyProductLine icons are not present in this directory because they are already present in:

$HOME/CATEnv/CATCDE/MyProductLine/dt/appconfig/icons/C
/etc/dt/appconfig/icons/C


Application Manager Cabinet

Default global environment and global environment icon:

CATIA VersionNumber
VersionNumber
VersionNumber
ENOVIAV5VPMVersionNumber
VersionNumber

Global environment icon:

GLOBAL1

User environment icon:

My_MyProductLine : USER1

Note

You do not see the icon immediately. To display the icon, you must click the Application manager icon on the CDE front panel, go into the Desktop Tools cabinet, then double-click the Reload Applications icon. You can also log off and log on to display the icon.

 

Impact of Multiple Brand Installations on the Same Workstation in the CDE Environment

If you have multiple brand installations on the same workstation, make sure that all the global environments related to a specfic product line (CATIA, ENOVIA DMU, DELMIA, etc...) are stored in the same CATEnv directory. The CDE file related to the environment file is stored in the CATEnv directory. If a DELMIA global environment is created using CATIAENV and stored in the CATIA CATEnv directory, the CDE will display the newly created DELMIA environment in the application manager window, but the icon created by the DELMIA installation will not be displayed anymore.

To delete an environment using the delcatenv command

Run the command as follows:

UNIXInstallPath/OS/code/command/catstart -run delcatenv

where  "OS" is:

  • aix_a
  • hpux_b
  • solaris_a.
The full list of options for the command:

delcatenv

is as follows:

  • -e: environment file name ; the "-e" option is mandatory
  • -d: specifies the directory containing the environment file to be deleted ($HOME/CATEnv by default)
  • -a user/global:  specifies whether you are deleting a user or global environment. The default value is "user". Note that you need administrator rights to delete a global environment.
  • -desktop: if it exists, deletes its graphical representation, in other words, how it is represented to the user on the user's desktop. The default is "yes".
  • -cs [CATIA|ENOVIA_DMU_Navigator|ENOVIAV5VPM|DELMIA|ENOVIA_3d_com]: specifies the product line whose desktop tools you want to delete; the default is CATIA.
  • -v yes/no:
    • -v yes (default): verbose mode
    • -v no: non-verbose mode.
  • -unregserver: unregisters Version 5 in the CDE Desktop, and deletes the appropriate desktop files set up by the "-regserver" option. The effect is that dragging and dropping of Version 5 documents inside the desktop environment, and the behavior associated when double-clicking Version 5 documents, are deactivated.
    This option must be used on its own like this:
    delcatenv -unregserver -cs MyProductLine
    and once only on a given workstation because it unregisters all Version 5 installations on the same workstation.
    This option is an integral part of the installation process, but must be used with caution if you have more than one Version 5 installation
    on the same workstation. For example, you may have two installations, A and B (you first installed A, then B).  Then, you decide to uninstall B. If you run the commands like this and in this order:
    delcatenv -unregserver
    delcatenv -e EnvB
    then remove the code directory for installation B, installation A will continue to work, but none of the features available via the desktop (dragging and dropping, double-clicking Version 5 documents, etc.) will work: this behavior is common to all Version 5 applications, and was deactivated when unregistering.

    If you have only one Version 5 installation, first unregister Version 5 for each product line, then delete the
    runtime environment and finally remove the code.
    The "- unregserver" option can be used only by an administrator (root).
    For more information, refer to Enabling User Access to the Software Over the Network.
  • -server: deletes an environment suited for server type environments. The CATUserSettingPath variable value differs between a server environment and an interactive environment. The "-e" option is mandatory when specifying server environments. System administrator rights are required for using this option.
  • -h: displays help.

To list environments using the lscatenv command

Run the lscatenv command to list the names of all environments on your computer:

UNIXInstallPath/OS/code/command/catstart -run lscatenv

where  "OS" is:

  • aix_a
  • hpux_b
  • solaris_a.
The full list of options for the command:

lscatenv

is as follows:

  •  -a user/global:  lists user or global environments. You must specify one or the other.
  •  -d:  specifies the directory containing the environment
  •  -h:  displays help.

To read environments using the readcatenv command

Run the readcatenv command to read the environment variables in a specified environment.

Run the command as follows:

UNIXInstallPath/OS/code/command/catstart -run readcatenv

where  "OS" is:

  • aix_a
  • hpux_b
  • solaris_a.
The full list of options for the command:

readcatenv

is as follows:

  • -e: environment file name
  • -d: specifies the directory containing the environment
  • -a user/global:  specifies user or global environment. You must specify one or the other.
  • -var: specifies a variable whose value is to be read; if you omit "-var", all variables will be displayed
  • -h: displays help.

To modify environments using the chcatenv command

Run the chcatenv command to edit one or more environment variables.

Run the command as follows:

UNIXInstallPath/OS/code/command/catstart -run chcatenv

where  "OS" is:

  • aix_a
  • hpux_b
  • solaris_a.
The full list of options for the command:

chcatenv

is as follows:

  • -e: environment file name
  • -d:  specifies the directory containing the environment
  • -a user/global:  specifies user or global environment. You must specify one or the other.
  • -var: specifies a variable whose value is to be modified. The following syntax is allowed:

CATVariable = new_path
CATVariable = $CATVariable: new_path
CATVariable = new_path:$CATVariable

If the path includes blanks, include the whole string in " ".

Note: if you are running this command inside a shell, we recommend that you add a "\" (backslash) before each variable preceded by the "$" character to avoid the values of referenced variables from being replaced by their real values.
For example:
CATVariable = \$CATVariable: new_path

  • -new: creates a new user-defined variable (specified by the "-var" option) with its corresponding value

Example:

chcatenv -e CATIAEnvironmentName -a global -var TOTO=\$TEMP -new

  • -del: deletes a user-defined variable
  • -comment: adds a comment only to the newly created variables
  • -h: displays help.

Examples

Running this command... Displays this:
(where "OS" varies for the UNIX platform)
./catstart -run "readcatenv -e CATIAEnvironmentName -a global" CATInstallPath=UNIXInstallPath/OS
CATDLLPath=UNIXInstallPath/OS/code/bin
CATICPath=UNIXInstallPath/OS/code/productIC
CATCommandPath=UNIXInstallPath/OS/code/command
CATDictionaryPath=UNIXInstallPath/OS/code/dictionary
CATDocView=UNIXInstallPath/OS/doc
CATReffilesPath=UNIXInstallPath/OS/reffiles
etc....

./catstart -run "readcatenv -e CATIAEnvironmentName -a global -var CATInstallPath" CATInstallPath=UNIXInstallPath/OS
./catstart -run "readcatenv -e CATIAEnvironmentName -d /CATEnv -var CATInstallPath" CATInstallPath=UNIXInstallPath/OS

./catstart -run "chcatenv -e CATIAEnvironmentName -a user -var CATInstallPath=\\\$CATInstallPath:/tmp" CATInstallPath=UNIXInstallPath/OS:/tmp
./catstart -run "chcatenv -e CATIAEnvironmentName -a user -var CATInstallPath=/tmp" CATInstallPath=/tmp
./catstart -run "chcatenv -e CATIAEnvironmentName -a user -var NewVar=/tmp -new" NewVar=/tmp

./catstart -run "lscatenv -d /CATEnv" CATIA.V5R16.B16.txt
CATIAEnvironmentName.txt
Environment creation and manipulation commands are logged in the file $HOME/CATENV.log.
The feedback obtained when using all the administration commands from the command line is now output to the current command prompt window.

Running a Tool with the Correct Environment When Multiple Product Lines Are Installed Together

In certain cases, you may have installed several products in the same installation directory:
  • an ENOVIAV5VPM server
  • CATIA
  • 3d com.

All of these products can install, by default, a runtime environment in the same location. If you run a tool using the catstart command without specifying which environment you want to use, the last environment installed will be executed.

Consequently, make sure you use the "-env" option to specify which runtime environment you want to run.

For example, if you want to run an ENOVIAV5VPM tool:

./catstart -env myenv -run mytool

where "myenv" is the environment for your product, and "mytool" is the tool you are running.

For example, if you want to run the VPMPeopleEdit tool, which is an ENOVIAV5VPM tool, use a command like this:

./catstart -env ENOVIAV5VPMEnvironmentName -run VPMPeopleEdit