cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Tran Thanh Lo
Booster

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

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.


2024-03-19_16-08-07.png

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);
        }
    }
}

 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!