public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _Mode = value.StringVal; break; case 1: _Parameter.Add((IfcSimpleValue)value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: base.IfcParse(propIndex, value); break; case 1: base.IfcParse(propIndex, value); break; case 2: _name = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _Intent = value.StringVal; break; case 6: _RelatingConstraint = (IfcConstraint)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: base.IfcParse(propIndex, value); break; case 4: _applicableOccurrence = value.StringVal; break; case 5: if (_hasPropertySets == null) _hasPropertySets = new PropertySetDefinitionSet(this); _hasPropertySets.Add((IfcPropertySetDefinition)value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcPerformanceHistory(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcIdentifier?__Identification, IfcLabel __LifeCyclePhase, IfcPerformanceHistoryTypeEnum?__PredefinedType) : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType, __Identification) { this._LifeCyclePhase = __LifeCyclePhase; this._PredefinedType = __PredefinedType; }
public IfcClassification(IfcLabel __Source, IfcLabel __Edition, IfcCalendarDate __EditionDate, IfcLabel __Name) { this._Source = __Source; this._Edition = __Edition; this._EditionDate = __EditionDate; this._Name = __Name; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: base.IfcParse(propIndex, value); break; case 7: _benchmarkValues = (IfcMetric) value.EntityVal; break; case 8: _resultValues = (IfcMetric) value.EntityVal; break; case 9: _objectiveQualifier = (IfcObjectiveEnum) Enum.Parse(typeof (IfcObjectiveEnum), value.EnumVal); break; case 10: _userDefinedQualifier = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _SubmittedBy = (IfcActorSelect)value.EntityVal; break; case 6: _PreparedBy = (IfcActorSelect)value.EntityVal; break; case 7: _SubmittedOn = (IfcDateTimeSelect)value.EntityVal; break; case 8: _Status = (IfcLabel)value.StringVal; break; case 10: _TargetUsers.Add((IfcActorSelect)value.EntityVal); break; case 11: _UpdateDate = (IfcDateTimeSelect)value.EntityVal; break; case 12: _ID = (IfcIdentifier)value.EntityVal; break; case 13: _PredefinedType = (IfcCostScheduleTypeEnum)Enum.Parse(typeof(IfcCostScheduleTypeEnum), value.EnumVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
protected void SetName(IfcLabel name) { this.SetModelValue(this, ref m_name, name, v => Name = v, "Name"); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: base.IfcParse(propIndex, value); break; case 6: _costType = value.StringVal; break; case 7: _condition = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcClassificationItem(IfcClassificationNotationFacet __Notation, IfcClassification __ItemOf, IfcLabel __Title) { this._Notation = __Notation; this._ItemOf = __ItemOf; this._Title = __Title; }
public static bool IsSame(this IfcLabel label, IfcLabel compare) { return(string.Compare(label, compare, StringComparison.OrdinalIgnoreCase) == 0); }
/// <summary> /// True if the string is empty or any white space /// </summary> /// <param name="label"></param> /// <returns></returns> public static bool IsEmpty(this IfcLabel label) { return(string.IsNullOrWhiteSpace(label)); }
public IfcApproval(IfcText?__Description, IfcDateTimeSelect __ApprovalDateTime, IfcLabel?__ApprovalStatus, IfcLabel?__ApprovalLevel, IfcText?__ApprovalQualifier, IfcLabel __Name, IfcIdentifier __Identifier) { this._Description = __Description; this._ApprovalDateTime = __ApprovalDateTime; this._ApprovalStatus = __ApprovalStatus; this._ApprovalLevel = __ApprovalLevel; this._ApprovalQualifier = __ApprovalQualifier; this._Name = __Name; this._Identifier = __Identifier; }
/// <summary> /// Add the properties to the row object /// </summary> /// <param name="row">COBieAttributeRow holding the data</param> private void AddAttribute(COBieAttributeRow row) { //need a sheet and a row to be able to attach property to an object if ((ValidateString(row.RowName)) && (ValidateString(row.SheetName))) { switch (row.SheetName.ToLower()) { case "facility": //set list if first time if (IfcBuildings == null) { IfcBuildings = Model.FederatedInstances.OfType <IfcBuilding>(); } if (!((CurrentObject is IfcBuilding) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcBuildings.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "floor": if (IfcBuildingStoreys == null) { IfcBuildingStoreys = Model.FederatedInstances.OfType <IfcBuildingStorey>(); } if (!((CurrentObject is IfcBuildingStorey) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcBuildingStoreys.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "space": if (IfcSpaces == null) { IfcSpaces = Model.FederatedInstances.OfType <IfcSpace>(); } if (!((CurrentObject is IfcSpace) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcSpaces.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "type": if (IfcTypeObjects == null) { IfcTypeObjects = Model.FederatedInstances.OfType <IfcTypeObject>(); } if (!((CurrentObject is IfcTypeObject) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcTypeObjects.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "spare": if (IfcConstructionProductResources == null) { IfcConstructionProductResources = Model.FederatedInstances.OfType <IfcConstructionProductResource>(); } if (!((CurrentObject is IfcConstructionProductResource) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcConstructionProductResources.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "component": if (IfcElements == null) { IfcElements = Model.FederatedInstances.OfType <IfcElement>(); } if (!((CurrentObject is IfcElement) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcElements.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; case "zone": if (IfcZones == null) { IfcZones = Model.FederatedInstances.OfType <IfcZone>(); } if (!((CurrentObject is IfcZone) && (CurrentObject.Name == row.RowName))) { CurrentObject = IfcZones.Where(b => b.Name.ToString().ToLower() == row.RowName.ToLower()).FirstOrDefault(); } break; default: CurrentObject = null; break; } if (CurrentObject != null) { if (ValidateString(row.Name)) { IfcPropertySet ifcPropertySet = CheckIfExistOnMerge(row.ExtObject, row.ExtIdentifier); if (ifcPropertySet == null) { return; } //Set Description string description = ""; if (ValidateString(row.Description)) { description = row.Description; } if ((ValidateString(row.Value)) && row.Value.Contains(":") && row.Value.Contains("(") && row.Value.Contains(")") )//only if we have a IfcPropertyTableValue defined by COBieDataAttributeBuilder { AddPropertyTableValue(ifcPropertySet, row.Name, description, row.Value, row.AllowedValues, row.Unit); } else if ((ValidateString(row.AllowedValues)) && //row.Value.Contains(":") && can be single value (row.AllowedValues.Contains(":") || row.AllowedValues.Contains(",") ) )//have a IfcPropertyEnumeratedValue { IfcValue[] ifcValues = GetValueArray(row.Value); IfcValue[] ifcValueEnums = GetValueArray(row.AllowedValues); IfcUnit ifcUnit = GetIfcUnit(row.Unit); AddPropertyEnumeratedValue(ifcPropertySet, row.Name, description, ifcValues, ifcValueEnums, ifcUnit); } else { IfcValue ifcValue; double number; if (double.TryParse(row.Value, out number)) { ifcValue = new IfcReal((double)number); } else if (ValidateString(row.Value)) { ifcValue = new IfcLabel(row.Value); } else { ifcValue = new IfcLabel(""); } IfcUnit ifcUnit = GetIfcUnit(row.Unit); AddPropertySingleValue(ifcPropertySet, row.Name, description, ifcValue, ifcUnit); } //Add Category**** if (ValidateString(row.Category)) { SetCategory(ifcPropertySet, row.Category); } //****************Note need this as last call Add OwnerHistory************* if (ifcPropertySet != null) { //Add Created By, Created On and ExtSystem to Owner History. SetUserHistory(ifcPropertySet, row.ExtSystem, row.CreatedBy, row.CreatedOn); } //****************Note need SetOwnerHistory above to be last call, as XBim changes to default on any property set or changed, cannot use edit context as property set used more than once per row****** } else { #if DEBUG Console.WriteLine("Failed to create attribute. No name : {0} value {1}", row.Name, row.ExtObject); #endif } } else { #if DEBUG Console.WriteLine("Failed to create attribute. No object found to add too {0} value {1}", row.Name, row.ExtObject); #endif } } else { #if DEBUG Console.WriteLine("Failed to create attribute. No sheet or row name {0} value {1}", row.Name, row.ExtObject); #endif } }
protected IfcPreDefinedColour(IfcLabel __Name) : base(__Name) { }
public IfcDraughtingPreDefinedCurveFont(IfcLabel __Name) : base(__Name) { }
protected void SetName(IfcLabel name) { this.SetModelValue(this, ref m_name, name, v => Name = v, "Name"); }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _version = value.StringVal; break; case 2: _publisher = (IfcOrganization) value.EntityVal; break; case 3: _versionDate = (IfcCalendarDate) value.EntityVal; break; case 4: if (_libraryReference == null) _libraryReference = new XbimSet<IfcLibraryReference>(this); ((IXbimNoNotifyCollection)_libraryReference).Add((IfcLibraryReference) value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
protected IfcPreDefinedItem(IfcLabel __Name) { this.Name = __Name; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: base.IfcParse(propIndex, value); break; case 8: _distributionPointFunction = (IfcElectricDistributionPointFunctionEnum) Enum.Parse(typeof (IfcElectricDistributionPointFunctionEnum), value.EnumVal, true); break; case 9: _userDefinedFunction = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcPreDefinedColour(IfcLabel __Name) : base(__Name) { }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _description = value.StringVal; break; case 2: _startTime = (IfcDateTimeSelect) value.EntityVal; break; case 3: _endTime = (IfcDateTimeSelect) value.EntityVal; break; case 4: _timeSeriesDataType = (IfcTimeSeriesDataTypeEnum) Enum.Parse(typeof (IfcTimeSeriesDataTypeEnum), value.EnumVal, true); break; case 5: _dataOrigin = (IfcDataOriginEnum) Enum.Parse(typeof (IfcDataOriginEnum), value.EnumVal, true); break; case 6: _userDefinedDataOrigin = value.StringVal; break; case 7: _unit = (IfcUnit) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcQuantityCount(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit, IfcCountMeasure __CountValue, IfcLabel?__Formula) : base(__Name, __Description, __Unit) { this._CountValue = __CountValue; this._Formula = __Formula; }
private static void SetConversionUnitsParameters(IModel model, IfcConversionBasedUnit unit, IfcLabel name, IfcRatioMeasure ratio, IfcUnitEnum unitType, IfcSIUnitName siUnitName, IfcSIPrefix? siUnitPrefix, IfcDimensionalExponents dimensions) { unit.Name = name; unit.ConversionFactor = model.Instances.New<IfcMeasureWithUnit>(); unit.ConversionFactor.ValueComponent = ratio; unit.ConversionFactor.UnitComponent = model.Instances.New<IfcSIUnit>(s => { s.UnitType = unitType; s.Name = siUnitName; s.Prefix = siUnitPrefix; }); unit.Dimensions = dimensions; }
public IfcTextureCoordinateGenerator(IfcSurfaceTexture[] __Maps, IfcLabel __Mode, IfcReal[] __Parameter) : base(__Maps) { this.Mode = __Mode; this.Parameter = new List <IfcReal>(__Parameter); }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _notation = (IfcClassificationNotationFacet) value.EntityVal; break; case 1: _itemOf = (IfcClassification) value.EntityVal; break; case 2: _title = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcPerformanceHistory(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcLabel __LifeCyclePhase) : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType) { this._LifeCyclePhase = __LifeCyclePhase; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: base.IfcParse(propIndex, value); break; case 7: _benchmark = (IfcBenchmarkEnum) Enum.Parse(typeof (IfcBenchmarkEnum), value.EnumVal); break; case 8: _valueSource = value.StringVal; break; case 9: _dataValue = (IfcMetricValueSelect) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcApplication(IfcOrganization __ApplicationDeveloper, IfcLabel __Version, IfcLabel __ApplicationFullName, IfcIdentifier __ApplicationIdentifier) { this._ApplicationDeveloper = __ApplicationDeveloper; this._Version = __Version; this._ApplicationFullName = __ApplicationFullName; this._ApplicationIdentifier = __ApplicationIdentifier; }
public IfcQuantityArea(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit, IfcAreaMeasure __AreaValue, IfcLabel?__Formula) : base(__Name, __Description, __Unit) { this.AreaValue = __AreaValue; this.Formula = __Formula; }
public IfcPreDefinedCurveFont(IfcLabel __Name) : base(__Name) { }
public IfcQuantityLength(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit, IfcLengthMeasure __LengthValue) : base(__Name, __Description, __Unit) { this._LengthValue = __LengthValue; }
private static IfcBeam CreatePurlin(XbimModel model, HndzPurlin genericProducthndz) { using (XbimReadWriteTransaction txn = model.BeginTransaction("Create Purlin")) { IfcBeam beam = model.Instances.New <IfcBeam>(); IfcExtrudedAreaSolid body = model.Instances.New <IfcExtrudedAreaSolid>(); body.Depth = genericProducthndz.ExtrusionLine.RhinoLine.Length; IfcBeamType elementType = model.Instances.New <IfcBeamType>(); elementType.PredefinedType = IfcBeamTypeEnum.USERDEFINED; IfcMaterial material = model.Instances.New <IfcMaterial>(); material.Name = "STEEL"; beam.SetMaterial(material); IfcCartesianPoint insertPoint = model.Instances.New <IfcCartesianPoint>(); insertPoint.SetXY(genericProducthndz.ExtrusionLine.baseNode.Point.X, genericProducthndz.ExtrusionLine.baseNode.Point.Y); //insert at arbitrary position//****************Need Revision if (genericProducthndz.Profile is HndzRectangularProfile) { HndzRectangularProfile recProfile = genericProducthndz.Profile as HndzRectangularProfile; #region Type & Material &Tags string typeText = "HANDAZ-Column-Rectangular " + (int)recProfile.Rectangle.Width + " x " + (int)recProfile.Rectangle.Height + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; beam.Tag = typeText; beam.Name = typeText; beam.Description = typeText; beam.SetDefiningType(elementType, model); #endregion //represent column as a rectangular profile IfcRectangleProfileDef MyPurlinPofile = model.Instances.New <IfcRectangleProfileDef>(); MyPurlinPofile.ProfileType = IfcProfileTypeEnum.AREA; MyPurlinPofile.XDim = recProfile.Rectangle.Height; MyPurlinPofile.YDim = recProfile.Rectangle.Width; MyPurlinPofile.Position = model.Instances.New <IfcAxis2Placement2D>(); MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>(); MyPurlinPofile.Position.RefDirection.SetXY(recProfile.OrientationInPlane.X, recProfile.OrientationInPlane.Y); //MyColumnPofile.Position.Location = insertPoint; //model as a swept area solid body.SweptArea = MyPurlinPofile; } if (genericProducthndz.Profile is HndzISectionProfile) { HndzISectionProfile Iprofile = genericProducthndz.Profile as HndzISectionProfile; #region Type & Material &Tags string typeText = "HANDAZ-Purlin-I beam (flange " + Iprofile.I_Section.b_f + " x " + Iprofile.I_Section.t_fTop + " and web " + Iprofile.I_Section.d + " x " + Iprofile.I_Section.t_w + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; beam.Tag = typeText; beam.Name = typeText; beam.Description = typeText; beam.SetDefiningType(elementType, model); #endregion // IfcPolyline pl = model.Instances.New<IfcPolyline>(); //List<Point3d> tempPoints= Iprofile.ConvertItoPoints(); // foreach (Point3d point in tempPoints) // { // IfcCartesianPoint tempPoint = model.Instances.New<IfcCartesianPoint>(); // tempPoint.SetXYZ(point.X, point.Y, point.Z); // pl.Points.Add(tempPoint); // } IfcIShapeProfileDef MyPurlinPofile = model.Instances.New <IfcIShapeProfileDef>(); MyPurlinPofile.FlangeThickness = Iprofile.I_Section.tf; MyPurlinPofile.WebThickness = Iprofile.I_Section.t_w; MyPurlinPofile.OverallWidth = Iprofile.I_Section.b_f; MyPurlinPofile.OverallDepth = Iprofile.I_Section.d; MyPurlinPofile.FilletRadius = 10; MyPurlinPofile.Position = model.Instances.New <IfcAxis2Placement2D>(); MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>(); MyPurlinPofile.Position.RefDirection.SetXY(Iprofile.OrientationInPlane.X, Iprofile.OrientationInPlane.Y); //MyColumnPofile.Position.Location = insertPoint; //model as a swept area solid body.SweptArea = MyPurlinPofile; } if (genericProducthndz.Profile is HndzCSectionProfile) { HndzCSectionProfile Cprofile = genericProducthndz.Profile as HndzCSectionProfile; #region Type & Material &Tags string typeText = "HANDAZ-Purlin-C-Chanel (flange " + Cprofile.C_Section.b_f + " x " + Cprofile.C_Section.t_f + " and web " + Cprofile.C_Section.d + " x " + Cprofile.C_Section.t_w + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; beam.Tag = typeText; beam.Name = typeText; beam.Description = typeText; beam.SetDefiningType(elementType, model); #endregion IfcCShapeProfileDef MyPurlinPofile = model.Instances.New <IfcCShapeProfileDef>(); MyPurlinPofile.WallThickness = Cprofile.C_Section.t_f; //MyColumnPofile.WebThickness = Iprofile.C_Section.t_w; //ToDo:purlin web and flange thickness are the same!!!! MyPurlinPofile.Width = Cprofile.C_Section.b_f; MyPurlinPofile.Depth = Cprofile.C_Section.d; MyPurlinPofile.InternalFilletRadius = 10; MyPurlinPofile.Position = model.Instances.New <IfcAxis2Placement2D>(); MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>(); MyPurlinPofile.Position.RefDirection.SetXY(Cprofile.OrientationInPlane.X, Cprofile.OrientationInPlane.Y); //model as a swept area solid body.SweptArea = MyPurlinPofile; } body.ExtrudedDirection = model.Instances.New <IfcDirection>(); body.ExtrudedDirection.SetXYZ(0, 0, 1); //body.ExtrudedDirection.SetXYZ(Hndzcol.ExtrusionLine.RhinoLine.Direction.X, Hndzcol.ExtrusionLine.RhinoLine.Direction.Y, Hndzcol.ExtrusionLine.RhinoLine.Direction.Z); //parameters to insert the geometry in the model IfcCartesianPoint origin = model.Instances.New <IfcCartesianPoint>(); origin.SetXYZ(genericProducthndz.ExtrusionLine.baseNode.Point.X, genericProducthndz.ExtrusionLine.baseNode.Point.Y, genericProducthndz.ExtrusionLine.baseNode.Point.Z); body.Position = model.Instances.New <IfcAxis2Placement3D>(); //body.Position.Location = origin; body.Position.RefDirection = model.Instances.New <IfcDirection>(); body.Position.RefDirection.SetXYZ(1, 0, 0); //Create a Definition shape to hold the geometry IfcShapeRepresentation shape = model.Instances.New <IfcShapeRepresentation>(); shape.ContextOfItems = model.IfcProject.ModelContext(); shape.RepresentationType = "SweptSolid"; shape.RepresentationIdentifier = "Body"; shape.Items.Add(body); //Create a Product Definition and add the model geometry to the column IfcProductDefinitionShape rep = model.Instances.New <IfcProductDefinitionShape>(); rep.Representations.Add(shape); beam.Representation = rep; //now place the column into the model IfcLocalPlacement lp = model.Instances.New <IfcLocalPlacement>(); IfcAxis2Placement3D ax3d = model.Instances.New <IfcAxis2Placement3D>(); ax3d.Location = origin; Vector3d perpendicularVector = new Vector3d(genericProducthndz.Profile.OrientationInPlane.X, genericProducthndz.Profile.OrientationInPlane.Y, 0); Plane extrusionPlane; bool aa = genericProducthndz.ExtrusionLine.RhinoLine.TryGetPlane(out extrusionPlane); if (aa) { perpendicularVector = extrusionPlane.ZAxis; } ax3d.RefDirection = model.Instances.New <IfcDirection>(); ax3d.RefDirection.SetXYZ(perpendicularVector.X, perpendicularVector.Y, perpendicularVector.Z); ax3d.Axis = model.Instances.New <IfcDirection>(); ax3d.Axis.SetXYZ(genericProducthndz.ExtrusionLine.RhinoLine.Direction.X, genericProducthndz.ExtrusionLine.RhinoLine.Direction.Y, genericProducthndz.ExtrusionLine.RhinoLine.Direction.Z); lp.RelativePlacement = ax3d; beam.ObjectPlacement = lp; #region Owner Data beam.OwnerHistory.OwningUser = model.DefaultOwningUser; beam.OwnerHistory.OwningApplication = model.DefaultOwningApplication; #endregion //validate write any errors to the console and commit if OK, otherwise abort string temp = Path.GetTempPath(); //if (model.Validate(txn.Modified(), File.CreateText("E:\\Column" + column.GlobalId + "Errors.txt")) == 0) // if (model.Validate(txn.Modified(), File.CreateText(temp + "Column" + column.GlobalId + "Errors.txt")) == 0) if (model.Validate(txn.Modified(), Console.Out) == 0) { txn.Commit(); return(beam); } return(null); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: base.IfcParse(propIndex, value); break; case 4: _applicableValueRatio = value.RealVal; break; case 5: _thermalLoadSource = (IfcThermalLoadSourceEnum) Enum.Parse(typeof (IfcThermalLoadSourceEnum), value.EnumVal, true); break; case 6: _propertySource = (IfcPropertySourceEnum) Enum.Parse(typeof (IfcPropertySourceEnum), value.EnumVal, true); break; case 7: _sourceDescription = value.StringVal; break; case 8: _maximumValue = value.RealVal; break; case 9: _minimumValue = value.RealVal; break; case 10: _thermalLoadTimeSeriesValues = (IfcTimeSeries) value.EntityVal; break; case 11: _userDefinedThermalLoadSource = value.StringVal; break; case 12: _userDefinedPropertySource = value.StringVal; break; case 13: _thermalLoadType = (IfcThermalLoadTypeEnum) Enum.Parse(typeof (IfcThermalLoadTypeEnum), value.EnumVal, true); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _ID = (IfcIdentifier)value.EntityVal; break; case 6: _PredefinedType = (IfcProjectOrderTypeEnum)Enum.Parse(typeof(IfcProjectOrderTypeEnum), value.EnumVal); break; case 7: _Status = (IfcLabel)value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: base.IfcParse(propIndex, value); break; case 1: _extendedProperties.Add((IfcProperty) value.EntityVal); break; case 2: _description = value.StringVal; break; case 3: _name = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
protected IfcPhysicalSimpleQuantity(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit) : base(__Name, __Description) { this.Unit = __Unit; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: base.IfcParse(propIndex, value); break; case 6: _impactType = value.StringVal; break; case 7: _category = (IfcEnvironmentalImpactCategoryEnum) Enum.Parse(typeof (IfcEnvironmentalImpactCategoryEnum), value.EnumVal, true); break; case 8: _userDefinedCategory = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcPreDefinedItem(IfcLabel __Name) { this._Name = __Name; }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _documentId = value.StringVal; return; case 1: _name = value.StringVal; return; case 2: _description = value.StringVal; return; case 3: _documentReferences.InternalAdd((IfcDocumentReference)value.EntityVal); return; case 4: _purpose = value.StringVal; return; case 5: _intendedUse = value.StringVal; return; case 6: _scope = value.StringVal; return; case 7: _revision = value.StringVal; return; case 8: _documentOwner = (IfcActorSelect)(value.EntityVal); return; case 9: _editors.InternalAdd((IfcActorSelect)value.EntityVal); return; case 10: _creationTime = (IfcDateAndTime)(value.EntityVal); return; case 11: _lastRevisionTime = (IfcDateAndTime)(value.EntityVal); return; case 12: _electronicFormat = (IfcDocumentElectronicFormat)(value.EntityVal); return; case 13: _validFrom = (IfcCalendarDate)(value.EntityVal); return; case 14: _validUntil = (IfcCalendarDate)(value.EntityVal); return; case 15: _confidentiality = (IfcDocumentConfidentialityEnum)System.Enum.Parse(typeof(IfcDocumentConfidentialityEnum), value.EnumVal, true); return; case 16: _status = (IfcDocumentStatusEnum)System.Enum.Parse(typeof(IfcDocumentStatusEnum), value.EnumVal, true); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _description = value.StringVal; break; case 2: ((IXbimNoNotifyCollection)_assignedItems).Add((IfcLayeredItem) value.EntityVal); break; case 3: _identifier = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _totalCrossSectionArea = value.RealVal; break; case 1: _steelGrade = value.StringVal; break; case 2: _barSurface = (IfcReinforcingBarSurfaceEnum) Enum.Parse(typeof (IfcReinforcingBarSurfaceEnum), value.EnumVal, true); break; case 3: _effectiveDepth = value.RealVal; break; case 4: _nominalBarDiameter = value.RealVal; break; case 5: _barCount = value.NumberVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: m_name = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: base.IfcParse(propIndex, value); break; case 6: if (_representationMaps == null) _representationMaps = new RepresentationMapList(this); _representationMaps.Add((IfcRepresentationMap) value.EntityVal); break; case 7: _tag = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcIrregularTimeSeries(IfcLabel __Name, IfcText?__Description, IfcDateTimeSelect __StartTime, IfcDateTimeSelect __EndTime, IfcTimeSeriesDataTypeEnum __TimeSeriesDataType, IfcDataOriginEnum __DataOrigin, IfcLabel?__UserDefinedDataOrigin, IfcUnit __Unit, IfcIrregularTimeSeriesValue[] __Values) : base(__Name, __Description, __StartTime, __EndTime, __TimeSeriesDataType, __DataOrigin, __UserDefinedDataOrigin, __Unit) { this._Values = new List <IfcIrregularTimeSeriesValue>(__Values); }
protected void SetName(IfcLabel name) { m_name = name; }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: ((IXbimNoNotifyCollection)_enumerationValues).Add((IfcValue) value.EntityVal); break; case 2: _unit = (IfcUnit) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public virtual void IfcParse(int propIndex, IPropertyValue value) { if (propIndex == 0) { _name = value.StringVal; } else this.HandleUnexpectedAttribute(propIndex, value); }
public IfcQuantityVolume(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit, IfcVolumeMeasure __VolumeValue, IfcLabel?__Formula) : base(__Name, __Description, __Unit) { this.VolumeValue = __VolumeValue; this.Formula = __Formula; }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _documentId = value.StringVal; break; case 1: _name = value.StringVal; break; case 2: _description = value.StringVal; break; case 3: if (_documentReferences == null) _documentReferences = new XbimSet<IfcDocumentReference>(this); _documentReferences.Add_Reversible((IfcDocumentReference) value.EntityVal); break; case 4: _purpose = value.StringVal; break; case 5: _intendedUse = value.StringVal; break; case 6: _scope = value.StringVal; break; case 7: _revision = value.StringVal; break; case 8: _documentOwner = (IfcActorSelect) value.EntityVal; break; case 9: if (_editors == null) _editors = new XbimSet<IfcActorSelect>(this); _editors.Add_Reversible((IfcActorSelect) value.EntityVal); break; case 10: _creationTime = (IfcDateAndTime) value.EntityVal; break; case 11: _lastRevisionTime = (IfcDateAndTime) value.EntityVal; break; case 12: _electronicFormat = (IfcDocumentElectronicFormat) value.EntityVal; break; case 13: _validFrom = (IfcCalendarDate) value.EntityVal; break; case 14: _validUntil = (IfcCalendarDate) value.EntityVal; break; case 15: _confidentiality = (IfcDocumentConfidentialityEnum) Enum.Parse(typeof (IfcDocumentConfidentialityEnum), value.EnumVal, true); break; case 16: _status = (IfcDocumentStatusEnum) Enum.Parse(typeof (IfcDocumentStatusEnum), value.EnumVal, true); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcDraughtingPreDefinedColour(IfcLabel __Name) : base(__Name) { }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: base.IfcParse(propIndex, value); break; case 2: _name = value.StringVal; break; case 3: _conversionFactor = (IfcMeasureWithUnit) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcQuantityWeight(IfcLabel __Name, IfcText?__Description, IfcNamedUnit __Unit, IfcMassMeasure __WeightValue, IfcLabel?__Formula) : base(__Name, __Description, __Unit) { this.WeightValue = __WeightValue; this.Formula = __Formula; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: base.IfcParse(propIndex, value); break; case 5: _longName = value.StringVal; break; case 6: _phase = value.StringVal; break; case 7: _representationContexts.Add((IfcRepresentationContext) value.EntityVal); break; case 8: _unitsInContext = (IfcUnitAssignment) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcBoxAlignment(IfcLabel value) { this.Value = value; }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _enumerationValues.Add_Reversible((IfcValue) value.EntityVal); break; case 2: _unit = (IfcUnit) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcBoxAlignment(String value) { this.Value = new IfcLabel(value); }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _name = value.StringVal; break; case 1: _description = value.StringVal; break; case 2: _constraintGrade = (IfcConstraintEnum) Enum.Parse(typeof (IfcConstraintEnum), value.EnumVal); break; case 3: _constraintSource = value.StringVal; break; case 4: _creatingActor = (IfcActorSelect) value.EntityVal; break; case 5: _creationTime = (IfcDateTimeSelect) value.EntityVal; break; case 6: _userDefinedGrade = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcClassification(IfcLabel?__Source, IfcLabel?__Edition, IfcDate?__EditionDate, IfcLabel __Name, IfcText?__Description, IfcURIReference?__Location, IfcIdentifier[] __ReferenceTokens) { this.Source = __Source; this.Edition = __Edition; this.EditionDate = __EditionDate; this.Name = __Name; this.Description = __Description; this.Location = __Location; this.ReferenceTokens = new List <IfcIdentifier>(__ReferenceTokens); this.ClassificationForObjects = new HashSet <IfcRelAssociatesClassification>(); this.HasReferences = new HashSet <IfcClassificationReference>(); }