GetValue method (WinStudio scripts)

Applies To

  • IWSFormComponent interface
  • IWSIDOProperty interface
  • IWSVariable interface
  • IGlobalScriptParm interface

Definition

Returns the value of an object as a given data type.

Syntax

object.GetValue( Of datatype ) ( )

  Part   Description
object Required. The name of a valid component, preoprty, variable, or script.
datatype Required. The data type of the object for which the value is being returned.

For a list of valid data types, see the "Remarks" section.

Remarks

Valid data types for this method include:

Boolean Double Integer String
Byte Guid Long UInt16
Char Int16 SByte UInt32
DateTime Int32 Short UInt64
Decimal Int64 Single  

If the value of the object is null, this method attempts to return a meaningful default value; for example, an empty string for a string or 0 (zero) for a numeric value.

Example

Dim MyLongValue As Long = ThisForm.Components("MyLongComp").GetValue(Of Long)()
If MyLongValue = 0 Then
    Application.ShowMessage("MyLongComp might contain zero or nothing.")
End If