Friday, December 28, 2007

Revit 2008 API: If you haven't seen it all, then there are still new features...

A couple years back, NBC or one of the other networks had a campaign for people to watch "re-runs", saying basically - "if you haven't seen it yet, then it's new to you". While I've written a decent amount about what's in the 2008 API and what's possible, I'm still stumbling into things I didn't think were possible.

Case in point: I've been reviewing the alpha version of the 2009 API (I think I'm allowed to say that - although I can't give any details) - but along the way in comparing it to 2008, I found a few things that were "new to me" - so I figured I would note them for other people...

Make more family types...
I had poked around at the concept of making new families and types - but it didn't seem like it was possible. While you can create a new Family from a template, it didn't seem like there was a method where you could create new types within the family....

The problem was that I was looking for something more explicit, like "CreateNewType()" - the other day I discovered you could do:

family.Symbols.Duplicate( ), where you can duplicate one of the existing types. That's something, at least!

Someone had asked on the AUGI message board last week whether it was possible to find elements within a family. My original thought was "not entirely" - I knew that you could find nested families and solids and voids - but I thought that was it. I happened to give it a quick look with the RvtMgdDbg tool, and noticed that the "Others" field in the family object has "everything else" which is defined inside the family (views, elements, etc).

Coping with Families
A ways back I had noticed that the FamilyInstance class had "AddCoping/SetCoping/RemoveCoping" etc - all working with other elements. I've finally had a chance to inquire what this is for... It's typically used for Structural beams (in fact, it may only work with items that are steel?) when beams have to come together at strange angles (this tells Revit that they should be joined in a Coping style).

View3D Sectionbox is modifiable
I've been lamenting for ages that the View objects are not really nicely modifiable in the Revit API - and that's still true. Someday we'll be able to control the view like with any other CAD system. But I did find one thing which I hadn't realized before - it looks like the Sectionbox in a View3D object is modifiable - which might mean that you could do some interesting automation. Someone had asked a while back if it was possible to get prints of each level in 3D at different phases. By modifing the section box dynamically - this would get pretty darn close.

Anyway - just thought I'd pass this on. Someone someday will Google for "Revit View3D", and this will come up and make their day.

Friday, December 21, 2007

Dumb Revit API Trick...

So I stumbled across something in the Revit API the other day. Probably impractical - but I figured I'd pass it on.

I'd been frustrated in the past with two aspects of Revit development (ok, far, far more than two - but I'm talking about two specific things in this context :) ).

- You can't change the active view in a Revit document.
- Although you can load a document or create a new document, it didn't do it VISUALLY... That is, it's done in Revit's memory - but it's only programmatic, the user never sees it.

Both of these things seem to limit what you could use the API to do - right?

