2018-12-21
12:53 AM
- last edited on
2022-10-04
04:47 PM
by
Daniel Kassai
2018-12-22 09:12 PM
kzaremba wrote:I've just checked it with this code (simplified version of UpdateOneWindow function from the Element_Test/Src/Element_Modify.cpp):
Mostly I was trying to change API_OpeningBaseType parameters based on Do_ChangeElem form Element_test. But in the case of empty opening, it doesn't work.
static void UpdateOneWindow (const API_Guid& guid)
{
API_Element element = {};
API_Element mask = {};
GSErrCode err;
element.header.guid = guid;
err = ACAPI_Element_Get (&element);
if (err == NoError) {
ACAPI_ELEMENT_MASK_CLEAR (mask);
ACAPI_ELEMENT_MASK_SET (mask, API_WindowType, openingBase.width);
ACAPI_ELEMENT_MASK_SET (mask, API_WindowType, openingBase.height);
element.window.openingBase.width *= 2.0;
element.window.openingBase.height += 0.2;
err = ACAPI_Element_Change (&element, &mask, nullptr, 0, true);
}
}
It worked for empty openings also.
kzaremba wrote:Yes, you should check the verticalLink field of the API_OpeningBaseType structure. The sill or header of the window/door can be linked to the top/bottom of the wall, so the distance can be fix.
Are there any other parameters to change?
2018-12-26 03:21 PM
Tibor wrote:Thanks, I have missed this one somehow and tried the version with markers based on Ext .
UpdateOneWindow
Tibor wrote:Thanks a lot. I figured out that Value is stored in lower parameter but could find linking props.
verticalLink