/// <summary> /// Sets the zone information from the ZoneInfoFinder, if previously unset. /// </summary> /// <param name="zoneInfoFinder">Container with string information.</param> public void UpdateZoneInfo(ZoneInfoFinder zoneInfoFinder) { if (zoneInfoFinder == null) { return; } string newObjectType = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.ObjectType); string newDescription = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.Description); string newLongName = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.LongName); string newGroupName = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.GroupName); if (string.IsNullOrEmpty(ObjectType)) { ObjectType = newObjectType; } if (string.IsNullOrEmpty(Description)) { Description = newDescription; } if (string.IsNullOrEmpty(LongName)) { LongName = newLongName; } if (string.IsNullOrEmpty(GroupName)) { GroupName = newGroupName; } }
/// <summary> /// Constructs a ZoneInfo object. /// </summary> /// <param name="zoneInfoFinder">Container with string information.</param> /// <param name="roomHandle">The room handle for this zone.</param> /// <param name="classificationReferences">The room handle for this zone.</param> /// <param name="energyAnalysisHnd">The ePset_SpatialZoneEnergyAnalysis handle for this zone.</param> /// <param name="zoneCommonPSetHandle">The Pset_ZoneCommon handle for this zone.</param> public ZoneInfo(ZoneInfoFinder zoneInfoFinder, IFCAnyHandle roomHandle, Dictionary <string, IFCAnyHandle> classificationReferences, IFCAnyHandle energyAnalysisHnd, IFCAnyHandle zoneCommonPSetHandle) { if (zoneInfoFinder != null) { ObjectType = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.ObjectType); Description = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.Description); LongName = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.LongName); GroupName = zoneInfoFinder.GetPropZoneValue(ZoneInfoLabel.GroupName); } RoomHandles.Add(roomHandle); ClassificationReferences = classificationReferences; EnergyAnalysisProperySetHandle = energyAnalysisHnd; ZoneCommonProperySetHandle = zoneCommonPSetHandle; }