AFGlobalSettings.EnableEnvironmentVariableSubstitution Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static bool EnableEnvironmentVariableSubstitution { get; set; }
Public Shared Property EnableEnvironmentVariableSubstitution As Boolean Get Set Dim value As Boolean value = AFGlobalSettings.EnableEnvironmentVariableSubstitution AFGlobalSettings.EnableEnvironmentVariableSubstitution = value
public: static property bool EnableEnvironmentVariableSubstitution { bool get (); void set (bool value); }
static member EnableEnvironmentVariableSubstitution : bool with get, set
Property Value
Type: BooleanReturns if Environment Variable Resolution in Data References is disabled in the AFSDK. Set to to enable resolving of environment variables. The default value is .
Remarks
When enabled, if AFSDK fails to resolve variables formatted with %[SubstitutionParameter]% using known substitution parameters, then it will resolve [SubstitutionParameter] to an environment variable. By default this property is disabled to avoid potential security risks associated with exfiltration of environment variable values.
The default value for this property is read from the SDK's configuration file in the OSI directory under the CommonApplicationData directory. This default value will be the default for all clients executed on the computer. If this property is modified in the client, then it will only affect the current client and the modified value will not be persisted.