SampleCreateIfcAxis2Placement2D
Overview
This programming manual in C# offers a practical demonstration of how to create an instance of the IfcAxis2Placement2D class within a model.
Sample code
For example:
Name | Value |
---|---|
Location | 0.000000,0.000000 |
Refdirection | 1.000000,0.000000 |
var app = new Beaver.BcadApplication();
var doc = app.ActiveDocument;
if (doc == null)
doc = app.Documents.Add();
var stp = doc.STEPDocument;
var IfcAxis2Placement2D = stp.Instnaces.CreateInstance("IfcAxis2Placement2D"); {
var IfcCartesianPoint = stp.Instnaces.CreateInstance("IfcCartesianPoint"); {
double []values={0,0};
IfcCartesianPoint.Attributes.AttributeAsAggregate("coordinates").values = values;
}
var IfcDirection = stp.Instnaces.CreateInstance("IfcDirection"); {
double []values={1,0};
IfcDirection.Attributes.AttributeAsAggregate("directionratios").values = values;
}
IfcAxis2Placement2D.Attributes.AttributeAsInst("location").Value = IfcCartesianPoint;
IfcAxis2Placement2D.Attributes.AttributeAsInst("refdirection").Value = IfcDirection;
}