cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
UpperCapybara36
Participant

How to access data on worksheets & Layouts?

I want to be able to check the number of external drawings in a model. i.e DWGs/PDFs project teams have linked in.

So far I am able to do that in the model space using:

 

GS::Array<API_Guid> drawings;
ACAPI_Element_GetElemList(API_DrawingID, &drawings);

for (const auto& g : drawings)
	uniqueDrawings.Add(g);

 

Now, I want to check Worksheets & Layouts, but I cant find a way to do this.

 

BTW I'm very new to the Archicad API so might be missing something easy here.

 

Any help would be most appreciated.

 

Operating system used: Windows 11.26100.8037

1 Reply 1

Many API functions don't directly specify a target database, instead operating on what is designated as the 'current' database. You can change the current database by calling ACAPI_Database_ChangeCurrentDatabase, but I strongly recommend capturing the current database first (with ACAPI_Database_GetCurrentDatabase) and restoring it when finished (otherwise Archicad can behave strangely when the add-on returns control).

 

You can get a list of worksheet databases using ACAPI_Database_GetWorksheetDatabases. There are similar functions for other database types.

Ralph Wessel BArch
Central Innovation

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!