Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 1.54 KB

File metadata and controls

60 lines (50 loc) · 1.54 KB

SetTextStyleByClassN

Description

SetTextStyleByClassN sets a specified substring of a text object to use the class text style. To undo this, use SetTextStyleRef or SetTextStyleRefN on the text.

FUNCTION SetTextStyleByClassN(
				objectId : HANDLE;
				start    : INTEGER;
				count    : INTEGER): BOOLEAN;
def vs.SetTextStyleByClassN(objectId, start, count):
    return BOOLEAN

Parameters

Name Type Description
objectId HANDLE handle to text object
start INTEGER Start position in text string, zero-based.
count INTEGER Length of substring.

Examples

resultOK := SetTextStyleByClassN(objectId, 1, 2);
import vs

# SetTextStyleByClassN sets a specified substring of a text object to use the
# class text style.
objectId = vs.FSActLayer()  # handle to the first selected object on the active layer
start = 1
count = 5

ok = vs.SetTextStyleByClassN(objectId, start, count)
if ok:
    vs.Message('SetTextStyleByClassN succeeded')
else:
    vs.Message('SetTextStyleByClassN failed')

See Also

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

Version

Availability: from Vectorworks 2015

Category