SetTextStyleRefN sets the text style of a specified substring of a text object to the referenced style. Reference 0 means Un-Styled. This procedure will replace by-class styling.
FUNCTION SetTextStyleRefN(
objectId : HANDLE;
start : INTEGER;
count : INTEGER;
textStyleRef : LONGINT): BOOLEAN;def vs.SetTextStyleRefN(objectId, start, count, textStyleRef):
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. |
| textStyleRef | LONGINT | text style reference id |
resultOK := SetTextStyleRefN(objectId, 1, 2, 3);import vs
# SetTextStyleRefN sets the text style of a specified substring of a text
# object to the referenced style.
objectId = vs.FSActLayer() # handle to the first selected object on the active layer
start = 1
count = 5
textStyleRef = 0
ok = vs.SetTextStyleRefN(objectId, start, count, textStyleRef)
if ok:
vs.Message('SetTextStyleRefN succeeded')
else:
vs.Message('SetTextStyleRefN failed')VS Functions: SetTextStyleRef | GetTextStyleRef | GetTextStyleRefN | SetTextStyleByClass | SetTextStyleByClassN | IsTextStyleByClass | IsTextStyleByClassN
Availability: from Vectorworks 2015