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| Name | Type | Description |
|---|---|---|
| objectId | HANDLE | handle to text object |
| start | INTEGER | Start position in text string, zero-based. |
| count | INTEGER | Length of substring. |
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')VS Functions: SetTextStyleRef | GetTextStyleRef | SetTextStyleRefN | GetTextStyleRefN | SetTextStyleByClass | SetTextStyleByClassN | IsTextStyleByClass | IsTextStyleByClassN
Availability: from Vectorworks 2015