2025-12-04 05:58 AM
The following code for loading IFC files, which worked in ArchiCAD 28, now returns error -7003 in ArchiCAD 29.
The same procedure works fine with pln files.
What could the problem be?
API_FileOpenPars fop;
BNZeroMemory(&fop, sizeof(API_FileOpenPars));
fop.fileTypeID = APIFType_IfcFile;
fop.useStoredLib = true;
GS::UniString IfcFile = <The correct Ifc file path>;
IO::Location IfcLoc(IfcFile.ToCStr());
fop.file = &IfcLoc;
err = ACAPI_ProjectOperation_Open(&fop);
Solved! Go to Solution.
2026-01-29 04:20 PM - edited 2026-01-29 04:24 PM
Hi,
You actually found a bug in the Japanese version of AC29. It tries to load the IFC translator from the default template file, and because of an error in the resources it doesn't find it and aborts the open operation.
The bug is fixed, and is going to come out in update 1.
In the mean time, if you duplicate the default template file ("C:\Program Files\Graphisoft\Archicad 29\Defaults\Archicad\Archicad 29 汎用テンプレート.tpl") and rename it to Archicad 29 テンプレート.tpl the addon will work again.
Best regards,
Tamás
2025-12-04 07:37 AM
I checked the definition of "APIFType_IfcFile", which I hadn't checked before, and found that it says "save only".
As far as I can tell, it seems to have been written as such since ArchiCAD 21, so perhaps it was just a coincidence that it was usable until now, and that it became fully unusable in ArchiCAD 29, when IFC implementation became stricter?
If there are any alternative methods, I would appreciate it if you could let me know.
2025-12-15 11:45 AM
Hi,
What happens if you don't specify the fileTypeID? The code should be able to derive that from the file extension.
Best, Akos
2025-12-16 02:25 AM
>What happens if you don't specify the fileTypeID? The code should be able to derive that from the file extension.
In this case, "err = ACAPI_ProjectOperation_Open(&fop);" will return "APIERR_BADPARS" and nothing will happen.
If "APIFType_IfcFile" is specified, a progress dialog like the one in the attached image will be displayed and the "open" operation will proceed partway, but ultimately the error "-7003" will be returned and the "open" will fail.
2025-12-16 02:40 AM
2026-01-09 11:47 AM - edited 2026-01-09 11:48 AM
Hello,
I simpified your code a little bit (see below) and tried it on my Mac in Archicad 29 (build 3200), and in the current development version, and file was opened in both cases without any error. Also, I haven't seen any IFC-related fixes in the Archicad 29 code since the release.
Could you please recheck with this code?
Thanks, Ákos
API_FileOpenPars fop {};
fop.fileTypeID = APIFType_IfcFile;
fop.useStoredLib = true;
GS::UniString IfcFile ("/Users/somorjai/Downloads/LightCadOut.Ifc");
IO::Location IfcLoc (IfcFile);
fop.file = &IfcLoc;
GSErrCode err = ACAPI_ProjectOperation_Open (&fop);
2026-01-13 07:06 AM
Thinking that the problem might be due to differences in the initialization of API_FileOpenPers or the way files are handled, I created an add-on using only the code you provided and ran it, but I still received error -7003.
I'm very sorry for not mentioning this in my initial post, but our company is currently developing using Visual Studio 2022 version 17.14.23 on Windows 11 25H2.
I apologize for the inconvenience, but could you please check again in a Windows environment?
Thank you in advance.
2026-01-14 10:01 AM
Hi!
I've tried Ákos's code on Windows, and it opened the given IFC file without errors.
I've also used 25H2 Windows 11 and the recommended compiler, Visual Studio 2022. Compiler version 19.41.34120.
Best, Tamás
2026-01-15 06:34 PM
Another idea is, if the problem is not the compiler version, please check the _ITERATOR_DEBUG_LEVEL macro, because if set to 2, it can cause unexpected errors and crashes: Possible cause of random crashes on Windows - Graphisoft Community
Best regards,
Tamás
2026-01-16
02:13 AM
- last edited on
2026-01-16
12:53 PM
by
Laszlo Nagy
Thank you for checking.
The compiler version I'm using here is 19.44.35222.
Also, the debug build's _ITERATOR_DEBUG_LEVEL is set to 0 in the preprocessor definition, as shown in the attached image.
Thinking that there might be a problem with the project configuration, I ported the code provided in your sample "Communication_Manager," but I still get the -7003 error.
If possible, could you please provide a working sample project?
Thank you in advance.