We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Unnecessary Columns Movement

HKM
Contributor

Archicad26 / API Development Kit 26.3000 / Windows10
Use 'ACAPI_Element_Change()' on a column whose 'coreAnchor' is other than 4, it will be moved in parallel.
This can be confirmed with "Do_Change_ElemParameters()" in the SDK "Element_Test".
Is there a way to avoid this problem?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
LChen
Graphisoft
Graphisoft

I see, I've asked our API developer to check whether it's an bug issue. As a workaround, I'd suggest you to shift origoPos to anchor point before calling ACAPI_Element_Change() if the anchor is not 4 in this case.

For example:

ACAPI_ELEMENT_MASK_SET(mask, API_ColumnType, origoPos);
element.column.origoPos.x (+-) = half of column width;
element.column.origoPos.y (+-) = half of column depth;
err = ACAPI_Element_Change();

 HTH.

View solution in original post

8 REPLIES 8
HKM
Contributor

Confirmed the same problem with Archicad27.
Archicad27 / API Development Kit 27.3001 / Windows10

20240206.jpg

HKM
Contributor

Does anyone other than me have this problem?
Or am I misunderstanding something?
Any advice would be helpful.

LChen
Graphisoft
Graphisoft

Hi,

I'm not clear what the problem you mentioned. When you try to modify a column coreAnchor=4 to coreAnchor=6, it means the left bottom corner of column will be moved to the position of the center of colmun because you didn't change the origoPos.

 

HTH

Let me explain the procedure.
1. Draw a column.
2. In the column settings(ctrl+T), change the anchor to something other than the center.
3. Execute "Do_Change_ElemParameters()" in the SDK "Element_Test" on the column.
4. The column will move.
(If the column anchor is at the center it not move.)

LChen
Graphisoft
Graphisoft

Sorry I couldn't reproduce this issue following your steps, I'd suggest you update AC27 to the latest release(27.2.1) and try again.

HTH 

This issue occurs even in the latest environment.
Archicad solo 27 (version 27.2.1)(5031) / API Development Kit 27.3001 / Windows10

ColumnWillMode_20240606.jpg

Solution
LChen
Graphisoft
Graphisoft

I see, I've asked our API developer to check whether it's an bug issue. As a workaround, I'd suggest you to shift origoPos to anchor point before calling ACAPI_Element_Change() if the anchor is not 4 in this case.

For example:

ACAPI_ELEMENT_MASK_SET(mask, API_ColumnType, origoPos);
element.column.origoPos.x (+-) = half of column width;
element.column.origoPos.y (+-) = half of column depth;
err = ACAPI_Element_Change();

 HTH.

Thank you for providing the workaround.
Hopefully this issue will be resolved in Archicad 28.

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!