internal void ReadFile(FileStreamIfc fs) { if (fs == null) { return; } switch (fs.mFormat) { case FormatIfc.XML: ReadXMLStream(fs.mStreamReader); break; case FormatIfc.JSON: #if (IFCJSON) ReadJSONFile(fs.mStreamReader); break; #else logError("IfcJSON not enabled!"); return; #endif default: ReadFile(fs.mStreamReader, 0); break; } if (mContext != null) { mContext.initializeUnitsAndScales(); if (mContext.mRepresentationContexts.Count > 0) { mFactory.mGeomRepContxt = mIfcObjects[mContext.mRepresentationContexts[0]] as IfcGeometricRepresentationContext; } } }
//partial void customPostImport(); private void postImport() { foreach (BaseClassIfc e in this) { try { e.postParseRelate(); } catch (Exception) { } } if (mContext != null) { mContext.initializeUnitsAndScales(); mFactory.IdentifyContexts(mContext.RepresentationContexts); } // customPostImport(); }
private void postImport(Aggregate aggregate) { mWorldCoordinatePlacement = null; aggregate.RelateObjects(mFolder); if (mContext != null) { mContext.initializeUnitsAndScales(); if (mContext.mRepresentationContexts.Count > 0) { mGeomRepContxt = mIfcObjects[mContext.mRepresentationContexts[0]] as IfcGeometricRepresentationContext; } if (mContext.mDeclares.Count == 0) { List <IfcDefinitionSelect> lds = aggregate.mTypeProducts.ConvertAll(x => (IfcDefinitionSelect)x); IfcRelDeclares rd = new IfcRelDeclares(mContext, lds) { Name = "DeclaredTypes" }; } } customPostImport(aggregate); }