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

"APIDb_GetExtent3DID" does not return correct value when GDL is included.

HKM
Contributor

API_Box3D objBox3 = { 0,0,0,0,0,0 };
ACAPI_Database(APIDb_GetExtent3DID, &objBox3);
//
If a GDL that is partially displayed by the 3Dfilter is included, the entire GDL range is returned instead of the displayed part.
If GDL is not included (columns and beams, etc.), the partially displayed range due to the 3Dfilter will be returned.
Please tell me how to obtain the range displayed by the 3Dfilter even if GDL is included.

note)
Windows10
Archicad26
API Development Kit 26.3000
Visuial Studio 2019

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
LChen
Graphisoft
Graphisoft

I think the problem is the editable 3D hotspot are used in this table object which seems affacts this function. I'll report this issue to our developers.

Thanks!

2024-06-11_16h01_40.png 

View solution in original post

7 REPLIES 7
HKM
Contributor

addition)
If a GDL object is partially displayed due to a "3D Cutting Plane", the entire size including the hidden part will be returned.
In the case of walls or beams, only the visible part will be returned.

LChen
Graphisoft
Graphisoft

Hi,

I've tried to reproduce the problem you mentioned, but failed. I added a cutplane in gdl and checked box zMax, it changes when switched ON/OFF cutopt parameter.

if cutopt then
	addz 3
	roty 20
	CUTPLANE
	del 2
endif

block a,b,zzyzx

if cutopt then
	cutend
endif

 

Thank you for your answer.
But it's not what I want to know.

1. Create a selection shape on the Floor Plan that intersects with the GDL object.
2. Press [F5] on the keyboard.
3. The GDL object is cropped.
4. Run APIDb_GetExtent3DID().
5. The result is an uncropped GDL.

LChen
Graphisoft
Graphisoft

Sorry I couldn't reproduce the problem following your steps...

Let me send you a pln file I tested. Also here is the code I tried:

API_Box3D	box{};
ACAPI_Element_GetExtent3D ( &box );

I can see the return values of box.xMax, box.yMax changes based on the selection shape.

Note, I tested on AC27.2.1, is it an issue only happens on AC26?

HTH 

I tried it with Archicad27.
It worked fine with the GDL columns you provided.
But the crop is ignored with the office table in the library.

ReturnSameSize_20240607.jpg

Solution
LChen
Graphisoft
Graphisoft

I think the problem is the editable 3D hotspot are used in this table object which seems affacts this function. I'll report this issue to our developers.

Thanks!

2024-06-11_16h01_40.png 

Thank you.
I think, if the hotspot has substance it should be cropped, if it has no substance it should not be included in the bounds size.

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!