Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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

C++/Bounds cannot be obtained.

nishida_jp
Participant

Bounds cannot be obtained.

 

ArchiCAD27/Win10
I am creating an add-on with VisualStudioC++2019.

 

When I place one column and one beam and try to obtain the bounds for each, the following values ​​are returned:

xMin = 1.0
yMin = 1.0
zMin = 1.0
xMax = -1.0
yMax = -1.0
zMax = -1.0

Guid=6A873A33-3449-4C7F-A140-36D4C8FF3B16
BoundsMin 1.000000 1.000000 1.000000
BoundsMax -1.000000 -1.000000 -1.000000
Volume 0.325369
Guid=51ED5443-8EE8-4C02-AE2D-1E58540E5CDD
BoundsMin 1.000000 1.000000 1.000000
BoundsMax -1.000000 -1.000000 -1.000000
Volume 0.049327

Bounds is
ACAPI_ModelAccess_Get3DInfo(head, &info3D);
The function return value is NOERROR.
Why does Bounds return such a fixed value?

 

 

1 REPLY 1
LChen
Graphisoft
Graphisoft

Hi, You're right, it seems be a bug. As a workaround, please try the following code for getting the bounds of element.

API_Box3D box{};
err = ACAPI_Element_CalcBounds(&head, &box);

HTH.