> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionIso11783PDDconnectenvvar

[Open topic with navigation](../../../../../../CANoeDEFamily.htm#Topics/CAPLFunctions/ISO11783/ISONodeLayer/Functions/CAPLfunctionIso11783PDDconnectenvvar.md)

**CAPL Functions** » **ISO11783** » **ISO11783 Node Layer** » Iso11783PDDConnectEnvVar

# Iso11783PDDConnectEnvVar

[Valid for](../../../../Shared/FeatureAvailability.md): CANoe DE • CANoe4SW DE

## Function Syntax

```plaintext theme={null}
long Iso11783PDDConnectEnvVar( dword ecuHandle, dbSignal signal, dword elementNumber, char envVarName[] );
long Iso11783PDDConnectEnvVar( dword ecuHandle, dword ddi, dword elementNumber, char envVarName[] );
```

## Description

The function connects a process variable with an environment variable.

## Parameters

* **ecuHandle**: Handle of the ECU. The handle must previously have been created with [Iso11783CreateeECU](CAPLfunctionIso11783CreateECU.md).
* **signal**: Signal from the database. The attribute [DDI](../../../../CANoeCANalyzer/ISO11783/processData/ProcessDataDefinition.md) must have been defined for the signal. The signal must be defined in the same database as the node!
* **ddi**: Data dictionary identifier, 0x0000..0xFFFF
* **elementNumber**: Element number, 0x000..0xFFF
* **envVarName**: Name of the environment variable

## Return Values

[Error code](../CAPLfunctionsISONLErrorCodesPDDOnError.md)

## Example

```plaintext theme={null}
if (Iso11783PDDLoadDeviceDescription( ecuHandle, "Sprayer.XML" ) == 0) {
  Iso11783PDDConnectEnvVar( ecuHandle, 0x0060, 1, "EvSprayer_TankVolume" );
  Iso11783PDDConnectEnvVar( ecuHandle, 0x0048, 2, "EvSprayer_AppRatePerArea" );
} else {
  write( "Error while load task file" );
}
```
