Skip to content

Latest commit

 

History

History
61 lines (51 loc) · 1.41 KB

File metadata and controls

61 lines (51 loc) · 1.41 KB

ReplaceText

Description

Procedure ReplaceText replace the oldText with the newText of the referenced text object.

PROCEDURE ReplaceText(
				objectHd   : HANDLE;
				oldText    : STRING;
				newText    : STRING;
				replaceAll : BOOLEAN;
				isCaseSens : BOOLEAN);
def vs.ReplaceText(objectHd, oldText, newText, replaceAll, isCaseSens):
    return None

Parameters

Name Type Description
objectHd HANDLE Handle to text object.
oldText STRING Old text string value.
newText STRING New text string value.
replaceAll BOOLEAN Flag whether to replace all oldTexts or first found text.
isCaseSens BOOLEAN Flag whether to be case sensitive.

Examples

ReplaceText(hText,'Old text', 'New', TRUE, FALSE);
2:	BEGIN
	SearchTxtObj := TRUE;
	gStop := TRUE;
	ReplaceStr(FldStr,gFindString,gReplString,gCase);
	ReplaceText(HObj, gFindString, gReplString, FALSE, gCase);
	GOTO 97;
	END;
import vs

# Procedure ReplaceText replace the oldText with the newText of the
# referenced text object.
objectHd = vs.FSActLayer()  # handle to the first selected object on the active layer
oldText = 'Example text'
newText = 'Example text'
replaceAll = True
isCaseSens = True

vs.ReplaceText(objectHd, oldText, newText, replaceAll, isCaseSens)

Version

Availability: from Vectorworks 2025

Category