SampleCreateIfcShapeRepresentation
Overview
This programming manual in C# offers a practical demonstration of how to create an instance of the IfcShapeRepresentation class within a model.
Sample code
For example:
Name | Value |
---|---|
RepresentationIdentifier | Body |
RepresentationType | SweptSolid |
ContextOfItems | |
Item1 |
var app = new Beaver.BcadApplication();
var doc = app.ActiveDocument;
if (doc == null)
doc = app.Documents.Add();
var stp = doc.STEPDocument;
var IfcShapeRepresentation = stp.Instnaces.CreateInstance("IfcShapeRepresentation");
IfcShapeRepresentation.Attributes.AttributeAsInst("ContextOfItems").Value = stp.Instnaces.FindInstance(-1);
IfcShapeRepresentation.Attributes.AttributeAsStr("RepresentationIdentifier").Value = "Body";
IfcShapeRepresentation.Attributes.AttributeAsStr("RepresentationType").Value = "SweptSolid";
STEPInstance []values={};
IfcShapeRepresentation.Attributes.AttributeAsAggregate("Items").values = values;