(Part of the What’s New in the Revit 2010 API series)
Revit 2010 introduces a number of nice enhancements to Importing and Exporting in general – and best of all (for developers, at least) – all of the new capabilities are also available through the API.
The ADSK File Format
One of the new exciting capabilities in 2010 product line revolves around a new file format called an ADSK file (Autodesk Exchange File). This is essentially a zip file, but it contains all the geometry and data that are needed to support DIFFERENT intra-Autodesk software workflows (including, for example – Revit to Civil3D and Inventor to Revit).
The BuildingSite export gathers a wide variety of information useful primarily to Civil3D users, and puts it together in a package that’s easy to transfer.
The content includes:
- dwg files for the footprint, building shell, site plan and property lines.
- Data such as:
- Gross Building Area (based on a selected AreaPlan)
- Building Model data (doors, floors, roofs, etc)
- Project Information, including:
- Location information
- Building Type
- Total Occupancy
- Area per person
- Preview Images
All in all, the amount of XML data is significant in there – so I think we’re just hitting the highlights of what is potentially transferred here…
The API export gives a few options, and I think between what it picks up automatically from the model and what you can specify, you have access to pretty much everything.
Import from Inventor
Import from Inventor is another incredibly important workflow in the greater scheme of things – particularly for the MEP side of things. The ability for manufacturers to model their content in Inventor (with as much detail as they want) – but then to easily produce lower-detail models for use in Revit (including MEP connectors) – that’s powerful.
I haven’t gotten Inventor 2010 installed yet – so I haven’t tried out the export side. The import side seems to be pretty minimal (both in the UI and in code). But the capability is there.
(NOTE: I can’t recall if these are DWG or ACIS solids – but I’m pretty sure it’s not a “new” method of exchange – it’s a better-controlled, better-wrapped version, which includes additional properties and the MEP connectors – but the geometry is probably on the “heavy” side compared to native Revit).
Export to DGN
New with Revit 2010: export to Microstation DGN format. The export options include:
- Export Solids (ACIS or Polymesh)
- Layer Mapping (a layer setting or file)
- DGN Template File
This is equivalent to the new “Publish –> Share with Autodesk Seek” capability. The capability in the UI packages up a piece of content, along with XML to fully describe the types, the parameters, etc – all a part of the PartAtom specification used by Autodesk Seek.
The API version of this only produces the XML file – you’ll have to do the rest yourself. NOTE: This method, ExtractPartAtomFromFamilyFile is on the Application class (not the Document or Family class).
The GBXML export is much improved in the 2010 User Interface (shown below).
The most important new capability to note here is the “Export Complexity” option. This option will control how much detail is exported to the GBXML model from your Revit model – ranging from only the basics, to how “shading surfaces” are handled, to whether curtain wall mullions are counted as shading surfaces.
The capability for the API to export GBXML was introduced in the prior version – but this has been updated to include the all-important complexity option.
NOTE: This is technically not a change to the “Export” method for GBXML, but a change to the GBXMLparamElement which defines the export options.
This is a fascinating new addition to the Revit MEP package – the ability to read GBXML back into Revit. While I’m sure that there is probably more workflows that I haven’t quite grasped yet, just being able to use Revit as a GBXML viewer (or see what went out the door as GBXML) seems very useful.
The API exists for import, however, there are currently no options.
New DWF Export Options
The API has been restructured a little around DWF export – shaping up for more robust options in the future (for example, there’s now separate options classes for DWF2D, DWFX2D, DWF3D and DWFX3D) – although they’re mostly the same between DWF and DWFX at present.
In the 2D DWF/DWFx export, they’ve added support for controlling:
- Image Format (compression level)
- PaperFormat (size)
- Paper Orientation (portrait or layout)
These additions will help fine tune the DWFs you can create.
Most of the Export Options (DWF and FBX) also now include a “StopOnError” option, so that it won’t keep going if it runs into a problem… sounds like a good idea! :)
Many of the enhancements to import/export are driven by the core 2010 product enhancements. But it’s so nice to see that they’re investing in keeping the API up with what’s new, rather than lagging a year or more behind.