<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GetVar Method (IEdmTaskProperties)
See Also

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmTaskProperties Interface : GetVar Method (IEdmTaskProperties)

Visual Basic
C#
C++/CLI

lVarID
  ID of variable for which to get a value

Gets the value of a card variable created in the administration tool and set by IEdmTaskProperties::SetVar.

# Syntax

Visual Basic |
--- | ---

    Function GetVar( _
       ByVal lVarID As System.Integer _
    ) As System.Object

C# |
--- | ---

    System.object GetVar(
       System.int lVarID
    )

C++/CLI |
--- | ---

    System.Object^ GetVar(
    &   System.int lVarID
    )

#### Parameters

lVarID
  ID of variable for which to get a value

#### Return Value

Value of a card variable

# Remarks

The task add-in calls this method to retrieve a data card variable value that is set by the user on the task details page on the client computer. To save and retrieve the variable, the add-in calls IEdmTaskProperties::SetVar and this method, respectively, during the processing of the EdmCmdType.EdmCmd_TaskSetup hook.

These data card variable values can also be retrieved when the task is executed on the server by calling IEdmTaskInstance::GetVar.

Card variables accessible by this method must be created using the administration tool card editor and are not related to the user-defined variables accessed by IEdmTaskProperties::GetValEx and IEdmTaskProperties::SetValEx.

Return codes:

- S_OK: The method successfully executed.

# See Also

####

IEdmTaskProperties Interface
IEdmTaskProperties Members
Task Add-in Sample

# Availability

SOLIDWORKS PDM Professional 2010