cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
CritZer0
Participant

ACAPI_Element_Change with libInd swap on IFC-imported door — does element GUID survive?

We're working on an add-on that converts IFC-imported door and window elements into native parametric ArchiCAD library objects programmatically. I've been able to do this manually by setting up a door in the door tool that matches the correct size of the door, then injecting the properties into the neutral IFC door object that was merged into the PLN.  

 

Our approach: call ACAPI_Element_Change on an IFC-imported door element, masking openingBase.libInd to a valid native library part index, then writing openingBase.width and openingBase.height. This appears to be what the UI's "Inject Element Settings" (Opt+Cmd+Click) does internally. 

 

Three questions:

 

1. Does ACAPI_Element_Change with a libInd swap on an IFC-imported element preserve the element's ArchiCAD GUID — and therefore any attached custom properties?

2. Is this the correct programmatic equivalent of "Inject Element Settings," or is there a dedicated API path for this operation?

3. Are there known restrictions or side effects when calling ACAPI_Element_Change on IFC-imported elements specifically, versus native elements?

 

Further update with precise findings:

 

After `SwapLibraryPart` via `ACAPI_Element_Change`:

- The wall opening (wallhole polygon) retains original IFC dimensions and is not recut

- `ACAPI_Element_GetGDLParameters` fails entirely on the element

- The element appears to be in an intermediate state — geometry correct, but locked

 

The UI `Opt+Cmd+Click` "Inject Element Settings" resolves all three issues simultaneously.

 

Questions:

1. What is the programmatic equivalent of "Inject Element Settings" — specifically the call that switches an IFC-imported door from IFC-driven to GDL-driven mode?

2. Does this involve `ACAPI_Element_Change` with `API_DoorType` + `openingBase` mask, or a separate IFC detach call?

3. After the mode switch, does ArchiCAD automatically recalculate IFC attributes (`OverallWidth`/`OverallHeight`) from GDL parameters on export?

AC29, DevKit 29.3100. Thanks in advance.

 

Operating system used: Mac Apple Silicon Tahoe 26.5.1

2 Replies 2
CritZer0
Participant

Final update — root cause identified:

 

IFC-imported doors have `ParameterTakesPrecedence = FALSE` and `Sizeable = FALSE` as IFC boolean attributes. These prevent GDL parameters from controlling dimensions or the wall opening.

 

Is there a C++ API call to set these two IFC boolean attributes programmatically on an imported door element?

 

Is it `ACAPI_Element_SetIFCAttribute` or part of the IFC Properties API?

Tamas Polyak
Graphisoft
Graphisoft

Hi,

I've entered it as a support issue, and asked a developer to look into it.

 

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!