SOLIDWORKS PDM Professional API Help Send Feedback
GetValEx Method (IEdmTaskProperties)
See Also  Example
EPDM.Interop.epdm Namespace > IEdmTaskProperties Interface : GetValEx Method (IEdmTaskProperties)


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

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

Availability

SOLIDWORKS PDM Professional 2010