<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
SetValEx 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 : SetValEx Method (IEdmTaskProperties)

Visual Basic
C#
C++/CLI

bsValName
  Name of the user-defined variable for which to set a value

oValue
  Value of user-defined variable (see Remarks)

Sets a value for the specified user-defined variable.

# Syntax

Visual Basic |
--- | ---

    Sub SetValEx( _
       ByVal bsValName As System.String, _
       ByVal oValue As System.Object _
    )

C# |
--- | ---

    void SetValEx(
       System.string bsValName,
       System.object oValue
    )

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

    void SetValEx(
    &   System.String^ bsValName,
    &   System.Object^ oValue
    )

#### Parameters

bsValName
  Name of the user-defined variable for which to set a value
oValue
  Value of user-defined 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 this method:

- to store variable data entered by the user in the task definition setup page on the client machine.
- during the processing of the EdmCmdType.EdmCmd_TaskSetup hook.

Custom data types and objects must be serialized to a string, numeric type, or date before calling this method. 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 IEdmTaskProperties::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 user-defined values when the task is executing on the server, call IEdmTaskInstance::GetValEx during the processing of the EdmCmdType.EdmCmd_TaskRun hook.

NOTE: The difference between this method and IEdmTaskProperties::SetVar is that the latter requires a pre-defined card variable in the vault, whereas this method does not.

Return codes:

- S_OK: The method successfully executed.

# See Also

####

IEdmTaskProperties Interface
IEdmTaskProperties Members

# Availability

SOLIDWORKS PDM Professional 2010