mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
Relate documents and classifications to project itself
This commit is contained in:
@@ -622,13 +622,13 @@ class IfcExporter():
|
|||||||
self.set_common_definitions()
|
self.set_common_definitions()
|
||||||
self.ifc_parser.parse()
|
self.ifc_parser.parse()
|
||||||
self.create_units()
|
self.create_units()
|
||||||
|
self.create_rep_context()
|
||||||
|
self.create_project()
|
||||||
self.create_documents()
|
self.create_documents()
|
||||||
self.create_classifications()
|
self.create_classifications()
|
||||||
self.create_classification_references()
|
self.create_classification_references()
|
||||||
self.create_objectives()
|
self.create_objectives()
|
||||||
self.create_psets()
|
self.create_psets()
|
||||||
self.create_rep_context()
|
|
||||||
self.create_project()
|
|
||||||
self.create_libraries()
|
self.create_libraries()
|
||||||
self.create_map_conversion()
|
self.create_map_conversion()
|
||||||
self.create_representations()
|
self.create_representations()
|
||||||
@@ -680,11 +680,17 @@ class IfcExporter():
|
|||||||
for document in self.ifc_parser.documents.values():
|
for document in self.ifc_parser.documents.values():
|
||||||
document['ifc'] = self.file.create_entity(
|
document['ifc'] = self.file.create_entity(
|
||||||
'IfcDocumentReference', **document['attributes'])
|
'IfcDocumentReference', **document['attributes'])
|
||||||
|
self.file.createIfcRelAssociatesDocument(
|
||||||
|
ifcopenshell.guid.new(), None, None, None,
|
||||||
|
[self.ifc_parser.project['ifc']], document['ifc'])
|
||||||
|
|
||||||
def create_classifications(self):
|
def create_classifications(self):
|
||||||
for classification in self.ifc_parser.classifications:
|
for classification in self.ifc_parser.classifications:
|
||||||
classification['ifc'] = self.file.create_entity(
|
classification['ifc'] = self.file.create_entity(
|
||||||
'IfcClassification', **classification['attributes'])
|
'IfcClassification', **classification['attributes'])
|
||||||
|
self.file.createIfcRelAssociatesClassification(
|
||||||
|
ifcopenshell.guid.new(), None, None, None,
|
||||||
|
[self.ifc_parser.project['ifc']], classification['ifc'])
|
||||||
|
|
||||||
def create_classification_references(self):
|
def create_classification_references(self):
|
||||||
for reference in self.ifc_parser.classification_references.values():
|
for reference in self.ifc_parser.classification_references.values():
|
||||||
|
|||||||
Reference in New Issue
Block a user