BIM VILLAGE

Version 2.5.1

SampleCreateIfcRectangleProfileDef

Overview

This programming manual in C# offers a practical demonstration of how to create an instance of the IfcRectangleProfileDef class within a model.

Sample code

For example:

Name Value
ProfileName C1
XDim 500
YDim 500
Position
ProfileType curve
var app = new Beaver.BcadApplication();
var doc = app.ActiveDocument;
if (doc == null)
    doc = app.Documents.Add();
var stp = doc.STEPDocument;
var IfcRectangleProfileDef = stp.Instnaces.CreateInstance("IfcRectangleProfileDef");
IfcRectangleProfileDef.Attributes.AttributeAsStr("ProfileName").Value = "C1";
IfcRectangleProfileDef.Attributes.AttributeAsReal("XDim").Value = 500;
IfcRectangleProfileDef.Attributes.AttributeAsReal("YDim").Value = 500;
IfcRectangleProfileDef.Attributes.AttributeAsEnum("ProfileType").SetValue("curve");
IfcRectangleProfileDef.Attributes.AttributeAsInst("position").Value = stp.Instnaces.FindInstance(-1);

© 2019 - 2022 BIM VILLAGE.