cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Acapi_get_elemlist sometimes return 0 elements??

Hello

I have a really weird bug.
I am using acapi_element_getelemlist. I am trying to get all the elements that has 3D representation and that are on visible layers.
So the command is:
ACAPI_Element_GetElemList(API_ZombieElemID, APIFilt_In3D | API_Filt_OnVisLayer);

Sometimes my elemlist gets 0 items! When of course my scene is full of elements!
I didn’t yet realize why this is happening but I think it happens when calling this command after the user created a new layout, or calling this command after the file was opened (before doing anything to the scene)

This is really weird.

Thanks in advance!
1 Solution

Accepted Solutions
Try making the floor plan database active with APIDb_ChangeCurrentDatabaseID first, and then try ACAPI_Element_GetElemList.
Ralph Wessel BArch
Central Innovation

Go to post

4 Replies 4
What kind of view is active when you call ACAPI_Element_GetElemList, e.g. floor plan, section, 3D?
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Ralph wrote:
What kind of view is active when you call ACAPI_Element_GetElemList, e.g. floor plan, section, 3D?
Hmm, on most tests I was on layout view.
Try making the floor plan database active with APIDb_ChangeCurrentDatabaseID first, and then try ACAPI_Element_GetElemList.
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Ralph wrote:
Try making the floor plan database active with APIDb_ChangeCurrentDatabaseID first, and then try ACAPI_Element_GetElemList.
Thanks. It’s weird that this function works just in this type of active dB..
At least that solves it

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!