Configuring Your Environment in Command Line Mode

This task explains how to configure an environment in command line mode.

This page discusses:

Create or Customize Environments Using the DSYEnvMgt Command

The DSYEnvMgtcommand is available creating and customizing both user and global environments.

Running the Command

The command is located on Windows in:

C:\Program Files\Dassault
          Systemes\B424\win_b64\code\bin\DSYEnvMgt

Syntax

The full list of options for the command DSYEnvMgt is as follows:

DSYEnvMgt -create|-del [-e EnvName] [-d PathEnvDir|INSTALL] [-p ConcatPath] [-from Env|PathEnv] -h
Parameter Description
-create or -delCreate or delete an environment file (mandatory)
-eName of the environment to create or delete (optional). An existing environment with the same name is always overwritten. If not used, default name for the environment file is "Env".
-d PathEnvDir|INSTALLEnvironment file storage folder: the directory is not created if it does not exist (optional).
  • if not used, EnvDir = C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
  • if -d is INSTALL, EnvDir = C:\Program Files\Dassault Systemes\B424/CATEnv
  • if -d PathEnvDir, EnvDir = PathEnvDir
-p ConcatPath Concatenation path: multiple paths can be specified (for creation only, optional).

Default value:

C:\Program Files\Dassault
          Systemes\B424

When used with -from, adds ConcatPath to the installation path at the beginning.

-from Env|PathEnvCreate a new environment file from an existing one (for creation only, optional).

You can specify either the name of the environment or its full path.

-hDisplays help

Examples

Command Result
DSYEnvMgt -createCreate an environment file named Env.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
DSYEnvMgt -create -e Env1 Create an environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
DSYEnvMgt -create -e Env1 -d INSTALL Create an environment file named Env1.txt in the directory C:\Program Files\Dassault Systemes\B424/CATEnv
DSYEnvMgt -create -e Env1 -from "C:\Program Files\Dassault Systemes\B216\CATEnv\Env.txt" Create Env1.txt in C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
DSYEnvMgt -create -e Env1 -from Env -d INSTALL Create Env1.txt in C:\Program Files\Dassault Systemes\B424/CATEnv
DSYEnvMgt -create -e Env2 -from Env1 -p C:\MyCusto Create the new environment Env2 from a copy of Env1 in the default user storage directory: C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv and adds C:\MyCusto to the path found in Env1
DSYEnvMgt -create -e Env2 -from Env1 -p C:\MyCusto -d INSTALL Create the new environment Env2 from a copy of Env1 in the default installation storage path: C:\Program Files\Dassault Systemes\B424/CATEnv and adds C:\MyCusto to the path found in Env1

List Environments Using the lscatenv Command

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

Running the Command

The command is located on Windows in:

C:\Program Files\Dassault
          Systemes\B424\win_b64\code\bin\lscatenv

Syntax

The full list of options for the lscatenv command is as follows:

lscatenv [-a user|global] [-d EnvDir] [-h]
Parameter Description
-dEnvironment file storage folder.

Default value:

C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv

-a user/global Environment type (useless if -d is specified).
  • user: the environment file is stored in

    C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv

  • global: the environment file is stored in

    C:\Program Files\Dassault Systemes\B424/CATEnv

Default value: user.

-hDisplays help

Examples

Command Result
DSYEnvMgt -create -e Env1 Create an environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
lscatenv -a global Env
lscatenv -a user Env1
lscatenvEnv1
lscatenv -d "C:\Program Files\Dassault Systemes\B424\CATEnv"

Read Environments Using the readcatenv Command

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

Running the Command

The command is located on Windows in:

C:\Program Files\Dassault
          Systemes\B424\win_b64\code\bin\readcatenv

Syntax

The full list of options for the readcatenv command is as follows:

readcatenv -e EnvName [-d EnvDir] [-a user|global] [-var variable] [-short] [-l] [-h]
Parameter Description
-dEnvironment file storage folder.

Default value:

C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv

