Tag Archives: Xbim

First steps with xBIM – Overarching #1

Where we introduce xBIM and present the first steps for you to start developing with it.

During the tutorial you will need the the following bit of code, copy and paste it from here to the development environment.

OpenFileDialog dialog = new OpenFileDialog();
dialog.ShowDialog();
string filename = dialog.FileName;
if (filename == "")
	return;

System.IO.File.Delete("temp.xbim");
Xbim.IO.XbimModel m = new Xbim.IO.XbimModel();
m.CreateFrom(filename, "temp.xbim");
m.Close();

m.Open("temp.xbim", Xbim.XbimExtensions.XbimDBAccess.Read);
var allwalls = m.Instances.OfType();
textBox1.Text = allwalls.Count().ToString();

Links of the resources used in the video: