cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
noriksaroyan
Booster

Getting all doors and properties

Hey everyone! 

I need to get all doors from active archicad project and all their properties such as height, width, material etc.) and I have a question. 

I've read the documentation and I wanted to know if I'm thinking the right way:

it seems that I need to do certain steps.

1. get all ids using something like this:

 

static GS::Array<API_Guid> GetAllDoorIds(){
    GS::Array<API_Guid> doorGuids;
    GSErrCode err = ACAPI_Element_GetElemList(API_DoorID,&doorGuids);
    if (err != NoError){
        return ;
    }
    return doorGuids;
}

 

2. I need to get all ids of properties. 

3. I have to iterate on every element .

 

If the steps I described above are somehow right, I would kindly ask for someone to assist with what are the names of these functions, because I've been searching for them in api-reference and, unfortunately,  I couldn't find them. 

 

 

2 Replies 2
ReignBough
Enthusiast
  • ACAPI_Goodies
    • APIAny_OpenParametersID - starts a parameter operation
    • APIAny_GetActParametersID - gets the parameters of an instance/actual element
    • APIAny_CloseParametersID - ends a parameter operation

I put any code between open and close parameter inside a "{}" to mark the scope of this operation.

 

I also advise you to create a wrapper function that will convert the output of APIAny_GetActParemeters into a std::map or GS::HashTable (or any key-val) where key is the parameter name (API_GetParamsType->API_AddParType->name) and value is API_GetParamsType->API_AddParType. This is to make the parameter/s you need easier to find.

~ReignBough~
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
noriksaroyan
Booster

I need to store them in json file, so I guess it won't be necessary to wrap it, probably would just store raw data into the json. Thanks for info!

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!