Function GetTextStyleRef returns the text style for the referenced object. The integer returned is the internal index of the text style used by this object.
If the text object is using class text style, this returns the effective style. You should use the TextStyleByClass functions to check and preserve by-class behavior.
FUNCTION GetTextStyleRef(objectId : HANDLE): LONGINT;def vs.GetTextStyleRef(objectId):
return LONGINT| Name | Type | Description |
|---|---|---|
| objectId | HANDLE | handle to object |
resultN := GetTextStyleRef(objectId);import vs
# Function GetTextStyleRef returns the text style for the referenced object.
objectId = vs.FSActLayer() # handle to the first selected object on the active layer
resultN = vs.GetTextStyleRef(objectId)
vs.Message('GetTextStyleRef returned: ' + str(resultN))VS Functions: SetTextStyleRef | GetTextStyleRef | SetTextStyleRefN | GetTextStyleRefN | SetTextStyleByClass | SetTextStyleByClassN | IsTextStyleByClass | IsTextStyleByClassN
Availability: from Vectorworks 2015