Replace in String [REPLACE]

Replaces a given number of characters within a string with another string, starting from a specified position.

Syntax

REPLACE (“OldText”, Position, NumberOfCharacters, “NewText”)

Note: The required separator (comma or semi-colon) automatically corresponds to your computer’s location settings.

Data Types of the Arguments

Old and new text: String

Starting Position: Integer

Number of Characters: Integer

Data Type of the Result

String

Example

In the string “2017”, start at position 3, and replace two characters with “18”

Expression

REPLACE (“2017”, 3, 2, “18”)

Result

2018

Notes

Use Substitute Strings [SUBSTITUTE] to replace one string with another, in all instances or a particular instance.

Use REPLACE to change a particular string to another string, with a given starting position.

  • Was this Helpful ?
  • YesNo
Relevant topics
Replace Attributes by File: Automate Attribute Migration
If you are migrating multiple similar project files to Archicad 17 , the Replace Attributes by File function can help you speed up the migration process: it automates the Delete and Replace attributes function, instead of you having to issue repetitive…
Search and Replace Text
The Search and Replace Text function is available for the following text-type elements in ARCHICAD: •Text blocks placed with the Text ...