<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GetVar Method (IEdmTaskInstance)
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 > IEdmTaskInstance Interface : GetVar Method (IEdmTaskInstance)

Visual Basic
C#
C++/CLI

oVarIDorName
  ID or name of the card variable for which to get a value

Gets the value of a card variable created in the administration tool.

# Syntax

Visual Basic |
--- | ---

    Function GetVar( _
       ByVal oVarIDorName As System.Object _
    ) As System.Object

C# |
--- | ---

    System.object GetVar(
       System.object oVarIDorName
    )

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

    System.Object^ GetVar(
    &   System.Object^ oVarIDorName
    )

#### Parameters

oVarIDorName
  ID or name of the card variable for which to get a value

#### Return Value

Value of a card variable

# Remarks

The task add-in calls this method while the task is running on the server (EdmCmdType.EdmCmd_TaskRun) to retrieve a variable value set by the add-in when it calls:

- IEdmTaskInstance::SetVar during the processing of the EdmCmdType.EdmCmd_TaskLaunch hook when the user enters values on the data card displayed when the task is launched on the client computer.
- IEdmTaskProperties.SetVar during the processing of the EdmCmdType.EdmCmd_TaskSetup hook when the user enters data card variable values on the task setup page.

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 IEdmTaskInstance::GetValEx and IEdmTaskInstance::SetValEx.

Return codes:

- S_OK: The method successfully executed.

# See Also

####

IEdmTaskInstance Interface
IEdmTaskInstance Members
IEdmTaskInstance::SetVar Method ()
Task Add-in Sample

# Availability

SOLIDWORKS PDM Professional 2010