cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to get Element Type Category Name from api?

bharat_hs_nct
Contributor

Hello All, 

 

I'm working on a project in which there is a requirement to list all element types(walls, columns, etc) (similar to Families in Revit) and their sub-categories.

 

It would be a great help if you suggest on how to get the element category labels from API which are marked in the attached image. 

 

For example,

Element_Category_Names.png

I would like to get the names of Wall categories like Generic Exterior Wall, Generic Interior Wall,  etc.

 

Thank you for the support

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Viktor Kovacs
Graphisoft
Graphisoft

There are element types, and Favorites for each element type. To see the list of element types check the APIdefs_Elements.h file in the development kit and see the values of the API_ElemTypeID enum. To get the Favorites for an element type use the ACAPI_Favorite_GetNum and ACAPI_Favorite_Get functions.

View solution in original post

4 REPLIES 4
Viktor Kovacs
Graphisoft
Graphisoft

Those are called Favorites in Archicad and they work differently than Revit Types. Favorites are stored settings for a certain Element type and you can use these settings when creating a new Element. After the Element is created there is no connection to the original Favorite.

 

This is a great starting point for handling Favorites from the API:

https://graphisoft.github.io/archicad-api-devkit/group___favorite.html

 

Thanks for the reply Viktor,

 

I understand that they are not exactly as Revit Families but I just wanted to confirm that whether all element types are listed in 'Favorites' window or just user selected.

 

In case all element types are not listed here, where can I access them with the names and subcategories?

 

What I'm expecting would be similar to the attached image of example of Revit families and subtypes. 

Like: Wall >

                   Generic Exterior Wall

                   Generic Interior Wall

 

Thanks in advance .

 

Revit_Families_Example.png

Solution
Viktor Kovacs
Graphisoft
Graphisoft

There are element types, and Favorites for each element type. To see the list of element types check the APIdefs_Elements.h file in the development kit and see the values of the API_ElemTypeID enum. To get the Favorites for an element type use the ACAPI_Favorite_GetNum and ACAPI_Favorite_Get functions.

Thank you for the confirmation.