VS:GetObjectTags
Jump to navigation
Jump to search
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Lets the user query the list of Tags set on an object such as a Class,Layer or Resource.
FUNCTION GetObjectTags(
objHandle :HANDLE;
VAR outArrTags :ARRAY) : BOOLEAN;
def vs.GetObjectTags(objHandle): return (BOOLEAN, outArrTags)
Parameters
objHandle HANDLE The handle to the object to query Tags from. outArrTags ARRAY The output array of Tags queried from the object.
For Python, the returned data is a tuple. A list will not work.
Example
VectorScript
Procedure Test; var h :Handle; a :array[1..2] of string; Begin h:=FLayer; GetObjectTags(h, a); Message(Date(2,2),' ',a(1),' ',a(2)); end; Run(Test);
Python
h = vs.FLayer b,t = vs.GetObjectTags(h) vs.message(vs.Date(2,2), ' ', t[0], ' ', t[1])
sample code by Pat Stanford
Version
Availability: from Vectorworks 2019