Script Development / Environment Variable DFF.ENV
All environment variables configured in the sidebar of the script editor can be accessed in the script using the configured ID to retrieve the corresponding environment variable value.
Example code is as follows:
Python | |
---|---|
1 2 3 4 5 |
|
If a type is specified for the environment variable during configuration, it will automatically be converted to the specific type when retrieved, so no additional type conversion is necessary.
However, due to possible configuration errors, type conversion may fail, so for program robustness, default value handling should be included, such as:
Python | |
---|---|
1 2 3 4 5 |
|