BIM VILLAGE

Version 2.5.1

SampleCreateIfcPerson

Overview

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

Sample code

For example:

Name Value
Familyname Rodents
Givenname Beaver
ID 123
var app = new Beaver.BcadApplication();
var doc = app.ActiveDocument;
if (doc == null)
    doc = app.Documents.Add();
var stp = doc.STEPDocument;
var IfcPerson = stp.Instnaces.CreateInstance("IfcPerson"); 
IfcPerson.Attributes.AttributeAsStr("id").Value = "123";
IfcPerson.Attributes.AttributeAsStr("familyname").Value = "Rodents";
IfcPerson.Attributes.AttributeAsStr("givenname").Value = "Beaver";

© 2019 - 2022 BIM VILLAGE.