As soon as AddOns LabPP_Automat means the extension Manager is connected to ArchiCAD in the menu "Design\Design Extras" appears "Lamp - Automatic".

When performing a nested item "Show/hide palette" appears on the screen selection dialog configuration.

Расчеты в ARCHICAD
before LabPP_Automat palette will appear on the screen, worked through software script config.cpp. There are procedures for creating buttons.

This file, like all other script files located in the subdirectory tsprg.


Buttons can be text and icons (more compact). You can create your own images and place them in the images directory.

When you create a button, set its location (x1,y1,x2,y2), the text of the button or the name of the file icons, more text to explain the button's purpose when the mouse is over it, and the name of the file with a software script that will be executed when this button is clicked.

The following is a simplified example of the file config.cpp. In this form, it allows the user when you call the palette LabPP_Automat to choose one of three options for the interface.

iint main()
{
    int w = 40;
    int sx = 1;
    int offsetx = 1;
    int offsety = 1;
    int iPos=0;
    int sy = 1;
    int h = 40;

    ac_request("create_iconbutton","CALC_EXL256.png",sx,sy,sx+w,sy+h,"Open file Excel ","open_excel_file.cpp");
    sx = sx + w + offsetx;
    ac_request("create_iconbutton","excel_to.png",sx,sy,sx+w,sy+h,"Export to Excel","ac_to_excel_1.cpp");

    sy = sy + h + offsety;
    sx = 1;
    ac_request("set_palette_size_and_message_place",80,100,405,300,sx,sy,326-sx*2,200-sy);
}

You can run the same program file with different arguments.
So you can set 3 arguments (integer, floating point and string) with which the file under the button will be executed.
To do this, you need to list these arguments at the end of the command.

Example. Create a button that will run tsprg_8.cpp with arguments (integer = 12, floating point = 1.1 and string argument "Text argument":

int iarg1 = 10;
double darg2 = 0.1;
string sarg3 = "Text argument";
    ac_request ("create_iconbutton", "CALC_H256.bmp", 1,20,41,60, "Reassign prices for roofing materials in the project to data from Excel", "tsprg_8.cpp", iarg1, darg2, sarg3);

Arguments can be 0, the text argument can be = "".
If arguments are specified, then all three must be present in the command, separated by commas.
In the program being run, to get the values of the arguments, use the run_cpp ("get_args", ....) construct;


Thus You can create any number of files of a software script (here it is tsprg_4.cpp and others) and store them in a subdirectory tsprg. To perform them, you can create any number of buttons in various combinations for convenience of the designer, working with ArchiCAD.