APIERR_BADWINDOW when save as ifc
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-17
03:37 PM
- last edited on
ā2021-09-14
01:36 PM
by
Noemi Balogh
ā2020-12-17
03:37 PM
Hello.
I am trying to save as an IFC file in ArchiCAD 22.
But I got the APIERR_BADWINDOW error code from ACAPI_Automate(APIDo_SaveID, &fsp, &pars_ifc).
The following are the parameters entered before running ACAPI_Automate.
GS::UniString filePath = L"C:\\...............ifc";
API_FileSavePars fsp;
API_SavePars_Ifc pars_ifc;
BNZeroMemory(&fsp, sizeof(API_FileSavePars));
BNZeroMemory(&pars_ifc, sizeof(API_SavePars_Ifc));
fsp.fileTypeID = APIFType_IfcFile;
fsp.file = new IO::Location(filePath);
pars_ifc.subType = API_IFC;
I don't know why I got this error.
It works on the computer I've been developing on, but I get errors on a few other computers.
I am trying to save as an IFC file in ArchiCAD 22.
But I got the APIERR_BADWINDOW error code from ACAPI_Automate(APIDo_SaveID, &fsp, &pars_ifc).
The following are the parameters entered before running ACAPI_Automate.
GS::UniString filePath = L"C:\\...............ifc";
API_FileSavePars fsp;
API_SavePars_Ifc pars_ifc;
BNZeroMemory(&fsp, sizeof(API_FileSavePars));
BNZeroMemory(&pars_ifc, sizeof(API_SavePars_Ifc));
fsp.fileTypeID = APIFType_IfcFile;
fsp.file = new IO::Location(filePath);
pars_ifc.subType = API_IFC;
I don't know why I got this error.
It works on the computer I've been developing on, but I get errors on a few other computers.
Labels:
- Labels:
-
Add-On (C++)
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-20 09:43 AM
ā2020-12-20
09:43 AM
APIERR_BADWINDOW usually means that the required operation is not possible over the currently opened window type. IFC export works only when you are in a 2D or 3D window, but it doesn't available when you are in, for example, a section window. The API works the same as Archicad, it returns APIERR_BADWINDOW if you are in a window where the command is not available.