Archicad C++ API
About Archicad add-on development using the C++ API.

[Developer API] How I can get data from Schedules?

Anonymous
Not applicable
I need to get the data from the Schedule for further calculations in the project.
How do I get this data?
9 REPLIES 9
felcunha
Expert
Well, you can save your schedule as Excel file... Just do Save as...
Felipe Ribeiro Cunha

AC 26, macOS Monterey
Anonymous
Not applicable
Unfortunately this is no good.
It is necessary to receive numbers in dynamics directly from Schedule.
felcunha
Expert
Can you be more specific? Maybe you can use the expressions available in AC22...
Felipe Ribeiro Cunha

AC 26, macOS Monterey
Ralph Wessel
Mentor
I'm not aware of any API functionality relating to schedules unfortunately. I suspect they don't support any kind of developer interaction.
Ralph Wessel BArch
Anonymous
Not applicable
It's not very good(.
I am asked to read Schedule for use in C ++ scripts in ARCHICAD (LabPP_Automat).
Otherwise, users have to do monkey work - to collect data twice - in Schedules and in the script.
It would be great if they get into the program right away, like:
int main ()
{
double dResult1, dResult2;
ac_request ("get_schedule_result", "My Schedule1", dResult1);
ac_request ("get_schedule_result", "My Schedule2", dResult2);
dResult3 = dResult1 + dResult2 ...
cout << dResult3;
...
}
Akos Somorjai
Graphisoft
Graphisoft
Tsepov wrote:
It's not very good(.
I am asked to read Schedule for use in C ++ scripts in ARCHICAD (LabPP_Automat).
Otherwise, users have to do monkey work - to collect data twice - in Schedules and in the script.
It would be great if they get into the program right away, like:
int main ()
{
double dResult1, dResult2;
ac_request ("get_schedule_result", "My Schedule1", dResult1);
ac_request ("get_schedule_result", "My Schedule2", dResult2);
dResult3 = dResult1 + dResult2 ...
cout << dResult3;
...
}
Could you please give an example for dResult?

Thanks, Akos
Anonymous
Not applicable
//It may be used as this:

string svalue = sprintf("%0.3f",dResult);
// We can put it to Excel
excel_attach();
excel_select_range("A1:A1");
excel_putstrvalue("My comment");
excel_select_range("B1:B1");
excel_putstrvalue(svalue);
excel_detach();
// And can put to autotext
ac_request("autotext","set","Building plot S",svalue);
// and so on...

Full work script text - in attachment
And on YouTube
Not sure if I can link to a YouTube video here
Anonymous
Not applicable
I made the free add-ons LabPP_GoodwinGDL, that can now also run C ++ scripts in ARCHICAD.
But I can not yet access the total Schedules values (
Is it really impossible
Barry Kelly
Moderator
I am no expert - especially when it comes down to API dev.
But as far as I know, schedules are just a list of criteria that search for certain elements and then output required values.
I don't think there are any values saved in a schedule itself, so your API will need to do the same search for elements to retrieve the values - so doing it twice as you say.
Or are you saying you want to access the schedule criteria rather than creating that twice?

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11