Here is what we want – you select an in-place family and click ‘Convert to Component Family‘ on the Ribbon.  Through API Wizardry, the following happens without any further user interaction:

  1. The family is edited in place
  2. All objects in the family (including reference planes etc) are selected
  3. A ‘group’ command is triggered
  4. The group is saved (as a file) to a temporary location (it will be an RFA)
  5. This family is loaded back into the project
  6. The family is placed in the correct location (XYZ) in the project
  7. The original in-place family is deleted from the project.

This can all be done manually of course, using the workflow described here.

I’m sure that many users would find this tool helpful, and for some of you advanced Revit API programmers, this utility should be a piece of cake!

Also: if you release this utility for free, just think of the Revit API street cred that would give you.

Finally, if you want to take it to the next level – make a Batch Convert option, that allows the user to ‘pick’ which In-place families (from the current project) that they would like converted, after which the Batch tool goes ahead and does steps 1 to 7 above on each and every in-place family you selected.

The Building Coder has put together a very advanced post that essentially demonstrates that the Revit API can sample an external, continuously changing graphical ‘feed’, and then display this inside Revit itself.  Cool!

Now, I challenge someone to grab the live feed from a webcam looking out a real-life window, and then show me it presenting itself through a Revit Window family 🙂

Quote:
Here is RevitWebcam2012_3_final_cleanup.zip containing the cleaned up code with all obsolete API usage removed.
Here is a snapshot of RevitWebcam up and running in Revit 2012:
RevitWebcam in Revit 2012
Read more / via
The Building Coder: Revit Webcam 2012

Whether you prefer C# or VB.Net for Revit API add-in development is probably a matter of preference.  So for those of you who haven’t heard yet:

Based on popular demand, we have now added new VB.NET samples.
So regardless whether you are new to this training or have already gone through it once with the C# code, now is your chance to choose the language you prefer, C# or VB.Net, at www.autodesk.com/myfirstrevitplugin.

via
The Building Coder: My First Revit Plug-in in VB

If you head over to this link, you will find a nice collection of Revit API resources, including:

  • My First Revit Plug-in (self-paced tutorial guide for a smooth introduction into the programming world)
  • SDK downloads
  • Introduction to Revit 2011/2012 Programming (DevTV videos)

There is also a very handy package from the Revit API Labs.  If you unzip the following file, you can find actual class handout documents, presentation slides, and source code samples for both VB and CS (C Sharp, C#) languages:
Revit API 2012 Training (zip – 12726Kb)
 
via
Autodesk – Developer Center – Autodesk� Revit� Architecture, Autodesk� Revit� Structure and Autodesk� Revit� MEP

Are you an Autodesk Revit power user with an interest in becoming even more productive? Would you like to automate or extend the capabilities of Revit, but are new to computer programming? If so, then this guide is designed for you.

“My First Plug-in” is a self-paced tutorial guide for a smooth introduction into the programming world. This is a “one-stop shop” learning path for users who know Autodesk products but are absolutely new to programming and are thinking about taking the plunge. In this guide, you will be working with the Autodesk Revit .NET API and the C# programming language. The supported product version is Autodesk Revit Architecture 2011 and succeeding versions.

Product: Autodesk Revit 2011 or higher
Programming Language: C#
Application Programming Interface (API): Revit .NET API

via
Autodesk – My First Plug-in Training – My First Revit Plug-in Overview

This is awesome.  Let’s say you have a project with heaps of families in it, and you want to save them to individual files.  There is an API add on that does exactly this.  How do you get it and use it?

First of all, download this file (Chapter 24) from the Sybex resource page for the book Mastering Revit Architecture 2011.

Now:

  1. This is a ZIP file, so unzip the file.
  2. Browse in the contents to:
    c24ExampleApplicationExampleApplicationbinDebug
  3. Copy everything from this folder to:
    C:Revit Projects
  4. Copy the two .addin files from the c24 folder to the correct location as shown below:
        * For a specific user:
              o For Windows XP – C:Documents and SettingsApplication DataAutodeskRevitAddins2011
              o For Vista/Windows 7 – C:UsersAppDataRoamingAutodeskRevitAddins2011
        * For all users:
              o For Windows XP – C:Documents and SettingsAll UsersApplication DataAutodeskRevitAddins2011
              o For Vista/Windows 7 – C:ProgramDataAutodeskRevitAddins2011
    Refer to this post at The Building Coder for more information.
  5. Restart Revit 2011

Now, on the Add-Ins ribbon, there will be a new section for the Revit Family Export Utility:

When you run this with a Project open, it will prompt you for a directory, and then it will save all the families from the current Project to .rfa family files, and it will put them into appropriate directories (by Category) for you!

This is a very cool tool – thanks to Don Rudder for his great chapter in the book, and for this excellent API demonstration.

Consider some ways you could use this:

  • Load a bunch of families into a project and get this tool to sort them into appropriate folders for you.
  • You have an RVT but you do not have the RFA files for families loaded into the RVT – use this tool to get them all out quickly.
  • Transfer all RFAs from one RVT to another by saving them out and then loading them all in at once.
The author of RevitToday posted a comment on one of my posts yesterday, so I went to the blog to have a look.
He has provided a couple of extensions you can download:

Export XYZ from Revit 2011

This extension for Revit 2011 exports all coordinates of Point Based Generic Models to an Excel file.

You can locate Point Based Generic Models in your whole model. You are able to nest such a Family within another. These points are exported as well when you make this family Shared.

You can download it here. (It has been compiled for Windows XP 32 bits)

Import coordinates into Revit 2011

I updated the Revit 2010 extension for importing coordinates from a TXT file. You are free to select a family of your own. It should be a Point Based family of course.

You can download the extension here.

(It has been compiled for Windows XP 32 bits) 

This guide is for beginners who want to view the Revit database in 2011. I have previously posted about rvtmgddbg. This has been replaced in 2011 by RevitLookup. This is an API tool that allows you to view (‘Snoop’) the elements in the Revit database.

How do you set it up? Its quite simple really:

  1. Download this file (thanks to The Building Coder).
  2. Unzip the file to the C: drive (such that you have paths C:RevitLookupCS etc)
  3. Double click on the file “C:RevitLookupCSRevitLookup.csproj”, this will open in Visual Studio tools for Applications.
  4. Click on Build – Build RevitLookup (this creates the RevitLookup.dll file)

  5. Now, open the file “C:RevitLookupCSRevitLookup.addin” in Notepad.
  6. Replace this-
    RevitLookup.dll

    with this-
    C:RevitLookupCSbinDebugRevitLookup.dll

  7. Save the file.
  8. Now, copy the RevitLookup.addin file you just saved to the following location (depending on your OS):

    For Vista
    C:ProgramDataAutodeskREVITAddins2011

    For XP
    C:Documents and SettingsAll UsersApplication DataAutodeskRevitAddins2011

  9. That’s it! You should now see the Revit Lookup menu on your Add-Ins ribbon:


One of the simplest ways to use this tool is to select an Object, then use the ‘Snoop Current Selection’ option. Enjoy!