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

Python question

Mats_Knutsson
Advocate
Hi,
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
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB
7 REPLIES 7

runxel
Mentor
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.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Mats_Knutsson
Advocate
runxel wrote:
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.
So what does this mean?
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

runxel
Mentor
Mats_Knutsson wrote:

So what does this mean?
That are the user defined PROPERTIES. They are (of course) localized and you can access them directly by the name you have set.
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.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Mats_Knutsson
Advocate
runxel wrote:
Mats_Knutsson wrote:

So what does this mean?
That are the user defined PROPERTIES. They are (of course) localized and you can access them directly by the name you have set.
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.
I want to export BM properties to excel.
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

runxel
Mentor
Mats_Knutsson wrote:

I want to export BM properties to excel.
Yeah I think you can't do that with Python at the moment.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Mats_Knutsson
Advocate
runxel wrote:
Mats_Knutsson wrote:

I want to export BM properties to excel.
Yeah I think you can't do that with Python at the moment.
"#&%¤"#""#&¤"/#&... crap. Thanks anyways!
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Boling1
Contributor
I have tried excel export.py, it works well, but I need to export more attributes like story number,building material :
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?
ArchiCAD 25

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!