cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

APIDo_SaveID - saving to .xls from schedule

Anonymous
Not applicable
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
2 REPLIES 2

leilei
Enthusiast
Hi
Maybe you can look at the Do_ExportWallsToExcel function in Database_Control test .

Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
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.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!