STEPlib SysML: How To use the environment variables

Warning

../../_images/construction.png

This page is under construction.

To contribute or participate contact support@boost-lab.net

This page explains how to use the environment variables for the STEPlib team.

Environment variable description

From Wikipedia, the free encyclopedia

An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer.

They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.

They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and macOS. From PC DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows, and OS/2 also have included them as a feature, although with somewhat different syntax, usage and standard variable names.

Why define environment variables

  • We use it to give a common name to the paths of our different computers.
  • User A will have is Harmonization repository under /home/usera/git/Harmonization…… And for user B by /home/userb/documents/git/Harmonization…… with the environment variables they can all refer to $HARMONISATION
  • For the scripts to be portable from one computer to another one the environment variables can be used inside the script to always reference the correct path.
  • For example for all of us the STEPlib scripts path will be $SLSCRIPTS, each of us have been defined the path in the environment variable. For bash, the command is export SLSCRIPTS=/Users/vero/git/Harmonization-STEP-updated-architecture/STEPlib/utils
  • The environnement variables can be automaticaly set at login.

Check with your IT friend what is the syntax for your operating system

Example

../../_images/ht_scpt_ev_example.png

List of used preconfigured variables and mounted volumes

List of minimal mounted volumes
alias example
tmp /Users/vero/tmp
harmo /Users/vero/Documents/Projets/part_242_ed2/buildFdis/Harmonization-STEP-updated-architecture
stepmodHead /Users/vero/Documents/cvsBoostHead
work /Users/vero/Documents/Projets/part_242_ed2/buildFdis
List of preconfigured variables
alias example
AP /harmo/STEPlib/Application_protocols/APXXX
STEPLIB /harmo/STEPlib
SLSCRIPTS (STEPlib scripts) /harmo/STEPlib/utils
STEPMODHEAD /stepmodHead
SMSCRIPTS (STEPmod scripts) /stepmodHead/stepmod/utils/part1000
WORK /work
STEPMODTRIAL /stepmodTrial
CORE /harmo/STEPlib/Core_model

Section author: Veronique Dubillot [Boost Conseil]