We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-07-25 07:03 PM - last edited on 2024-07-04 09:36 AM by Doreena Deng
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.
2023-07-26 05:30 AM - edited 2023-07-26 05:32 AM
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.
2023-07-26 03:35 PM
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!