Exemplo n.º 1
0
 protected BbSite(BbProject project, IfcSite site, IfcRelAggregates ifcRelAggregates)
 {
     BbProject = project;
     IfcSpatialStructureElement = site;
     IfcRelAggregates           = ifcRelAggregates;
     Guid = IfcGloballyUniqueId.ConvertToGuid(site.GlobalId);
 }
Exemplo n.º 2
0
        /// <summary>
        /// only for import
        /// </summary>
        /// <param name="ifcSite"></param>
        protected BbSite(IfcSite ifcSite)
        {
            Guid = IfcGloballyUniqueId.ConvertToGuid(ifcSite.GlobalId);

            var a = EarlyBindingInstanceModel.GetReferencedEntities(ifcSite.EIN).Values;

            var b = (from x in a.OfType <IfcRelAggregates>()
                     where x.RelatingObject.GetType() == typeof(IfcProject)
                     select x).First() as IfcRelAggregates;

            IfcRelAggregates = b;


            if (b != null)
            {
                var sPrjGuid = BbInstanceDB.GetSemIdListByEin(b.RelatingObject.EIN).First();
                var aa       = BbInstanceDB.GetSemById(sPrjGuid) as BbProject;
                BbProject = aa;
            }


            IfcSpatialStructureElement = ifcSite;
        }