VS:GetTypeN: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
<remark> | <remark> | ||
[[User:Rgm|Rgm]] [2012.05.16]: Note that to distinguish a Sheet Layer from a Design Layer, you need to check object variable 154 (ovLayerType), eg. GetObjectVariableInt(layerHd,154). If 1, then it's a Design Layer. If 2, then it's a Sheet Layer. GetTypeN will return 31 (kLayerNode) for both types. | [[User:Rgm|Rgm]] [2012.05.16]: Note that to distinguish a Sheet Layer from a Design Layer, you need to check object variable 154 (ovLayerType), eg. GetObjectVariableInt(layerHd,154). If 1, then it's a Design Layer. If 2, then it's a Sheet Layer. GetTypeN will return 31 (kLayerNode) for both types. | ||
[[User:Ptr|Ptr]] [2020.09.14]: In Python you can also use "h.type" where h=HANDLE to get the object type integer. | [[User:Ptr|Ptr]] [2020.09.14]: In Python you can also use "h.type" where h=HANDLE to get the object type integer. Other attributes of handles are: | ||
<lineList indent = 1> | |||
<line>aux - Get first aux object, or add to an object to the aux list of this one.</line> | |||
<line>locked - Access locked state of the object.</line> | |||
<line>name - Access the name of the object.</line> | |||
<line>next - Access next object in the drawing list.</line> | |||
<line>parent - Access the parent object in the drawing list.</line> | |||
<line>prev - Access previous object in the drawing list.</line> | |||
<line>selected - Access the selection state of the object.</line> | |||
<line>type - Access the type of the object. Get-only.</line> | |||
</linelist> | |||
</remark> | </remark> | ||
Revision as of 11:04, 14 September 2020
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns the type index of the referenced planar or screen object.
A complete listing of supported object types may be found in the Appendix.
FUNCTION GetTypeN(
h :HANDLE) : INTEGER;
def vs.GetTypeN(h): return INTEGER
Parameters
h HANDLE Handle to object.
Remarks
Rgm [2012.05.16]: Note that to distinguish a Sheet Layer from a Design Layer, you need to check object variable 154 (ovLayerType), eg. GetObjectVariableInt(layerHd,154). If 1, then it's a Design Layer. If 2, then it's a Sheet Layer. GetTypeN will return 31 (kLayerNode) for both types.
Ptr [2020.09.14]: In Python you can also use "h.type" where h=HANDLE to get the object type integer. Other attributes of handles are:
aux - Get first aux object, or add to an object to the aux list of this one. locked - Access locked state of the object. name - Access the name of the object. next - Access next object in the drawing list. parent - Access the parent object in the drawing list. prev - Access previous object in the drawing list. selected - Access the selection state of the object. type - Access the type of the object. Get-only.
Version
Availability: from Vectorworks 2011
See Also
VS Functions:
VS Functions:
[[VS:GetType]]