VS:GetFldType

From Vectorworks Developer
Revision as of 21:49, 17 June 2009 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Returns a constant indicating the data type of a specified field in the referenced record.

Please refer to the VectorScript Appendix for specific field data types and formatting.


For Plug-in Object Parameter Records, the field types are documented in the VectorScript Appendix.

FUNCTION GetFldType(
h :HANDLE;
t :INTEGER) : INTEGER;
def vs.GetFldType(h, t):
    return INTEGER

Parameters

h HANDLE Handle to record.
t INTEGER Field index (range of 1 - n).

Remarks

Returns a constant indicating which type of field is specified by the field number "t" of record "h". The field type constants are listed in an appendix in the vectorscript manual.

In the appendix, the field types for worksheets and data records are listed, but the field types for parameter records (e.g., plug-in object records) are different...

Data Records:

Constant Description
1 Integer
2 Boolean
3 Number-general
4 Text
5 Number-decimal
6 Number-decimal w/ commas
7 Number-scientific
8 Number-fractional
9 Number-dimension
10 Number-angle
11 Number-date/time

PIO Records:

Constant Description
1 Integer
2 Boolean
3 Number
4 Text
7 Dimension
8 Pop-Up
9 Radio Buttons
10 Control Point X
11 Control Point Y
14 Static Text Label

Example

VectorScript

fieldType:=GetFldType(recordHandle,3);

Python

fieldType = vs.GetFldType(recordHandle,3)

Version

Availability: from All Versions