Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 1.54 KB

File metadata and controls

56 lines (46 loc) · 1.54 KB

GetTextStyleRefN

Description

GetTextStyleRefN returns the text style reference at a specified position within the text object. Reference 0 means Un-Styled.

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 GetTextStyleRefN(
				objectId : HANDLE;
				position : INTEGER): LONGINT;
def vs.GetTextStyleRefN(objectId, position):
    return LONGINT

Parameters

Name Type Description
objectId HANDLE handle to text object
position INTEGER Position in text string, zero-based.

Examples

resultN := GetTextStyleRefN(objectId, 1);
import vs

# GetTextStyleRefN returns the text style reference at a specified position
# within the text object.
objectId = vs.FSActLayer()  # handle to the first selected object on the active layer
position = 1

resultN = vs.GetTextStyleRefN(objectId, position)
vs.Message('GetTextStyleRefN returned: ' + str(resultN))

See Also

VS Functions: SetTextStyleRef | GetTextStyleRef | SetTextStyleRefN | GetTextStyleRefN | SetTextStyleByClass | SetTextStyleByClassN | IsTextStyleByClass | IsTextStyleByClassN

Version

Availability: from Vectorworks 2015

Category