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.

[SOLVED] Floor issue

Anonymous
Not applicable
 ACAPI_Element_GetElemList (API_ObjectID, &elements, APIFilt_OnActFloor);   
   
   for (GS::Array<API_Guid>::ConstIterator it = elements.Enumerate (); it != NULL; ++it) {    
   
         BNZeroMemory (&element, sizeof (API_Element));    
         element.header.guid = *it;    
		 	 GSErrCode	err;   
	err =	 ACAPI_Element_Get (&element);   
if (err == NoError){   
		if ( element.object.libInd == Index)....{

Object index in floor 1 and 0 are the same. But somehow API doesn't recognize object index from floor 0 as required index, floor 1 works fine. Is this a bug ?

EDIT
Ok, i guess after all index aren't same in both floors. Even seems that in 0 floor they are just random. If object is same shouldn't it be with same index as other objects and why this happens only at 0 floor ?

Althought without using this index "search" function index are all same. Seems that ACAPI_Element_GetElemList messes all up.
4 REPLIES 4
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

Could you tell us which version of ArchiCAD do you use?
(main version, build number and localization also please)

Thanks,
Tibor
Anonymous
Not applicable
18, 5100 INT FULL
Anonymous
Not applicable
 ACAPI_Element_GetElemList (API_ObjectID, &elements, APIFilt_OnActFloor);  


Aperantly API_Filt_OnActFloor filtered 0. floor out. Changed filter everything works fine 😉
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
New wrote:
 ACAPI_Element_GetElemList (API_ObjectID, &elements, APIFilt_OnActFloor);  


Aperantly API_Filt_OnActFloor filtered 0. floor out. Changed filter everything works fine 😉
Good to hear that this problem is solved.
Thanks for pointing out this issue!
Learn and get certified!