Have you ever wondered how to convert a Revit macro into an addin? You can follow Harry’s steps over at this post.
What about getting some sample code for Python and Ruby Revit projects? From AEC DevBlog:
… the code examples are hidden in the default macro projects created by macro manager, see below image, the project is the default python project, there are several “if False” statements, if you remove the line of “if False”, uncomment and unindent 4 spaces to methods below it, the methods will become available macros and appear in the macro manager, and you will see the same “if false” in Ruby projects too:
What is Ruby? Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features…Ruby supports multiple programming paradigms, including functional, object oriented, imperative and reflective.
Thanks to Håkon Clausen, Ruby is now friends with Revit.
Nathan Miller strikes again: I am creating a strange ‘catenary’ surface with Kangaroo and Grasshopper. I am then feeding the information into an Excel spreadsheet and reconstructing the shape using Adaptive Components via RevitPythonShell. Note how I am also able to adjust the radius parameter of the pipe members within Revit to reflect the ‘force’ diagram created in Kangaroo.
Nathan Miller has been working on a number of cool things for some years now. In one recent post about Slingshot for Revit, he states “the tool will provide different means of connecting Revit (and Vasari) to relational database management systems, including MySQL. More importantly, I am interested in establishing common database schema that will allow for a more fluid workflow between Revit and external design tools like Rhino and Grasshopper. This includes sharing parameters and geometry.“
He has been “prototyping some functionality via the RevitPythonShell plug-in in Vasari. Python is giving me a more fluid workflow than the usual Revit development process. Eventually, the tools will become true add-ins…”
Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets…