Python - List of names of the built-in properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21
05:02 PM
- last edited on
‎2021-09-15
10:33 AM
by
Noemi Balogh
Does any know how to fetch the list of all the available built-in properties like "General_ElementID" for 'Element ID' available in the Python API?
Thanks.
Solved! Go to Solution.
- Labels:
-
Automation (Python or JSON)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21 06:01 PM
You can get a list of all properties by using the function GetAllPropertyNames()
Windows 11 - Visual Studio 2022; ArchiCAD 27

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21 06:01 PM
You can get a list of all properties by using the function GetAllPropertyNames()
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21 07:32 PM
What did you mean by "User properties separate the group and property name which is why they require separate functions to recall." ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21 08:26 PM
acu,GetUserDefinedPropertyId which takes a group name and property name
acu.GetBuiltinPropertId which takes only the property name.
OR
You could create separate property classes (PropertUserId) one for builtin and one for property custom. The difference types require different inputs. Then use the common function acc.GetPropertyId(PropertyUserId) for both.
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-21 08:29 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-22 12:28 PM
There are two different types of Properties in ARCHICAD: User-Defined and Built-In.
User-Defined Properties
The User-Defined Properties are the ones you see in the Property Manager Dialog. Users can modify the name of these Properties so you can access them by the name you see on the user interface. We call this localized name. The localized name contains two strings the Group Name and the Property Name (as seen in Property Manager Dialog) and it's unique. Note, there can be two User-Defined Properties in two separate Groups with the same Property Name.
Please note, these User-Defined Properties are belong to the current project and may be not available in other projects. So if you refer to any User-Defined Property in your Python script, then it may not work with some projects.
Built-In Properties
The Built-In Properties are the ones defined by ARCHICAD. The user can't modify the name of these Properties so you can access them by their internal name. We call this non-localized name. If you use properties with non-localized names your script will be independent of the language of the ARCHICAD user interface.
Note, the non-localized names of Built-In Properties won't be changed between ARCHICAD updates and versions. So if you refer to any Built-In Properties in your Python script, then your script should work with any projects and any ARCHICAD versions.
You can find all the available Built-In Properties and currently available User-Defined Properties with the GetAllPropertyNames command.
As Python API is based on the JSON API, I recommend you to read the documentation of the JSON API:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-22 12:47 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-22 12:53 PM
- By using GetBuiltInPropertyId and GetUserDefinedPropertyId utility functions to retrieve the identifiers of the properties:
from archicad import ACConnection conn = ACConnection.connect() acc = conn.commands act = conn.types acu = conn.utilities zoneNumberPropertyId = acu.GetBuiltInPropertyId('Zone_ZoneNumber') elementIdPropertyId = acu.GetBuiltInPropertyId('General_ElementID') zonesTemperatureReqPropertyId = acu.GetUserDefinedPropertyId('ZONES', 'Temperature Requirement') propertyIds = [ zoneNumberPropertyId, elementIdPropertyId, zonesTemperatureReqPropertyId ] propertyValuesDictionary = acu.GetPropertyValuesDictionary(acc.GetAllElements(), propertyIds) for elementId, valuesDictionary in propertyValuesDictionary.items(): for propertyId, value in valuesDictionary.items(): print(f"{elementId} {propertyId} {value}")
- By using GetPropertyIds command to batch retrieve the identifier of the properties:
from archicad import ACConnection conn = ACConnection.connect() acc = conn.commands act = conn.types acu = conn.utilities propertyIds = acc.GetPropertyIds([ act.BuiltInPropertyUserId('Zone_ZoneNumber'), act.BuiltInPropertyUserId('General_ElementID'), act.UserDefinedPropertyUserId(['ZONES', 'Temperature Requirement']), ]) propertyValuesDictionary = acu.GetPropertyValuesDictionary(acc.GetAllElements(), propertyIds) for elementId, valuesDictionary in propertyValuesDictionary.items(): for propertyId, value in valuesDictionary.items(): print(f"{elementId} {propertyId} {value}")
If you want to optimize your Python script for performance (run time), then you should minimize the executed commands, because each of them requires communication between ARCHICAD which has costs.
All utility functions (acu) execute one or more commands (acc) to help writing python scripts. Every GetBuiltInPropertyId and GetUserDefinedPropertyId utility functions call GetPropertyIds command once, so the first script above communicates with ARCHICAD more and runs slower (however it's not sensible in this case).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-22 02:35 PM
print(f"{elementId.guid} {propertyId.guid} {value}") AttributeError: 'ElementIdArrayItem' object has no attribute 'guid'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-07-22 04:32 PM
Windows 11 - Visual Studio 2022; ArchiCAD 27