bernd wrote: ↑Wed Dec 18, 2019 6:23 pm
Code: Select all
AttributeError: 'file' object has no attribute 'schema'
this looks like you have ifcopenshell version 0.5. There you can not choose a schema. I use ifcopenshell version 0.6.
Code: Select all
$ python3
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ifcopenshell
>>> ifcopenshell.version
'0.6.0b0'
>>>
>>>
That's right, you're right.
Ifcopenshell '06b' works fine.
I have a question. What's the name of the property with the number of a singular entity ifc file?
I've printed out a list from the file, and I'd like to save those entitions as individual files. I just don't know how to get the number of a particular part.
Code: Select all
This:
f = ifcopenshell.open(plik)
g = ifcopenshell.file(schema=f.schema)
g.add(f.by_type("IfcProject")[0])
products = f.by_type('IfcProduct')
for product in products:
print(product)
results:
#15=IfcBuildingStorey('0BaS7LhDjFtxGSqtqP2SOS',#8,'+18,05',$,'',#76,$,'+18,05',.ELEMENT.,18050.)
#28=IfcSite('0BaS7LhDjFtxGSqttcyV2T',#8,'Default',$,'',#69,$,$,.ELEMENT.,(52,14,59,999999),(20,59,59,999999),0.,$,$)
#29=IfcWallStandardCase('1UFEKweez2jff53MBBtjeG',#8,'Ściana podstawowa:Fassadenpaneele RAL 9010:627381',$,'Ściana podstawowa:Fassadenpaneele RAL
How to get #15, #28, etc to save it with 15.ifc, 28.ifc etc