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.

Gsm object position issue with Archicad


Hi Team,
I am experiencing a problem with a Library Object that I have trying to render through code in Archicad. 
The midpoint of the object while saving it as a gsm is on the center point of the object.
While when i try to create this object to archichad using API, the global position of the object gets defined by the top right corner of the object. No matter the rotation and position, it is always this top left corner from the center point of the IFC structure. 
But if we Place this element through UI, The global position should always be the centre point of the object.


Is there any way to make the the rendering point in archicad from top right corner to the centre?



GSErrCode CreateFurnitureElement(int storey, const char* name, API_Coord pos, double angle)

	API_Element element = {};
	SetAPIElementType(element, API_ObjectID);

	API_ElementMemo memo{};

	GSErrCode err = ACAPI_Element_GetDefaults(&element, &memo);
	if (err != NoError)
		return err;

	element.object.head.floorInd = short(storey);

	Int32 libInd = GetLibraryIndex(name, APILib_ObjectID);
	if (libInd > 0)
		element.object.libInd = libInd;
		element.object.pos = pos;
		element.object.angle = angle;
		err = ACAPI_Element_Create(&element, &memo);
		if (err != NoError)

			return err;
	return NoError;


Thank you.

Learn and get certified!