Wednesday, April 11, 2007

Revit API 2008: A few more features sneaking in...

Between the alpha version (which I used to write most of the content on this blog, during the embargo period) and the beta version, a couple very useful features were quietly included into the API...

Show Me The Elements!
If you had ever written an application with the Revit API that identified particular elements, you probably ran across this... There wasn't any nice way to show the user WHERE a particular element was... The best that you could do was to exit your application, telling Revit that it had "failed" and having the element in question as part of the selection set. This gave a somewhat ugly Revit dialog box where the "error elements" could be examined.

But the other day, I stumbled on this late addition... the new ShowElements() method will let you specify one or more elements - and will temporarily jump to a view which nicely frames them. It's a beautiful thing! (of course, if I was a complaining type, I might whine that there's still no way to nicely highlight the element at the same time - but I'm not a complainer! :) ).

Worksets...
While we haven't done an application in Revit yet that needed to be aware of whether it was part of a workset, I'm sure that day is coming... Also making a late appearance were document properties that tell you whether it is WorkShared, and the location of the central file... I'm sure it will come in handy...

All in all, a nice set of suprise additions between alpha and beta....

No comments: