2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2024-06-25 09:13 AM - last edited on 2024-06-28 07:08 PM by Laszlo Nagy
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,
I would like to get the names of Wall categories like Generic Exterior Wall, Generic Interior Wall, etc.
Thank you for the support
Solved! Go to Solution.
2024-06-25 11:19 AM
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.
2024-06-25 09:43 AM
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
2024-06-25 10:28 AM - last edited on 2024-06-28 07:12 PM by Laszlo Nagy
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 .
2024-06-25 11:19 AM
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.
2024-06-25 12:40 PM
Thank you for the confirmation.