BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

replace window with door

Martin Walter
Enthusiast

 

I'd like to replace an element that actually is a window by a door, by changing the used library part.

For replacing library parts window with window or door with door it works perfectly.

But is it possible to change an element from window to door?

My actual code is:

 

	API_ElementMemo elementMemo;
	GSErrCode errorGetMemo = ACAPI_Element_GetMemo(guidElement, &elementMemo);
	if (errorGetMemo != NoError)
	{
		return false;
	}

	// create element mask
	API_Element elementMask;
	BNZeroMemory(&elementMask, sizeof(API_Element));

	// set to door

	ACAPI_ELEMENT_MASK_SET(elementMask, API_Elem_Head, typeID);
	element.header.typeID = API_DoorID;

	ACAPI_ELEMENT_MASK_SET(elementMask, API_DoorType, openingBase.libInd);
	element.door.openingBase.libInd = iLibPartIndexNew;

	errorChangeParams = ACAPI_Element_ChangeParameters({ element.header.guid }, &element, pElementMemo, &elementMask);

 

 

AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb SSD
2 REPLIES 2

I’m sure this ain’t possible as they effectively completely different tools. 

Lee Hankins
ArchiCAD 4.5 - Archicad 27UKI Apple Silicon 27.2.0
macOS Sonoma (14.4.1)
Lingwisyer
Guru

I made a wish regarding the merging of the relevant tools here. If they ever implement this change, it would most likely make your operation possible.

 

 

Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Learn and get certified!

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!