cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
_carlos
Contributor

ACAPI_Property_CheckPropertyExpressionString crashes Archicad 29 on unknown function names

**Subject:** C++ API – ACAPI_Property_CheckPropertyExpressionString crashes Archicad and returns inconsistent results

**Environment:** Archicad 29 (build 5101), Windows, Spanish version (regional list separator `;`).
**Bug ID:** AC29-2026-10-28-16-19-41-5295

**How to reproduce**
Call `ACAPI_Property_CheckPropertyExpressionString (&expression)` from an add-on, one expression per call. Reproduced with the open-source Tapir add-on, whose command does nothing else (https://github.com/ENZYME-APD/tapir-archicad-automation/pull/1146).

**1. Crash.** Archicad terminates (reproduced 5 times) with:
- `FOOBAR ( 1 )` (unknown function name) — this is the attached Bug ID
- `CONCATENAR ( "a", "b" )` (the same with `;` returns valid)
- `CONCAT ( ###Property:<Group> / <Name>###, "_X" )`

Expected: an error code (e.g. APIERR_BADEXPRESSION), never a crash.

**2. Wrong results.**
- Reported **invalid**: `1`, `1 + 1`, `"OK"`, `CONCAT ( "a", "b" )`, and `CONCAT ( ###Property:<GUID>###, "_X" )` — the stored form that `ACAPI_Property_CreatePropertyDefinition` / `ChangePropertyDefinition` require and that Archicad itself returns in `propertyExpressions`.
- Reported **valid**: `CONCAT ( "a"; ` (unclosed parenthesis), `<ref> * (`, and an empty string.
- Reported **valid** but rejected by Create/ChangePropertyDefinition: `{Property:<GUID>}`, `{Property:<Group>/<Name>}`, and the `;` separator.

**Expected**
- No crash on any input.
- The checker should validate the same syntax that Create/ChangePropertyDefinition accept, or the documentation should state which syntax each function expects.
Related: https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/td-p/603...

 

Operating system used: Windows 11 24H2

1 Reply 1
Tamas Polyak
Graphisoft
Graphisoft

Hi,

I've checked the code according your steps to reproduce, and unfortunately it is a bug, I'll enter it as such.

 

The API uses the same stored-expression syntax for checking, creating, changing, and returning property definitions.

 

The apparent acceptance of `;`, `{Property:...}`, incomplete expressions, and empty strings is not because of an editor-syntax dialect.

There is no verified crash-safe workaround for validating arbitrary input through this checker. Simply reversing its result does not address the crash. Create/Change should not be used as substitute validators: they modify the project and share the affected validation helper.

 

Best regards,

Tamás

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!

Video Thumbnail