Showing posts with label Revit. Show all posts
Showing posts with label Revit. Show all posts

2.24.2010

Revit API Resources

If you are interested in getting into the Revit API, you're going to need some resources to help you along. Below are the links to the places that have helped me and continue to help me.


First, the free resources:

Autodesk's DevTV introduction to the API:
http://download.autodesk.com/media/adn/DevTV_Introduction_to_Revit_Programming/

Snoop Tool - RvtMgdDbg:
http://download.autodesk.com/media/adn/RevitAPI_2010_Webcast.zip

AUGI Revit API Discussion Forum:
http://forums.augi.com/forumdisplay.php?f=218

Autodesk Discussion Groups - Autodesk Revit API
http://discussion.autodesk.com/forums/forum.jspa?forumID=160

The Building Coder - Jeremy Tammik
http://thebuildingcoder.typepad.com/blog/

CAD Application Development - Matt Mason
http://cadappdev.blogspot.com/

Revit Programming - Ed Pitt
http://revit-programmer.blogspot.com/

Bolt Out of the Red - Guy Robinson
http://redbolts.com/blog/

Rod.Net - Rod Howarth
http://roddotnet.blogspot.com/
And Rod's Revit API search tool:
http://revitapisearch.rodh.org/

Software Development Kit (SDK)
It comes with your Revit media/DVD or if you downloaded Revit and then installed it, look in C:\Autodesk.
The SDK has lots of samples, the Revit API Developer Guide pdf, and the RevitAPI chm (help) file.



These resources aren't free but may be of great value:

Autodesk Developer Network
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=723353

Your Autodesk Reseller


And finally some personal notes from my experience with the API

Brief Outline of What I Do When Writting Code:

Working with the Revit API is mostly about automating or simplifying something you can already do manually with regular Revit tools. The exception to this may be in the area of analysis tools. So your first steps with any code you make should be to understand the manual steps, menus, dialog boxes, and human interactions involved in your code idea.

Once you have an idea and understand the regular manual process, then use the snoop tool RvtMgdDbg to learn what is exposed in the API. This will help you figure out if what you want to do is possible. Also look at the SDK examples. That may give you some indication of what is possible as well as give you a head start on your code.

Then as you go, use the resources above to help you along and get over rough spots.


Word of Warning
If your code gets ambitious, be careful about ROI. Revit already automates many tedious tasks and is always improving to automate more. So as a rule of thumb, make sure that the payback for the effort you put into making the code and supporting it occurs before the next release of Revit just in case that new release has a viable equivalent to your code.

This warning is especially directed at those like me who are used to complex coding for AutoCAD. AutoCAD is NOT inherently an AEC program and needs ambitious add-ons to make it so. Revit however IS inherently an AEC program and just needs some simpler (analysis tools excepting) helping code to fit it to your company's workflow. So don't get too carried away before doing some risk assesment.

Comments in Your Code
Do yourself and your company a huge favor and put appropriate comments in your source code. If you get hit by a bus (why are buses always getting the bad rap?) and someone else has to continue with your code or you are revisiting or updating your code which you spent a whole year forgetting about, then these comments will come in handy. Mostly my comments start off by outlining the reason why the code was made and the general outline of what it should do. Then throughout I will put in notes about why a certain coding path was chosen or even why certain seemingly obvious coding paths were not chosen. You can look at the code to see what it is doing, but the why is not always obvious but very important.

8.25.2009

Fun Curtain Panel Patterns

The new curtain panel pattern based families in Revit are way cool. I have been following and learning from buildz.blogspot.com and have been doing some experimenting of my own. Buildz is a good place to see some examples of what is possible with this new type of element.

So far it seems the best way to work with these new curtain panel pattern based families is to think through what the underlying structure is that you want to achieve, choose the most appropriate base pattern that matches that structure, and then drive your geometry with reference points first, then reference lines, and then planes.

Most of the examples of curtain panel pattern based families I have seen use splines that contort pretty well with whatever crazy mass you put them on. However, each panel and its spline is dimensionally unique. From a maufacturing point of view I was wondering if you could make these curves identical from one to the next so you get the economies of mass production. Here is a sample based on pine cones and fish scales that uses repeated identical discs. The tilt, radius, and position of the discs are adjustable as well as the material. The discs are connected to a triangulated frame.















Below is another panel I made based on a real pre-Revit 2010 project. When we first made this, it was difficult and clunky because it draped across a curved surface and used a lot of voids; but it was a breeze to make with Revit 2010 with crisp seamless edges and no voids.














And here's another with a litte help from the API and instance parameters:













This Spanish tile panel pattern might not perform well for a big roof, but it is possible and looks great (the ridges are a line-based family):









And now for some impractical but fun stuff showing off Revit's curvy abilities. The curl and width of each leaf is adjustable with instance parameters so you can get this:













or you can even adjust some visibility parameters to make the 2 additional types from the same family as above seen here:

7.24.2009

Revit 2010 Classic?

ZOMG!

Roll on over to the Augi forums and see what witchcraft and sorcery those 'never-say-die' folks have cast on the new Revit 2010 UI. I'll give you a hint: the ribbon has been cut, shall we say.

Hacks have a way of changing the game. I am curious to see how Autodesk responds. This may get interesting.

More to come...