<xml> </xml>

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

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 : GetValEx Method (IEdmTaskProperties)

Visual Basic
C#
C++/CLI

bsValName
  Name of variable for which to get a value

Gets the value of a user-defined variable created with IEdmTaskProperties::SetValEx.

# Syntax

Visual Basic |
--- | ---

    Function GetValEx( _
       ByVal bsValName As System.String _
    ) As System.Object

C# |
--- | ---

    System.object GetValEx(
       System.string bsValName
    )

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

    System.Object^ GetValEx(
    &   System.String^ bsValName
    )

#### Parameters

bsValName
  Name of variable for which to get a value

#### Return Value

Value of variable (see Remarks)

# Example

Create a Task that Finds Files in Workflow States (VB.NET)
Create a Task that Finds Files in Workflow States (C#)

# Remarks

Call IEdmTaskProperties::SetValEx to store variable data entered by the user in the task definition setup page on the client machine. The task definition setup page displays during the processing of the EdmCmdType.EdmCmd_TaskSetup hook when the task add-in calls IEdmAddIn5::OnCmd.

Custom data types and objects must have been serialized to a string, numeric type, or date before calling IEdmTaskProperites::SetValEx. For example:

1. Serialize the object data to XML or JSON using StringBuilder, XmlWriter, XmlSerializer, etc.
2. Call IEdmTaskProperites::SetValEx to store the resulting string.
3. Call IEdmTaskProperites::GetValEx to retrieve the stored string.
4. Initialize the new instance of the object from XML/JSON using StringReader, XmlReader, XmlSerializer, etc.

To get the values when the task is executing on the server, call IEdmTaskInstance::GetValEx during the processing of the EdmCmdType.EdmCmd_TaskRun hook.

NOTE: User-defined variables are not related to the card variables created using the administration tool. To access card variables for this task definition, call IEdmTaskProperties::GetVar and IEdmTaskProperties::SetVar.

Return codes:

- S_OK: The method successfully executed.

# See Also

####

IEdmTaskProperties Interface
IEdmTaskProperties Members

# Availability

SOLIDWORKS PDM Professional 2010