Script Development / Environment Variables DFF.ENV
All environment variables configured in the left sidebar of the script editor can be accessed in the script using the configured ID to get the corresponding environment variable value.
Example code:
Python | |
---|---|
1 2 3 4 5 |
|
If the environment variable is specified with a type during configuration, it will be automatically converted to the specific type when retrieved, without the need for additional type conversion.
However, since type conversion might fail due to configuration errors, for the robustness of the program, default value handling should be added, such as:
Python | |
---|---|
1 2 3 4 5 |
|