DevDays, GitHub, STL and OBJ Model Import

Long time no post.

Sorry, I am rather caught up in the DevDays conferences, accompanying meetups and travel back and forth across the continent.

After the first Western European DevDays conference and meetup in Paris on Monday, we continued and repeated in London, UK, and Gothenburg, Sweden.

We had a day's break there, and I took a quick bus and ferry ride out to Styrsö before leaving.


Now we have arrived in Munich, Germany, and the last goal for Tuesday and Wednesday is Milano, Italy.

On Sunday, Jim Quanci and I visited Thomas Fink of SOFiSTiK AG in Nürnberg, the birthplace of Albrecht Dürer:

Albrecht Dürer self-portrait at 28, a.d. 1500

Here we are admiring Jürgen Goertz's 1984 bronze sculpture Der Hase – Hommage á Dürer (The Hare – A Tribute to Dürer), a nod to Dürer's watercolour original Junger Feldhase (1502), hinting at the dire results of tampering with nature:

Jim Quanci, Thomas Fink, the rabbit and me

Although I did not post to The Building Coder in the last couple of days, I was still pretty busy on GitHub.

Check out these new GitHub projects of mine:


The StlImport Revit add-in has been around for some time, although it may not have caught your attention in the past.

It demonstrates some of the Revit 2015 API DirectShape element functionality by importing an interactively selected STL file into a DirectShape element in the Revit project, using the NuGet QuantumConcepts STL package to load and parse the STL file.

It was implemented by Scott Conover of the Revit development team, shown at last year's DevDays Online conferences, posted with the DevDays online recording and migrated to Revit 2015 UR1.

This is the first time I highlight it specifically and publish it on its own, in its very own cosy StlImport GitHub repository.


The new DirectObjLoader project is the main reason I spent so much time on GitHub and so little time blogging.

It also reminded me of the StlImport sample project and prompted me to publish it, simplifying access to it both for you and me myself.

Inspired by Eric Boehlke of at the DevHack after the DevDays conference in Las Vegas two weeks ago, I implemented this add-in, similar to StlImport, to load and parse a WaveFront OBJ model and generate a DirectShape element from that:

DirectObjLoader ribbon panel

Here is a sample fire hydrant OBJ file:

Fire hydrant OBJ file

DirectObjLoader generates this DirectShape element for it in the Revit model:

Fire hydrant DirectShape element in Revit

Eric requested functionality to specify an input scaling factor, so I added that.

Here is a gargoyle and a half produced by running the command twice, with scaling factors 1.0 and 0.5:

A gargoyle and a half in Revit

We continued experimenting with larger and more complex OBJ files.

As a final result of that work, OBJ files defining groups now generate a separate DirectShape element for each one:

Separate DirectShape element for each OBJ group

I should certainly describe this project and various interesting aspects of it in more detail soon.

Here are some of the points worth mentioning and discussing in more depth:

For the moment, you can check it all out yourself in the DirectObjLoader GitHub repository.


A recent comment raised the issue of full-text string searches in Revit projects, and that reminded me of the old StringSearch plugin of the month add-in.

I presented it migrated to Revit 2013 as an example of retrieving an embedded resource image.

All the Plugin of the Month add-ins were also published on the Autodesk Exchange AppStore, and therefore I migrated it to Revit 2014 as well, but without publishing the updated code here on The Building Coder.

Now all the versions for Revit 2011, 2012, 2013, 2014 and 2015 are available from the StringSearch GitHub repository.

Now we are in the middle of the Munich DevDays conference, with the meetup coming up tonight, I Love 3D – Munchen – I hope to see you there!