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.

My error with API Dev Kit

Anonymous
Not applicable
Hi, All

I wish to make MFC DLL (Regular DLL with MFC statically linked) in VS 2005 C++ with API Dev Kit 11.

In procedure :
static void Do_Open (void)
{ API_FileOpenPars fop;
GSErrCode err;

BNZeroMemory (&fop, sizeof (API_FileOpenPars));

fop.fileTypeID = APIFType_PlanFile;
fop.useStoredLib = true;

IO::Location folderLoc;
API_SpecFolderID specID = API_ApplicationFolderID;
ACAPI_Environment (APIEnv_GetSpecFolderID, &specID, &folderLoc);
folderLoc.AppendToLocal ("ArchiCAD Examples");
folderLoc.AppendToLocal ("Residential House");

fop.file = new IO::Location (folderLoc, "Residential House.pla");

err = ACAPI_Automate (APIDo_OpenID, &fop, NULL);
if (err != NoError) {
char msgStr[256];
sprintf (msgStr, "Error in APIDo_OpenID: %d", (int) err);
ACAPI_WriteReport (msgStr, true);
}

delete fop.file;

return;
}

I got error : error C3861: 'ACAPI_Environment': identifier not found.

Where find this procedure?

Hope to your help!
Thanks in advance.
0 REPLIES 0
Learn and get certified!