-e Environment file name (mandatory).
-a user|globalEnvironment type (useless if -d is specified).
  • user: the environment file is stored in

    C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv

  • global: the environment file is stored in

    C:\Program Files\Dassault Systemes\B424/CATEnv

Default value: user.

-var variable Displays only the specified variable value.

If this option is not set, the command displays all the variables with values in the environment file.

-short Displays only the variable value
-l Does not expand the variable value
-hDisplays help

Examples

Command Result
DSYEnvMgt -create -e Env1 Create an environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
readcatenv -e Env -a global CATInstallPath=C:\Program Files\Dassault Systemes\B424\win_b64\code\bin

CATDLLPath=C:\Program Files\Dassault Systemes\B424\win_b64\code\bin

CATDLLPath=C:\Program Files\Dassault Systemes\B424\win_b64\code\productIC

CATDLLPath=C:\Program Files\Dassault Systemes\B424\win_b64\code\command

CATDLLPath=C:\Program Files\Dassault Systemes\B424\win_b64\code\dictionary

readcatenv -e Env -a global -var CATInstallPath CATInstallPath=C:\Program Files\Dassault Systemes\B424\win_b64
readcatenv -e Env -d "C:\Program Files\Dassault Systemes\B216\CATEnv" -var CATInstallPath CATInstallPath=C:\Program Files\Dassault Systemes\B424\win_b64
readcatenv -e Env1 -a user -var CATInstallPath CATInstallPath=C:\Program Files\Dassault Systemes\B424\win_b64
readcatenv -e Env1 -a user -var CATInstallPath -short CATInstallPath=C:\Program Files\Dassault Systemes\B424\win_b64
readcatenv -e Env1 -a user -var "CATUserSettingPath" -l CATUserSettingPath=CSIDL_APPDATA\DassaultSystemes\CATSettings\DSKEY_RELEASE_LEVEL\Authoring

Modify Environments Using the chcatenv Command

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

Running the Command

The command is located on Windows in:

C:\Program Files\Dassault
          Systemes\B424\win_b64\code\bin\chcatenv

Syntax

The full list of options for the chcatenv command is as follows:

chcatenv -e EnvName -var variable=value [-d EnvDir] [-a user|global]
[-new] [-com] [-del] [-h]

Parameter Description
-e Environment file name (mandatory)
-d Environment file storage folder. Mandatory if -a option is not specified.
-a user/globalEnvironment type.

Useless if -d is specified and mandatory if -d is not specified.

  • user: the environment file is stored in

    C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv

  • global: the environment file is stored in

    C:\Program Files\Dassault Systemes\B424/CATEnv

If -d option is specified, default value is user.

-var var1=new_value: Sets the variable var1 with new value (mandatory option).

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.

-new

If the variable specified in -var doesn't exist, it creates it.

To avoid undesired behavior, blank characters should be avoided in variable names.

-com "text" Adds a comment only to newly created variables.

Note: whether you add comments using this command or using the Environment Editor, blank characters should be avoided in the comment.

-del

Deletes the variable specified in -var (only for variables created by the user).

-hDisplays help

Examples

Command Result
DSYEnvMgt -create -e Env1 Create an environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
chcatenv -e Env1 -a user -var "CATInstallPath=%CATInstallPath%;C:\Temp\MyData" Env1:

C:\Program Files\Dassault Systemes\B424\win_b64;C:\Temp\MyData

chcatenv -e Env1 -a user -var "CATInstallPath=C:\Temp\MyData;%CATInstallPath%" Env1:

C:\Temp\MyData;C:\Program Files\Dassault Systemes\B424\win_b64;C:\Temp\MyData

chcatenv -e Env1 -a user -var "CATInstallPath=C:\Temp\MyData" Env1:

CATInstallPath=C:\Temp\MyData

chcatenv -e Env1 -a user -var "NewVar=C:\Temp\MyData" -new -com "New Variable" Env1:

!New Variable

NewVar=C:\Temp\MyData

chcatenv -e Env1 -a user -var NewVar -del Env1:

