torsdag 18. september 2014

Revit+Aspose+QR-codes+Dynamo = Gamechanger

Well, I'll tell you this much: Dynamo seriously impress me on a daily basis..
So the story goes like this:

Was looking around the internets, searching google for cool libraries to use with Ironpython, which is the implemented version of Python in Dynamo. I figure out as I'm fooling around that the positive side with Ironpython is that you can also call .NET code directly. Ok.. what is actually .NET code , you say? I don't know.. actually.. So naturally I search for:

"Cool .NET libraries" And somewhere in my googling i found this site: http://www.aspose.com/.net/total-component.aspx

As I scroll down I see that they have a " Apose.Barcode for .NET"-component
That would be a Barcode tool for .NET applications


So I thought: wouldn't it be cool if I could generate QR-codes for Revit elements and one could use it for whatever? Marking columns, register whether the column has arrived at site or not, get QR-codes off the drawing and check whatever..

So I thought that I'll someday read into this and learn myself how to access .NET libraries from Ironpython from within Dynamo.... Tedious at best for a non programmer..

But none the less I downloaded the free trial from Aspose, and I saw that it was a .dll file. (Dynamic Link Library) and it struck me:


Isn't dynamo supposed to read DLL-files directly??

Oh yeah it is:

And it just shows up like this:
It got AustraliaPostFormatControlCode for crying out loud!!! Don't ask..

So 4 walls, some marks, comments and an hour later this is the result:




and also: The image files can be loaded into schedules and onto sheets! :)


Enlarged version:



I can't even begin to think of the possibilities this opens up for. Does anyone know similar systems that can be used with Revit in the same way?

3 kommentarer:

  1. great post and interesting workflow. Did you get the dll directly from Aspose to dynamo, or did you compile your own dll based on Aspose one? if so, do you plan to share it on package manager?

    SvarSlett
    Svar
    1. Thanks, I'm nowhere near being able to create my own .dll yet, so I imported the .dll directly into dynamo. The .dll is a trail-version from Aspose, so not very open-sourcy but I will try to do the same with a freeware .net library for barcodes, (I hope it exist!) I will try to elaborate the workflow as well to be able to read qr codes into Revit.

      Slett
  2. what package is the file write image from ? or should i try and make a custom node ?

    SvarSlett