Skip to content

Latest commit

 

History

History
62 lines (52 loc) · 1.63 KB

File metadata and controls

62 lines (52 loc) · 1.63 KB

SetTextStyleRefN

Description

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

Parameters

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

Examples

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')

See Also

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

Version

Availability: from Vectorworks 2015

Category