APIDo_SaveID - saving to .xls from schedule
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-09-27
08:24 AM
- last edited on
‎2023-07-04
02:07 PM
by
Doreena Deng
‎2018-09-27
08:24 AM
Hello
I am trying to save a interactive schedule as a .xls file using APIDo_SaveID function.
I have been able to open the interactive schedule view and now I want to be able to do a save as.
There is no excel fileTypeID to apply to the API_FileSavePars.fileTypeID structure
//code------
//save file as excel
API_FileSavePars savePara;
std::string newXcelFilename = "exportExcelTest.xls";
BNZeroMemory(&savePara, sizeof(API_FileSavePars));
savePara.fileTypeID = APIFType_TabListFile;
IO::Location folderLoc;
API_SpecFolderID specID = API_UserDocumentsFolderID;
ACAPI_Environment(APIEnv_GetSpecFolderID, &specID, &folderLoc);
savePara.file = new IO::Location(folderLoc, IO::Name(newXcelFilename.c_str()));
err = ACAPI_Automate(APIDo_SaveID, &savePara, nullptr);
I hope someone can help ...please !
Archicad 22
Dev Kit 22.3004
Windows 8
I am trying to save a interactive schedule as a .xls file using APIDo_SaveID function.
I have been able to open the interactive schedule view and now I want to be able to do a save as.
There is no excel fileTypeID to apply to the API_FileSavePars.fileTypeID structure
//code------
//save file as excel
API_FileSavePars savePara;
std::string newXcelFilename = "exportExcelTest.xls";
BNZeroMemory(&savePara, sizeof(API_FileSavePars));
savePara.fileTypeID = APIFType_TabListFile;
IO::Location folderLoc;
API_SpecFolderID specID = API_UserDocumentsFolderID;
ACAPI_Environment(APIEnv_GetSpecFolderID, &specID, &folderLoc);
savePara.file = new IO::Location(folderLoc, IO::Name(newXcelFilename.c_str()));
err = ACAPI_Automate(APIDo_SaveID, &savePara, nullptr);
I hope someone can help ...please !
Archicad 22
Dev Kit 22.3004
Windows 8
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-09-27 09:57 AM
‎2018-09-27
09:57 AM
Hi
Maybe you can look at the Do_ExportWallsToExcel function in Database_Control test .
Maybe you can look at the Do_ExportWallsToExcel function in Database_Control test .

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-09-27 03:03 PM
‎2018-09-27
03:03 PM
Using ACAPI_Automate(APIDo_SaveID,...) the content of the current window cannot be saved to Excel file.
As leilie said, you can find an example in Database_Control Example Add-On for writing Excel files. In that way you can write any data into the Excel file, but you have to collect those informations first.
As leilie said, you can find an example in Database_Control Example Add-On for writing Excel files. In that way you can write any data into the Excel file, but you have to collect those informations first.