BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

How to get all Category and their parameter in ArchiCAD API?

Tran Thanh Lo
Booster

Hi guys,

Could you help me with this question?

I want to know all the parameters that can be added to the schedule (using the 'add fields' button), as shown in the image below.

If you can assist me with this, please explain how to obtain them.

Thank you in advance.

1 REPLY 1
Viktor Kovacs
Graphisoft
Graphisoft

Here is a sample code to access all property groups and properties. This will list user-defined properties (the ones you see in Property Manager) and also built-in properties (the ones you can use in schedules or in find and select).

void DumpAllProperties ()
{
    GS::Array<API_PropertyGroup> groups;
    ACAPI_Property_GetPropertyGroups (groups);
    for (const API_PropertyGroup& group : groups) {
        GS::Array<API_PropertyDefinition> definitions;
        ACAPI_Property_GetPropertyDefinitions (group.guid, definitions);
        for (const API_PropertyDefinition& definition : definitions) {
            GS::UniString report = group.name + "\t" + definition.name + "\t" + APIGuidToString (definition.guid) + "\t" + (definition.canValueBeEditable ? "Editable" : "Read Only");
            ACAPI_WriteReport (report, false);
        }
    }
}

 

Learn and get certified!