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:

How to find python macro exmaples

Original post: http://adndevblog.typepad.com/aec/2016/03/revitapi-how-to-find-code-examples-for-macro-of-python-or-ruby.html

You may also be interested in the Revit Python Wrapper here http://revitpythonwrapper.readthedocs.io/en/latest/

… by using a very wild script from dp Stuff!

Comes with a disclaimer:
Warning! Make sure you don’t run this script on your central model – detach it from central first. Because once the views are gone – they are GONE! Don’t tell me that I didn’t warn you – use it at your own risk.
Download Revit IronPython Shell script
via
dp Stuff: Remove Working Views With Python Shell and Revit API

I have previously posted about RevitPythonShell a number of times. In this post Dima Chiriacov gives a real-world example on using the shell to change the case of text.

There are quite a number of free add-ins which can easily change case too, like this one or this one (which also allows merging of text).

Read how to use RevitPythonShell at:
DP stuff: Convert Revit Text to Upper Case

RevitPythonShell has some competition!  Its called RevitRubyShell.

RevitRubyShell on Github – installer

What is RubyRuby 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.

Quote from The Building Coder:
Last week, I provided a short description of the interactive real-time Revit programming environment RevitRubyShell provided by Håkon Clausen and mentioned how impressed I was by its minimalistic single-click installer
 via
The Building Coder: RevitRubyShell Implementation and Installer

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.

via
The Proving Ground by Nathan Miller: Revit API: Divided Surfaces and Excel Interop

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…”

via
The Proving Ground by Nathan Miller: Slingshot!… for Revit?

Image from The Proving Ground – “A point cloud in Vasari being created using a MySQL database…”

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…

via
Python Tools for Visual Studio – Download: 1.1 Beta 1

Here is a question for you:

How will the new Python Tools allow further interaction with Revit via revitpythonshell?
http://thebuildingcoder.typepad.com/blog/2011/07/python-shell-in-revit-and-vasari.html
 

EDIT – added links to buildz post with 2012 installers etc.  Also embedded extra Youtube video.

http://buildz.blogspot.com/2011/09/python-scripting-in-vasari-21.html

Download some starter samples from here (via buildz)

Link to the Google Project:
revitpythonshell – An IronPython plugin for Autodesk Revit Architecture 2010 – Google Project Hosting

Link to a revitpythonshell install guide:
Installing IronPython with Vasari (The Proving Ground)