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


bsValName
Name of a user-defined variable
Gets the value of the specified user-defined variable.

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 a user-defined variable

Return Value

Value of user-defined variable (see Remarks)

Example

Remarks

This method gets the value of a user-defined variable that is created by IEdmTaskInstance::SetValEx or IEdmTaskProperties::SetValEx. User-defined variables are usually created during the processing of the EdmCmdType.EdmCmd_TaskLaunch or the EdmCmdType.EdmCmd_TaskSetup hook and are usually read during the processing of the EdmCmdType.EdmCmd_TaskRun hook.

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

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

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

Return codes:

  • S_OK: The method successfully executed.
 

See Also

Availability

SOLIDWORKS PDM Professional 2010