Evaluates an expression.
Visual Basic |
---|
Public Function Evaluate( _ ByVal objectType As Integer, _ ByVal nObject As Long, _ ByVal formula As String _ ) As Variant |
SIS_OT_COMMAND
|
Changes the properties/mode of the current command. |
SIS_OT_CURITEM | The current open Item. |
SIS_OT_DEFITEM
|
The default Item. |
SIS_OT_DATASET
|
Datasets. |
SIS_OT_OVERLAY
|
Overlays. |
SIS_OT_WINDOW
|
The window. |
SIS_OT_NOL
|
Named Object Libraries. |
SIS_OT_FTABLE
|
The current Feature Table. |
SIS_OT_SCHEMA
|
The current Schema. |
SIS_OT_SCHEMACOLUMN
|
A column in the current Schema. |
SIS_OT_THEME
|
The current Theme. |
SIS_OT_THEMECOMPONENT
|
A component in the current Theme. |
SIS_OT_PRINTER
|
Printer. |
SIS_OT_SYSTEM
|
System variables. |
SIS_OT_OPTION
|
System wide Boolean options. |
The evaluated value of the given expression.
The following expression function enables you to find out what data type an attribute is.
VarType(...)
which returns an enumeration, e.g. VarType(‘my_date@’) returns 7. Use it as part of Sis.Evaluate (for @ datatypes) and Sis.EvaluateInt (for $&# datatypes).
The following expression translates these numbers into descriptive types:
Choose(VarType('attr@'),'Null','Short','Long (&)','Float','Double(#)','Currency','Date','String($)','','','Boolean','','','Decimal','Byte'.'Unsigned Byte','Unsigned Short','Unsigned Long','Long Long Integer','Unsigned Long Long')
Substitute attr@ for your attribute name (including the $&#@ suffix).
VarType({...}) will also work with any lambda expression inside the {}.
For example:
VarType({DATE@})
The returned value will determine the data type for the queried column:
vbEmpty | 0 | Empty (uninitialized) |
vbNull | 1 | Null (no valid data) |
vbInteger | 2 | Integer |
vbLong | 3 | Long Integer |
vbSingle | 4 | Single |
vbDouble | 5 | Double |
vbCurrency | 6 | Currency value |
vbDate | 7 | Date value |
vbString | 8 | String |
vbObject | 9 | Object |
vbError | 10 | Error value |
vbBoolean | 11 | Boolean value (Zero and Non-zero) |
vbVariant | 12 | Variant (Array only) |
vbDataObject | 13 | A data access object |
vbByte | 17 | Byte |
vbUserDefinedType | 36 | Variants that contain user-defined types |
Available: GEO MM ME MD OD OM OV SISpy
Group:
sis.Evaluate ( SIS_OT_CURITEM , 0, "Area@" )
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).