Anyway, I was poking around with RvtMgdDbg, the object browsing tool provided to ADN members - and it has a few test utilities. I tried out the printing one (knowing that the printing API also has so many problems with it that it wasn't worth pursuing) - but I noticed something... views and models were changing on the screen in front of me.

That's when it hit me. If you want to change the Active View - Print the one you want.
If you want to "show" a document you've loaded - Print it.

It's about the dumbest workaround I've ever come up with (and that's saying something) - and it will probably lead to further deforestation - but hey, it works!

Actually, what we would really need to make this almost usable is some kind of "null printer" driver which doesn't actually do anything - it just sends the printer bits into the black hole. Even with that, and as desperate as I sometimes am for a workaround, that's probably not a scalable solution. Of course, you would also need Autodesk to provide a way of specifying that printer, which is not available in 2008 - we can hope for 2009.

Ah well - I figured I'd pass it on.

Friday, November 16, 2007

Revit Phases: Revisited

I hate it when I don't follow my own advice.

A while back, I wrote about the challenges of making your Revit applications phase aware.

Well, apparently I wasn't listening to myself as much as I should have - because one day after release of our Revit Utilities, we spotted a couple of scenarios and quirks with phasing that we hadn't considered in the Room Renumber, Door Mark Update and Earth Connector.

The updates to address this (marked as "version 1.0.2876" should be posted soon on the Revit Utilties page).

For the developers out there, let me give you a few additional reminders:

  • Rooms have one and only one phase.
  • Doors and Windows potentially open To/From different rooms (depending on the phase).
  • If you don't specify which phase you want the To/From data for, it is presumed you want it for the final phase.
  • When you get the array of Revit Phases - they are given to you in their order of creation - NOT THEIR SEQUENCE. You have to re-figure them in order by looking at their PHASE_SEQUENCE_NUMBER.

While we found most of these issues before a customer did - it's still annoying when you make the mistake that you warn others about. :)


Thursday, November 15, 2007

Earth Connector for Revit: Updated

We hadn't originally planned on another update to Earth Connector for Revit (connecting your Revit BIM model to Google Earth) - primarily because Autodesk has released their version of this tool.

The Autodesk tool, however, seems like it is in pretty limited release - I still haven't been able to find it on the subscription site.

Recently, we released the Avatech Revit Utilities - a set of productivity tools for Revit users - and we thought that we might give Earth Connector a little enhancement.

Some time since our last release of Earth Connector for Revit happened, a small but powerful change happened with Google Earth - the TimeSpan feature, which had been limited to the Professional version - moved down into the basic (free) version. That's when it hit us - why not incorporate the building phases into our Google Earth KML file as a TimeSpan.

When a KML/KMZ file has a TimeSpan, it adds the Timeline slider to the upper right, as shown above.

For now, because Revit phases don't natively have dates and times on them - we're doing a fairly arbitrary job of transferring phases into the calendar... but we figure that this will get people interested and talking about how we might improve from here.

Below is a sample of a building with 7-8 Revit phases. Who knew that Google Earth could be a 4-D construction tool!?!


P.S. The newest Earth Connector Revit is available only on the Revit Utilities page.

Avatech's Revit Utilities

We've kicked this idea around internally at Avatech for a while, and I'm happy to say that we're finally going ahead with it.

We're taking four relatively simple Revit applications that we developed to support our Revit clients, and we're releasing them to the public today.

  • Room Renumbering (re-numbering or inserting rooms in a sequence)
  • Door Mark Update (to make the mark match the room it swings into)
  • Change Case (for those of you with, you know, real standards for things like UPPER CASE, lower case and Title Case).
  • RevitCity Browser (to make it easier to grab and use the content you want - while organizing it properly at the same time).

We've also released a minor update to the Earth Connector product for Revit (which I'll post on seperately).

The Press Release is here.

The Avatech page for the Revit Utilities is here.

I hope that the Revit community finds these tools helpful. Questions or comments on the tools can be directed to:

devfeedback (at)


Friday, October 19, 2007

Autodesk Intent: Bringing Rule-Based Inventor Automation to a Wider Audience

I've been aware of Engineering Intent for a decade or more... I even competed against it a little in the 90's. But I've been watching with keen interest what would happen to it once it was acquired by Autodesk in late 2005 - in particular because it covers a space that we (Avatech Software Development) work in quite a bit - CAD Automation.

I've known that the team at Autodesk has been working hard for a year or more on changing the product to fit in closer with Autodesk Inventor (the early integration was a little ugly).

I finally saw a demo of the upcoming version at the Manufacturing DevCamp in Portland a couple weeks ago - and I was very impressed with what they've done.

For manufacturers that are trying to automate the design of their products (because they are in a "Configure to Order" or "Engineer to Order" business), Intent will be a big help.

What is Intent?
Intent is a Framework - an environment nicely built into Inventor which is specially designed to solve these kinds of specific problems - building and customizing Inventor parts, assemblies and drawings dynamically based on a set of inputs and a set of rules.

Intent provides both an easy way of dealing with the programming of Inventor, as well as organizing how a particular assembly BOM is put together, as well as organizing the rules and flow of information which drives the design.

The "rules" are written in a VB/VBA/VB.NET-like syntax, so anyone who is familiar with those languages will feel reasonably at home quickly.

The Intent Model
It's an interesting concept - that you build a "model" within Intent which defines the assembly, how different components are chosen or assembled, and how the input information flows through to the deliverables you need (drawing, quote document, etc).

Changing the inputs (or any values within the model) causes the entire assembly inside of Inventor to be re-computed based on any necessary changes. While I've been involved with a large number of Inventor automation projects, if you wanted to "change" the requirements that drove your design after it was done, in most of those projects that would require you to just "start over" - not in Intent, though.

A Simple GUI for You
When you're developing with VB or .NET, one of the things which can take some getting used to is the developing of interfaces inside of Inventor. It's better than it used to be, but it's hard to do well.

Intent makes this easy (during development) - by providing a generic GUI that can detect what the inputs are for each part or assembly, handling choices ("only A,B, or C") or constraints (<= 3").

The simple GUI can be replaced with a fancier, specific GUI using the Intent API as well - but depending on your audience this might not be necessary.

Easy Integration with Word, Excel, and Inventor Studio
Since many "Engineer-To-Order" applications wind up generating quotes and spreadsheets, it's nice that Intent offers easy mechanisms to autogenerate office documents (swapping in tags to build them from templates). And because nothing is nicer than a shiny rendered picture on the quote, it's pretty cool that they've done the Inventor Studio integration work and made that easy.

It's all about Rules
As cool as the Inventor integration features are (they've done a good job of making some things, particularly assembly building, FAR easier than it is with the Inventor SDK), I don't think that's what should be focused on.

Ultimately, what's important to developing a meaningful automation application isn't so much about automating Inventor as it is building your engineering and business rules into the system. Having the rules represented inside of an Intent model makes it easier to understand, maintain and extend the system over time - which represents a large amount of the total cost of developing and owning an automation system over time.

I'll be interested to see how Intent gets accepted by the community. Many in the Autodesk eco-system may not grasp the difference ("why should I use Intent - I can do all that stuff with VBA!" - which is technically true, although it's somewhat akin to saying "why do you need VBA - you can do it all in Assembly Language!"). If you're an engineer who dabbles with VB for Inventor automation - Intent may be just what the doctor ordered.

It's Beta Season

In the Autodesk world, November/December/January/February is "beta-time", where the Autodesk products that will be released in the spring start enjoying their "first-looks" by outsiders (at least the first large-scale looks).

It's an exciting time - what's new? what's been fixed? what's been upgraded? what new things are possible? This is the part of the year where I get the most excited- but to some degree a little frustrated. All Autodesk betas are covered by strict Non-Disclosure Agreements, so I can't write about them until each individual product's "embargo" is lifted.

I do most of my writing in this blog in the spring when the embargo comes out - but now is the season where I start to get inspired about what to write about.

In any case, I'll probably be relatively silent for a couple months - but look forward to some good columns come late winter/early spring, when the NDA "thaws".


Wednesday, September 12, 2007

Revit RDBLink: Enhancements to ODBC Export

One of the things that Emile Kfoury, the Sr. Product Manager for the AEC platform mentioned at the DevCamp last week was a new SDK Sample which would be available in the Revit 2008 Service Pack 2 download, called RDBLink.

A wide variety of customers continue to seem interested in the ODBC Export capabilities of Revit. This sample is an example of how you can use the API to take it even further.

This tool picks up AFTER you have already exported a database to ODBC (make sure that you have a clean export from the current Revit version).

Export Enhancement
The tool creates a number of additional tables within the existing Revit database:

  • ElementLevel (relationships between elements and levels)
  • ElementPhase (relationships between elements and their created/demolished phases)
  • DoorWall (relationships between Doors and their host wall)
  • WindowWall (relationships between Windows and their host wall)
  • RoomTags (relationships between Tags, their Rooms what view they're shown)
  • Categories (full descriptions of categories, including their default material info)
  • Openings
  • LineLoadOnBeam
  • AreaLoadOnSlab

In addition, I believe more parameters are pushed into existing tables (such as shared parameters).

All in all, this puts more information into the database - which can only be a good thing for people who are trying to leverage the information from the outside.

Import Enhancement
An important distinction is that this version is also capable of pushing information BACK to Revit. While I haven't tested it extensively, it appears to push a variety of property changes which are made in the database back to their corresponding elements in Revit.

In addition, it appears that this application can create new Family Types based on added rows in the database. The code hints that even more "creation-oriented" capability could be implemented as well.


It will be interesting to see how different firms might use this - it represents another way of exposing BIM data to leverage it in other downstream processes... And the import capabilities will get people thinking about workflows that line up well with the real world (where the design iterates many, many times) - and the BIM data needs to flow in a variety of directions to be ultimately helpful.

NOTE: The Revit RDBLink is part of the 2008 SP2 SDK - so it should be available to everyone (not just ADN members, is my understanding).

Autodesk AEC DevCamps

I spent much of last week in Wakefield, MA at the Autodesk AEC DevCamp...

While the venue and the food was somewhat weak (compared to a sales conference - go figure) - the content of the various classes was reasonably good.

Our company had 7 people attending, so we spread out among the 5 conference tracks.
In particular, I learned:

More about the Revit Certified Application process
While the SDK contains the guidelines, it's nice to hear it explained in person... At this point, nothing will be certified prior to the Revit 2009 releases, but it will be a pretty straightforward process - unless you have a structural application to certify.

Because Autodesk has done so much work with structural application integration, they have 10 additional pages of required workflow and element support to meet the certification.

I'm not sure when in the future we're going to release a retail application (which might be worth certifying) - for the moment, while we're doing custom work and promotional applets - it's not in the cards.

As always, my opinion is the biggest challenge in certification is having a good installer (in particular, one that senses the presence of the various flavors of Revit and offers to install into any or all of them - as appropriate). We're about 1/2 way there - but it's a non-trivial bit of work.

Revit API with Revit MEP: What can be done now?
This meeting demonstrated a good number of sample applications, showing how you could make valuable automation of the MEP product just using what is already available in the API - mainly just driving parameters and modifying Family Instance types.

Examples included things such as sizing Air Terminals based on the rooms that they are supporting.

The keynote was Jay Bhatt (VP of the AEC division) talking about the building market in general, as well as the influence of Green Building and BIM on the marketplace. While I had seen a variety of the slides before in other Autodesk presentations - it was well done.

Revit Families
A great talk by Steven Campbell, a QA Analyst at Autodesk (who is really in charge of all the Revit content - at least in the US)... Steven compressed his Autodesk-internal training class (which is 2 weeks) into a little less than 2 hours... There is just so much that goes into creating good Revit families - it was great to be able to hear someone who has been doing it for 6 years elaborate on what is the right process to follow - as well as just some background on what all those special lines and planes are within the content templates.

Next Up: Manufacturing DevCamp next week.

Wednesday, May 09, 2007

The Challenges of Phase-Aware Revit Apps.

Revit Phases
One of the more interesting capabilities of Revit (for a long time now, not a recent one) is the concept of Phases. Specifically, that you can define, for example, the "Existing" state of a building, then define a "New Construction" phase and demolish existing elements (like walls) as well as add new elements.
Internally, each type of element within Revit has a "PhaseCreated" and a "PhaseDemolished". Sounds pretty cool, right? It is.

A Couple More Worthwhile Notes...
As I understand it (and real Reviteers, please jump on me if I'm wrong on this) - while Elements can be created or demolished in particular phases, they cannot change. If the idea is to change something, it must be demolished and re-created. Another interesting behavior is that of Room objects - room objects are locked to a single phase (which makes some sense, seeing that they would wind up changing between phases if you dropped in a wall, for example). Some strange things do happen out there in the wild, though - case in point - an existing window which is demolished seems to magically cause a "filler wall" to be created.

A Developer's Life Gets Harder
Here's where the hard part comes in as an application developer, though - when you have multiple phases within one model, are moving into not just 3D CAD but 4D (time). As developers we are used to dealing with the model as "the current state reality" - but in Revit, when you dig through the model, you're digging through a whole potential timeline of model construction - you have to do extra work to determine the state of the model as of "Phase X".

For example, if you're interested in the "New Construction" phase, you need to ignore any elements that are existing but demolished as part of the "New Construction" phase.

One of the interesting new capabilities in 2008 is that you can access the ROOM, TO_ROOM and FROM_ROOM for FamilyInstances (doors, windows, light fixtures, etc). The trick is that this ability to access room data is actually "Phase-based" - when you want to know, for example, which room a desk is in, you have to specify during which phase of construction.

The more I grasp the Revit Phased approach, the more I think that most of the applications we're developing will need to prompt the user for which phase they should work on. While specific companies may not be using Phases today - you probably still need to support the phase checking concept (because if you don't and someone decides to "try it", then you'll probably get the wrong answer!).

To that end, we're posting a new version of Earth Connector for Revit, which prompts the user for which Phase they would like to display.

This 4D stuff is cool, but developers may need to stock up on some Ibuprofen.

Wednesday, May 02, 2007

Earth Connector for Revit 2008 Posted

We've posted an update to Earth Connector for Revit on our website which will support the 2008 line of Revit products.

While I know that Autodesk has announced that they will be offering Google Earth support in conjunction with Revit 2008, it's not available as of yet - and we've been getting requests for an Earth Connector update. We've actually known this was coming for about a year, but opted to develop Earth Connector anyway, in order to explore the API and enable people to work with the great combination of Revit and Google Earth during the past year.

We're interested to see what Autodesk's version will be like... I anticipate it will be somewhat more like their AutoCAD version (including the ability to import the site image from Google Earth - a new capability enabled by the 2008 API). I'm hoping that they have invested where we did not - in KML 2.1 support (including textures, family instances, etc) - that will make for some neat (and smaller) models!

In the meantime (and afterwards too), Earth Connector is there for you.

Tuesday, May 01, 2007

Autodesk Introduces Inventor LT

In somewhat of a suprise move (at least to me - apparently I'm out of the loop), Autodesk has introduced a "Limited" version of it's 3D Mechanical Inventor software. Conceptually - I suppose it should work much like AutoCAD vs. AutoCAD LT, with LT being the choice of users who don't really need the full capabilities of the Inventor software.

What's missing? well, from a developer's perspective - everything! Similar to the restrictions on AutoCAD LT, Inventor LT will not allow any 3rd party development to work with it.

But beyond that restriction - it's a pretty good deal (especially while it's free). If nothing else, you get full part modeling support, rendering, DWF publishing, translation (including UGNX, Parasolid and Pro/E Granite import and export).

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! :) ).

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....

Friday, March 23, 2007

Revit 2008 API: New Creation Capabilities, Newly promoted Objects

In any new release of an API like Revit, it seems like everyone's first question is "what can it create now? can it create everything that I want/need? can it create everything that is in the interactive Revit product?". I however, am too mature to care too dearly about that :)

New Application Object Creation
In the application area, the following can now be created. Most of these are "mathematical" objects which are later used to create actual geometry.

  • Ellipse
  • NurbSpline
  • Select Element Set
  • Parameter List Item Array (apparently used in conjunction with some kind of external parameter item list).

New Document Object Creation
In the document element creation, the following objects can now be created:

  • Annotation Symbol
  • Area Reinforcement
  • Beam System
  • Detail Curve
  • Foundation Slab
  • Opening
  • Path Reinforcement
  • Room
  • Tag
  • Text Note
  • View Plan

Elements Promoted to Concrete Objects
If you've ever scanned a Revit model programmatically, you know that there are probably 30,000 elements in a very modestly sized model. If you look at their types, you know that a large number of those elements show up as "Autodesk.Revit.Element" - meaning that they are an abstract type with only limited information provided about them.

In 2008, a variety of Element types got promoted so that they are represented by full classes. This typically means that you can inquire about more detailed information on these types:

  • Blend
  • Extrusion
  • Sweep
  • Revolution
  • gbxmlElement
  • LinearArray
  • RadialArray
  • ProjectInfo
  • ProjectUnit
  • Sketch
  • SpotDimension
  • TextNote
  • ViewPlan
  • ViewSection
  • ViewSheet
  • Leader, LeaderArray

(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).

Revit 2008 API: The Hidden Features

This is probably my favorite topic... the enhancements to the Revit 2008 API which are not obvious - that we've figured out by inspecting behavior rather than inspecting documentation. For those of us trying to accomplish some goal with the API, and improvement in this category is worth just as much as any other feature enhancement...

Rooms and Family Instances
I think a variety of us had tried to do programmatically what Revit did so nicely - keep track of what room a particular family instance was related to. The API and the scheduling guide seemed to have everything we needed: parameters for Room, ToRoom and FromRoom... BUT - they sort of, well, didn't work.

I'm happy to say that as of Revit 2008, everything that I've tried relating to Family Instances and Rooms DOES work:

  • Family Instances now have a "first class" "ToRoom" and "FromRoom" property (not just buried in the parameter list). So you can now understand the connection between rooms based on the information in Doors and Windows - NICE!
  • Family Instances now have a Room Parameter that works - ie furniture knows what room it resides in (can you say "Asset Management application?").

A couple of additional notes:

  • Room objects seem to have many more Parameters than before - I'd estimate 75 parameters on every room, most of them Revit Systems oriented.
  • Door Oddity: External Doors have a FROM but no TO room.
  • Window Oddity: External Windows have a TO but no FROM room.
  • The FamilyInstance/Room relationship is PHASE-AWARE... So if a phase means that the instance is now in another room in a later phase, it can handle that. Wow!

Other FamilyInstance Enhancements

Beyond the myriad of Room-oriented enhancements, there are a number of interactively-oriented enhancements to FamilyInstances, including:

  • Properties for CanFlipFacing, FacingFlipped, and a method to actually do the Flip
  • Properties for CanFlipHand, HandFlipped, and a method to do the Flip
  • Properties and Methods for mirroring and rotating
  • A property for "SimilarObjectTypes" - making it far easier to figure out the types that this instance could swap to.
  • This is a little out of place, but if you get from the FamilyInstance to the Family, you now have access to deeper Family information such as Solid and Void feature information (I haven't figured out what to do with it yet).


While it's a very nice thing that TextNotes can be created in Revit 2008, an API always should be measured on both its ability to create data as well as its ability to read existing data. While the TEXT_TEXT builtin Parameter had been in existence since the beginning - it never worked until now... With the Revit 2008, you can get the text associated with a given note using the TEXT_TEXT parameter, as well as the coordinates of each note through a property. All in all, TextNotes have become very functional!

OK, the next two topics don't really go to the level of hidden in behavior - but they are not well publicized by the "what's new"...


Some small but, I think, incredibly important changes were made to the View object (at least if you've tried to work with it before).

  • CategoryVisibility - the ability to control category visibility within your view
  • Print - print a given view
  • Type - the type of view
  • GenLevel - very important: the level which generated this view (I think that this is incredibly important for queries... it lets you easily figure out which elements are logically associated to the current view, for example).
Geometric Objects
The geometry objects have been upgraded with a variety of enhanced properties and methods to help with mathematical analysis:
  • Curves: Properties like ApproximateLength, isCyclic, Period, etc.
  • Curves: Methods like ComputeDerivatives, Distance, Evaluate, Intersect, IsInside, Project
  • Faces: Properties like isCyclic, Period
  • Faces: Methods like ComputeDerivatives, Evaluate, Intersect, Project, IsInside

These enhancements are critical when you have a geometry-intense application (and you'd rather not re-invent the geometry wheel in your own code).


I'm sure that this list is far from complete - it's just what we came up with based on some exploration (and in particular reviewing some of our pains from the past). Understanding undocumented behaviors is an important step to mastering the possibilities of the Revit API - and a challenging topic learn. It would be nice if we could come up with a way to share our experiences - perhaps a Wiki or other collaborative solution.

(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).

Wednesday, March 21, 2007

Revit 2008 API: Working at the Application Level

(stretch) We are finally out of the box!

Prior to Revit 2008, Revit developers were kept in a fairly narrow box... You could only be added to the Tools + External Tools menu, and you could only be run when Revit was in "Modify mode" in the context of a document. The straightjacket was on!

As of Revit 2008, that's now gone... and while you don't have complete carte blanche to work in the application level, there are a variety of critical steps:

There is now the concept of External Applications, which are started when Revit starts (and shutdown when Revit shuts down). There are also now application level events for keeping tracking of when documents are created, opened, saved (which are important for a wide variety of applications which try to synchronize BIM data).

User Interface
External Applications can add both menus and toolbars. Menus can be added to the top level, or wherever you would like within Revit.

Document Control
From the application, you're now able to do several key things which were previously impossible:

  • Open a specific Revit file
  • Start a New Project from a Template (can you say "configurator"!?)
  • Start a New Family Document
  • Start a New Template

Also at the application level, event trapping is available for things like "OnNewDocument" "OnSaveDocument", "OnCloseDocument"...

(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).

Revit 2008 API: Import/Export of DWG/DWF/Image

One of the things that always seemed like a missing capability of any "end-to-end" kind of automation of Revit was that there was no good way to save your work - or better, save it back to DWG so that the AutoCAD crowd could see your work. I know that we worked with a variety of companies to explore how to do "batch save as DWG" on a nightly basis!

Well - I'm quite happy to say that Autodesk has added Import/Export of both DWG and DWF, as well as import of Image files. I suspect that the Image file import is to help tie Revit to various survey or aerial photo applications (whether it's Google Earth or otherwise).

All of the Import/Export tools come with a wide variety of options setting as well - so you get the sense that the processes have been well thought out.

(The wheels are churning in my mind of all the fun things that are now possible).

(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).

Tuesday, March 20, 2007

Revit 2008 API: Pick/Select

Oh, how long were we made to suffer? well, perhaps just the 2 years that the API existed - but it was painful! It was impossible to do what seemed most trivial in any other API... to be able to interactively pick something! Nope, not in Revit - if you wanted something picked, you better have had it picked in advance!

But no more! Finally we have two methods which bring a little bit of interactivity to your Revit application:

  • Pick (single element)
  • WindowSelect()

These methods will give control back to the user to do what they need to do, and add any selected elements to the "SelectedElementsSet". It's limited in that you can't pick a location on the screen - only an element - so while there is still more growth needed here, this represents a good first step.

I think it will also lead to more interactive Revit applications (rather than simple tools) - prior to now you could only work with the pre-selected element set. While this didn't completely preclude multiple pick application scenarios, it certainly made them more awkward.

(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).

Revit 2008 API: What's New

OK, the cuffs are finally off... we're allowed to talk about the Revit 2008 API...
There's so much that's new, I'm going to tackle it in a few different postings, just to spread things out a little bit.

Until now, most developers would have characterized the Revit API as "immature" - but Autodesk has taken a variety of important steps to change my view of the API in this release. The door has been opened for Revit to perform a wide variety of new, more interesting tasks.

Some of the enhancements to the Revit API that I'll cover include:

  • Interactive Element Pick/Select
  • DWG/DWF/Image Import/Export
  • Working at the Application Level
  • Printing and Saving
  • New Element Creation
  • Elements Promoted to concrete classes
  • More access to parameter and other data within elements

Anyone who has developed Revit applications or has been thinking about it should be excited at all of the new capabilities to work with in Revit 2008...

Vault 2008 and WSE 3.0

I wrote this post some time ago - when I wasn't sure where the embargo on Vault stood... Now I think I'm in the clear, since at least Productstream has been officially released.

Warning: This is a pretty obscure post - so if you're not involved in Vault development, you might want to pass on this one!

The next version of Vault (2008) is catching up to the latest in Web Standards from Microsoft - Web Services Enhancements 3.0. This will be nice, because WSE 3.0 is the only version that plays nicely with Visual Studio 2005 (leaving developers to jump through some hoops to make things work).

Along the way, I found out about a few issues that make Vault development a little more challenging...

1. Ticket changes
The behavior of the SecurityHeader ticket has been improved... Prior to now it tended to be the same for a long time (I'm not sure if I have it figured out, but you could restart the webserver, and your ticket would still be valid). Now, if you try restarting the webserver, your client's ticket is no longer valid, and you get a SoapException #300.

Working around this scenario means implementing either partial classes or derived classes to be able to store the userID and password, then do a "try/catch" around the actual invoking of the Web Services method... If you get a 300, then you need to try to re-login and then re-Invoke...

2. Download file changes
The signature for the file download has changed - instead of using DIME attachments, the routine just passes back a byte array... However, it's important to note that there is a client config setting called "MTOM" which should be turned on in order to have efficient transfers (if you don't, files will transfer in base-64 ascii mode rather than as binary - making them perhaps 30% less efficient).

3. Time is of the essence
Maybe it was the DST debacle - or maybe either WSE 3.0 or Vault 2008 is more sensitive about time differences between client and server. I know that while doing some wide-area testing, my machine clock was out-of-sync with the Vault 2008 server by about 10-15 minutes - and it would not let me work (buried down deep in the exception was a very clear message about the time tolerance setting). In particular I think it doesn't like it if the SecurityHeader looks like it was generated in the future.

Well - I hope that this was useful to Vault developers out there...

Friday, February 02, 2007

Autodesk Design Review now free - features and pondering...

Another nice gift from Autodesk... Autodesk Design Review is now free.

This will be a nice enhancement to people who already were using DWF for viewing, but didn't want to fork out the $199 for the ability to measure and redline the DWF files.

An interesting feature
A feature of Autodesk Design Review that I noticed for the first time recently is that it can open a few file types that I hadn't concentrated on before. If you go to "File + Open" and look at the types supported, it includes not just DWF but also image formats such as TIF/GIF/PNG/JPG as well as some older engineering formats CALS and IG4 (which I think is IGES).

While you've probably got your share of ways to view the image files, it's nice when you can have a single application that can view all those file formats (plus DWF) in a single environment. What's more, Design Review can batch print them to scale... You could even markup a TIF file, I bet. Not bad. (We used to have a multi-format viewer called IntraVision way back in the day - I think it's now owned by Spatial Components - but it's nice that they're giving them away these days).

We'll probably look at adding this behavior to our Product Browser application (which views files inside of Autodesk Productstream) - using ADR as a consolidated viewing application.

Point to Ponder
Does this represent another tactic in the battle between DWF and PDF? With PDF's recent opening of the format to the ISO committee - is this Autodesk's move? to make the review/markup/create tool free? It makes some sense to me.

Friday, January 12, 2007

DWF/XPS Clarification and Obfuscation

With all the posting about DWF support in Microsoft Windows Vista - I feel like I have to jump in and attempt clarification (because so many blogs and news reports STILL have it wrong, I think).

Here's my take on it.

  • Microsoft developed the XPS specification as a PDF-killer... a digital paper spec

  • Microsoft is providing an XPS viewer built-into Vista, and will provide it as a download in Windows XP, as part of .NET 3.0 runtime, etc

  • Autodesk, through their partnership with Microsoft, has re-engineered the DWF format specification somewhat in order to make it compatible with the XPS spec - ultimately, DWF implementing XPS. This format is known either as "DWF 7.0" (its version) or as "DWFX" (its new file extension).

  • I presume (I have no knowledge of this) that the next version of Autodesk products will support the creation of this new format.

  • Autodesk is also updating the free DWF toolkit to allow other applications which read/write DWF to take advantage of this.

There - was that so hard? (Scott S, please jump in here if I've STILL gotten something wrong here).

Yes, it is somewhat of a big deal. No, it will probably not be a really big deal for another year or two when the number of people who have deployed Autodesk 2008 products and either Vista or the XPS viewer is substantial - the traditional network effect wherein the value is based on the number of people who can EASILY interact.

Thursday, January 04, 2007

Product Browser announced (finally)

Avatech's Product Browser application finally hit the press-release stage... It's been a long time coming - I feel like it's been a long hard-labor childbirth - a description that all mothers would (rightly) scoff at.

I think I've written about Product Browser before - it's a tool to help companies who are implementing the Autodesk Productstream data management tool provide a simple solution for navigating, searching, viewing and printing 3D models and drawings with "the Vault". It's particularly designed for the "downstream" people in a manufacturing organization - who are not CAD users. These are people that may not, in many cases know specific part numbers to lookup - so the application helps them graphically find what they're looking for.

If you're interested, you can see the press release here.
Our product web page is here, and we hope to have an eDemo posted in the near future.