!New Variable: removed

NewVar=C:\Temp\MyData: removed

Create Shortcuts Using the DSYShortcutsMgt Command

Run the DSYShortcutsMgt command to create application shortcuts.

Running the Command

The command is located on Windows in:

C:\Program Files\Dassault
          Systemes\B424\win_b64\code\bin\DSYShortcutsMgt

Syntax

The full list of options for the DSYShortcutsMgt command is as follows:

DSYShortcutsMgt -create|-del -desktop|-menu|-tools -e EnvName [-d EnvDir] [-a user|global] [-h]

Parameter Description
-create or -delCreate or delete all application shortcuts on desktop, menu or tools.
-desktop|-menu|-toolsCreate or delete all application shortcuts on desktop, menu or tools.
-e Environment file name
-d Environment file storage folder (optional).
  • if not specified, and -a not used, the default will be: EnvDir = C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
  • if not specified, but -a global is used, the default will be: EnvDir =C:\Program Files\Dassault Systemes\B424/CATEnv
  • if not specified, but -a user is used, the default will be: EnvDir =C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
-a user/global

To create or delete shortcuts for All users or for the current user only (optional). The default is -a user.

Specifies location and type of shortcuts.

  • -a global: the shortcuts will be visible for all users. You must have administrator privileges to use this option.

    Desktop shortcuts will be created under: C:\Users\Public\Public Desktop

    Menu and tools shortcuts will be created under: C:\ProgramData\Microsoft\Windows\Start Menu\Programs

  • -a user: the shortcuts will be visible only for the current user.

    Desktop shortcuts will be created under: C:\Users\user\Desktop

    Menu and tools shortcuts will be created under: C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

-hDisplays help

Examples

Command Result
DSYEnvMgt -create -e Env1 Create an environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
DSYShortcutsMgt -create -desktop -e Env1

Desktop: 3DEXPERIENCER2022x Env1

DSYShortcutsMgt -create -menu -e Env1

Start -> All Programs -> Dassault Systemes 3DEXPERIENCER2022x: 3DEXPERIENCER2022x Env1

DSYShortcutsMgt -create -tools -e Env1

Start -> All Programs -> Dassault Systemes 3DEXPERIENCER2022x -> Tools: Batch Management Env1, 3DEXPERIENCE for Support Env1, Environment Editor Env1 Local Key Management Env1, Settings Management Env1

DSYShortcutsMgt -del -desktop -e Env1

DSYShortcutsMgt -del -menu -e Env1

DSYShortcutsMgt -del -tools -e Env1

Delete desktop, start menu and tools shortcuts in the user environment.
DSYEnvMgt -del -e Env1Delete the environment file named Env1.txt in the directory C:\Users\user\AppData\Roaming\DassaultSystemes\CATEnv
DSYEnvMgt -create -e Env2 -d INSTALLCreate an environment file named Env2.txt in the directory C:\Program Files\Dassault Systemes\B424/CATEnv
DSYShortcutsMgt -create -desktop -e Env2 -a globalDesktop: 3DEXPERIENCER2022x Env2
DSYShortcutsMgt -create -menu -e Env2 -a globalStart -> All Programs -> Dassault Systemes 3DEXPERIENCER2022x: 3DEXPERIENCER2022x Env2
DSYShortcutsMgt -create -tools -e Env2 -a globalStart -> All Programs -> Dassault Systemes 3DEXPERIENCER2022x -> Tools: Batch Management Env2, 3DEXPERIENCE for Support Env2, Environment Editor Env2 Local Key Management Env2, Settings Management Env2
DSYShortcutsMgt -del -desktop -e Env2 -a global

DSYShortcutsMgt -del -menu -e Env2 -a global

DSYShortcutsMgt -del -tools -e Env2 -a global

Delete desktop, start menu and tools shortcuts in the all users environment.
DSYEnvMgt -del -e Env2 -d INSTALL Delete the environment file named Env2.txt in the directory C:\Program Files\Dassault Systemes\B424/CATEnv