Difference between revisions of "VS:GetFldType"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(added Plug-in more useful format constants from the SDK)
Line 99: Line 99:
 
|-
 
|-
 
| 14 || Static Text Label
 
| 14 || Static Text Label
 +
|-
 +
| 18 || Classes Pop-up
 +
|-
 +
| 19 || Layer Pop-up
 +
|-
 +
| 20 || Angle
 +
|-
 +
| 21 || Area
 +
|-
 +
| 22 || Volume
 
|}
 
|}
 
</remark>
 
</remark>

Revision as of 00:57, 14 February 2016

.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
18 Classes Pop-up
19 Layer Pop-up
20 Angle
21 Area
22 Volume

Example

VectorScript

fieldType:=GetFldType(recordHandle,3);

Python

fieldType = vs.GetFldType(recordHandle,3)

Version

Availability: from All Versions
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox