Python question

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-19
10:09 PM
- last edited on
ā2021-09-14
01:36 PM
by
Noemi Balogh
No python forum yet so I post here instead.
I had a look at the example script "Excel File Exporter" and would like to add some building material properties but I don't understand the syntax. The property is for example:
UserDefinedPropertyUserId {'localizedName': ['GENERELLA (Byggmaterial)', 'Densitet'], 'type': 'UserDefined'}
I don't know how to get this one to work.
I look at the example with builtin property and as an example:
act.BuiltInPropertyUserId("General_Thickness")
Obviously, I need to add a bit more for the user-defined property but I don't know the syntax? I basically want to export the density and CO2 of the BM's used in the model.
Br,
Mats
HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
- Labels:
-
Automation (Python or JSON)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-20 02:32 PM

If you see at the list of all available properties: the Bmat ain't one of it.
POSIWID ā The Purpose Of a System Is What It Does /// Ā«Furthermore, I consider that Carth... yearly releases must be destroyedĀ»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-21 09:00 AM
runxel wrote:So what does this mean?
There seems currently no way to get that information?!![]()
If you see at the list of all available properties: the Bmat ain't one of it.
HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-21 10:04 AM
Mats_Knutsson wrote:That are the user defined PROPERTIES. They are (of course) localized and you can access them directly by the name you have set.
So what does this mean?
This means, you could do a new property and set the bmat there, again. Seems like this is the only way at the moment. Not a nice one, tho.
POSIWID ā The Purpose Of a System Is What It Does /// Ā«Furthermore, I consider that Carth... yearly releases must be destroyedĀ»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-21 01:41 PM
runxel wrote:I want to export BM properties to excel.
Mats_Knutsson wrote:That are the user defined PROPERTIES. They are (of course) localized and you can access them directly by the name you have set.
So what does this mean?
This means, you could do a new property and set the bmat there, again. Seems like this is the only way at the moment. Not a nice one, tho.
HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-21 02:40 PM
Mats_Knutsson wrote:Yeah I think you can't do that with Python at the moment.
I want to export BM properties to excel.

POSIWID ā The Purpose Of a System Is What It Does /// Ā«Furthermore, I consider that Carth... yearly releases must be destroyedĀ»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2020-12-21 03:12 PM
runxel wrote:"#&%¤"#""#&¤"/#&... crap. Thanks anyways!
Mats_Knutsson wrote:Yeah I think you can't do that with Python at the moment.
I want to export BM properties to excel.![]()
HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2021-01-18 10:35 PM
propertyUserIds = [ act.BuiltInPropertyUserId("General_ElementID"), #éčætypes对豔ēBuiltInPropertyUserIdę¹ę³ļ¼č·åę¢åå¢ēå ē“ ID act.BuiltInPropertyUserId("General_Height"), #original act.BuiltInPropertyUserId("General_Width"), #original act.BuiltInPropertyUserId("General_Thickness")ļ¼ #original act.BuiltInPropertyUserId("Story_number"), #wrong code,I add---------------------------- act.BuiltInPropertyUserId("Building_Material") #wrong code,I add---------------------------- ] I want get the element's story number,building material,but this code can't work,how can I get these info?