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

Layout name returned with layout number?

Ben Cohen
Enthusiast
Hi

I am trying to retrieve a list of all the layout names, but I get the layout number included with the name. My code looks something like this

for (GSIndex i = 0; i < nDbases; i++) {
API_DatabaseInfo dbPars;
BNZeroMemory (&dbPars, sizeof (API_DatabaseInfo));
dbPars.databaseUnId = dbases;

if (ACAPI_Database (APIDb_GetDatabaseInfoID, &dbPars, NULL) == NoError) {
API_LayoutInfo layoutSets;
if (ACAPI_Environment (APIEnv_GetLayoutSetsID, &layoutSets, &dbPars.databaseUnId, NULL) == NoError) {
DBPrintf ("Layout Name-------------------------------------: %s\n", layoutSets.layoutName);
}
}
}


Any ideas on what I need to change? TIA.
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
2 REPLIES 2
Anonymous
Not applicable
Hi,

API_LayoutInfo has the Boolean member ‘doNotIncludeInNumbering’.
If ‘doNotIncludeInNumbering’ is true layoutName include the number, if false layoutName is only the Name.

Manipulate your string using ‘doNotIncludeInNumbering’ value, ‘customLayoutNumber’ and ‘customLayoutNumbering” or go to layout book select the checkbox “Do not include this Layout in ID sequence”.
Ben Cohen
Enthusiast
Thanks Ranga

I should of clicked to that!. You've helped me heaps. Thanks for the reply and have a good Xmas
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au