Contains [CONTAINS]

Checks whether a specified string is contained within a text.

Returns True if the string is present

Returns False if the string is not present

Case sensitive by default. (Otherwise, enter False for the CaseSensitive argument.)

Syntax

CONTAINS (“FindText”, “WithinText”, [CaseSensitive])

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

Data Types of the Arguments

All Texts: String

Case sensitive (optional) True/False

Data Type of the Result

True/False

Example

Based on the text of a manufacturers catalog: Display the appropriate length unit (either cm or inches) for a chair’s Height value.

Here, the catalog text (a string) is a predefined property value called HeightInString.

This string is transformed into a number (using STRTONUM).

It is then multiplied by the appropriate length unit (either cm or inches, depending on whether the string contains the “cm” tag: this is determined by the CONTAINS function).

The result is a Length-type property.

Expression

STRTONUM (HeightInString) * IF (CONTAINS (“cm”, HeightInString), 1 cm, 1 in)

Result

For a HeightInString property string value of “150 cm”, displays a length value of “150 cm”.

  • Was this Helpful ?
  • YesNo
Relevant topics
GDL Object Editor
The GDL Object Editor contains all controls needed to edit a GDL object. For a detailed description of scripting commands and object-level ...
File/Folder Versions Panel
The Versions Panel is available for a selected folder or any single uploaded file. For a Selected Folder: Use these controls to retrieve any earlier version of this folder, along with all uploaded files which the folder contains. 1.Select a selected folder from the Projects page ...
Migrating PlotMaker Layout Books to ARCHICAD 25
Migrate from ARCHICAD 8.1/9 and PlotMaker 8.1/9. This chapter contains detailed information about how to migrate your ARCHICAD 8.1 or ARCHICAD 9 project files and PlotMaker 8.1 or PlotMaker 9 Layout Books into ARCHICAD 25. Note: In this description, version ...