Python Scripting in Vasari 2.1 and Revit 2012

2011-09-24_2143

It’s here! Daren Thomas has posted installers for RevitPythonShell for BOTH Revit 2012 and Vasari 2.1.

What does this mean?  You, dear reader, can now script live in a Vasari session using Python.  Behold!

Python in Vasari: Getting Started

The samples I’m showing are things that I am not capable of cobbling together on my own . . . I’m NOT AT ALL a coding person.   It’s actually my desperate hope that you will understand these concepts much better than I and do something cool with the tools. Keep an eye on Nathan Miller’s site, I’m sure he will have good stuff.   My Create Surface script is a simplification of his supershapes script posted here. Thanks to Aki Hogge for everything else.

I have tried a bunch of times to get through “Hello World” in both full Visual Studio and VSTA for Revit and each time just failed miserably. I’ve had much more success with this tool and can see a way to actually progressing in my API education.  So if you have tried and failed with the Revit API in the past, give this a shot.  Here’s the text version of how to get started:

RevitPythonShell for Vasari in 5 minutes:

All the samples run in Mass.rfa files, GoalSeeker uses the Goalseeker example files.  It all works in either Vasari or Revit.

To monkey with the scripts live, just open them in an editor (notepad works, I’m sure there are way better ones) make changes, save and then run again in Vasari.

There’s no official SDK or documentation for the Vasari API, but it is essentially a slimmed down version of the Revit API, with detail model elements and such removed. 

Comments

  1. Zach, you have the best blog, pumkins, donuts, whirly things, an architect's smorgasboard! I imagine you swimming in Walden's pond up there in Boston dreaming up new tricks for points, lines, and geometries will take through space. You know they don't really know how deep Walden's Pond really is. Anyway you posts share the same depth and I really appreciate them. Sincerely,

    ReplyDelete
  2. Hi Zach,
    I was just wondering if you managed to get tab autocompletion working in RevitPythonShell2012 with IronPython 2.7 installed. I've set the ironpython lib path accordingly but I can't for the life of me get tab completion in the revit python shell!

    ReplyDelete
  3. Hi Zach,
    I was just wondering if you managed to get tab autocompletion working in RevitPythonShell2012 with IronPython 2.7 installed. I've set the ironpython lib path accordingly but I can't for the life of me get tab completion in the revit python shell!

    ReplyDelete
  4. Hi Zach,
    I was just wondering if you managed to get tab autocompletion working in RevitPythonShell2012 with IronPython 2.7 installed. I've set the ironpython lib path accordingly but I can't for the life of me get tab completion in the revit python shell!

    ReplyDelete

Post a Comment