SampleCreateIfcPolyline
Overview
This programming manual in C# offers a practical demonstration of how to create an instance of the IfcPolyline class within a model.
Sample code
For example:
Name | Value |
---|---|
Start | 0.000000,0.000000,0.000000 |
End | 0.000000,0.000000,0.000000 |
var app = new Beaver.BcadApplication();
var doc = app.ActiveDocument;
if (doc == null)
doc = app.Documents.Add();
var stp = doc.STEPDocument;
var IfcPolyline = stp.Instnaces.CreateInstance("IfcPolyline"); {
var start = AddInstance("IfcCartesianPoint"); {
double []values={0,0,0};
start.Attributes.AttributeAsAggregate("coordinates").values = values;
}
var end = AddInstance("IfcCartesianPoint"); {
double []values={0,0,0};
end.Attributes.AttributeAsAggregate("coordinates").values = values;
}
STEPInstance []Points={start, end};
IfcPolyline.Attributes.AttributeAsAggregate("Points").values = Points;
}
return IfcPolyline;