Jeremy Tammik blogging on the Revit API

Links

February 01, 2019

I am working on extracting room and zone information from IFC files, both geometry and relationships, specifically room and zone boundaries and containment.
My new IfcSpaceZoneBoundaries add-in project retrieves this information, exports it to CSV and demonstrates a host of other important aspects
– What happens on linking in an IFC file?
– Read user configuration input settings from a file
– Log messages, warnings and errors to an output file
– Read the IFC properties stored as shared parameters
– Extract the horizontal boundary information from a DirectShape element
– Export the relevant data to CSV
– Programmatically link in an IFC file into a Revit RVT project
– Retrieve all currently linked-in IFC files from the Revit application...
Read more →

January 15, 2019

Today, I present a little exploration of how to access zones defined in an IFC file in Revit.
If you are following this blog closely, you might guess that this is related to the room boundary CSV exporter project that I recently discussed.
For this exploration, I installed and used RevitPythonShell.
Here are the detailed steps
– Importing IFC zones into Revit
– Installing and using RevitPythonShell
– Programmatically accessing IFC zones in Revit...
Read more →

July 07, 2015

Quite a while ago, we had a Revit API discussion forum thread on the use of the ReferenceIntersector in linked files. Apparently, some restrictions on that have been removed in Revit 2016. Before getting to that, let me mention that I have been very busy in the past few days in the Revit API discussion forum, answering various cases, and on The 3D Web Coder, implementing a cloud-based enhancement for the FireRating Revit SDK sample. Steps Towards a Cloud-Based FireRating...
Read more →

December 17, 2014

Today we are holding the last Western European DevDays conference in Milano before the winter break. The Milano meetups last night met with great interest and enthusiasm, so I will probably be returning here next year to present and conduct workshops on the Autodesk View and Data API in more depth. Right now, we are in the middle of Jim's morning session: Independently of that, here are a few other miscellaneous topics that cropped up in the past few days:...
Read more →

September 04, 2014

The Revit database contains a number of undocumented relationships, and it can be challenging and useful to discover them. Christian Tonn of kubit presents a powerful method to determine and maintain such a relationship using an officially supported approach instead: Question: Is it possible to get the ImageType object from an image you inserted in the Revit document with Document.Import? Answer: Not directly! I am using the Import method: bool Import( string file, ImageImportOptions options, View view, out Element element);...
Read more →

July 21, 2014

The Revit 2014 API introduced a whole bunch of linked RVT document interaction enhancements: Identifying links Obtaining linked documents Link creation Link load and unload Link path type Conversion of geometric references Room tag creation from linked rooms Picking in links They all provide important and useful functionality. Let's take a look at one of them in particular as well as another issue that just cropped up: Conversion of a geometric reference in a linked RVT model Triggering a dynamic...
Read more →

June 05, 2014

Yesterday was the first day of the Autodesk internal Technical Summit in Toronto, and pretty exciting. Also, I just had a note from Norway on how to remove references that looks worthwhile sharing. So here is a list of today's multifaceted topics: Recent rendering research JavaScript optimisation Spherical harmonics Web app packages Removing RVT links Technical Summit Day 1 This being an internal meeting, I cannot talk openly about all the topics covered. A couple of titbits that I found...
Read more →

November 06, 2013

It is getting rather cold and wet and dreary outside now, so I spent some time answering the following excellently documented developer query on relating the coordinates of a linked file with its host. Just as I was about to publish it, Kon raised the very same issue in a comment on the recent discussion on accessing individual elements in linked projects: "When I try to relate the 'internal' XYZ LocationPoint of the linked document to the main model, they...
Read more →

September 09, 2013

Access to individual elements in linked projects is a relatively simple matter, but can still cause some confusion, as we can see below. We looked at various aspects of linking files and accessing the linked element data and geometry in the past, e.g. Linked files Hiding linked files List linked elements Access to linked file geometry List linked files and TransmissionData Linked element geometry access Selecting a face in a linked file Arnošt Löbel's AU 2012 class CP3455 on managing...
Read more →

August 12, 2013

Before entering this wonderful new week, I have some unfinished business left over from the last one. Last week I returned from a short holiday and was inundated with developer cases, some of which I would still like to report on, or the results will presumably be lost forever, or at least until the next person runs into the same issue. I hope to prevent this here and now before starting with anything new. Let us therefore take a quick...
Read more →

December 19, 2012

I have not posted anything since last Friday, being too caught up in the West European Developer days and travelling. Today and tomorrow we spend in Gothenburg on the last lap of our journey, after Paris, Milano, Farnborough and Munich. I had a nap in the taxis to and from the airport yesterday, both in Germany and Sweden, so I was able to burn some midnight oil to share the following exploration with you. One of the many interesting conversations...
Read more →

December 04, 2012

Advent, advent! Yet another Revit API focused blog is born! Harry Mattison, ex Revit API development team, has initiated Boost Your BIM and kicked it off with a series on using the built-in SharpDevelop development environment Revit macros to resolve duplicate tags: Finding elements Finding only family instances Get & set parameter values Transactions and wrapping up Thank you, Harry, and the best of luck to you and your new blog! Dances with Elephants Also, for a more high-level strategic...
Read more →

November 29, 2012

Wednesday was my first normal and full AU day, after completing the developer conference and DevLab activities. I was able to attend two interesting classes held by Revit API developers Steven Mycynek and Arnošt Löbel, and present my own Revit MEP API one. Here they are in chronological order: CP3133 Using the Revit Schedule and View APIs by Steven Mycynek CP4108 Revit MEP Programming: All Systems Go by Jeremy Tammik CP3455 Managing Revit Links with the Revit API by Arnošt...
Read more →

May 16, 2012

Here is a chance to look at an interesting method that we never discussed yet, ConvertToStableRepresentation, and the hidden information that it provides access to. It does what it says, converting a Reference to a stable string representation. Reference and Stable Representation A reference provides a possibility to identify a piece of geometry, even though geometry is transient, not persistent, memory only, generated on the fly. Still, we sometimes need to identify a piece of it and remember which piece...
Read more →

March 05, 2012

I spent this weekend in Chamonix with my brother Nick. We did one day of rock climbing in the valley at Les Gaillants and Servoz doing Surbac a' Bras, 6a+, and one day of skiing with Chris down the Vallee Blanche, Mer de Glace and Montenvers from the Telepherique de l'Aiguille du Midi. Our route from the telepherique actually joins the Vallee Blanche via the steep looking descent at the extreme right of this picture, with a sharp ridge crossing...
Read more →

January 20, 2012

Here is a note on how to retrieve approximate straight line segments for the analytical model of curved structural elements, and on a free Revit Structural link tool to the Computers and Structures, Inc. (CSI) ETABS building analysis and design environment. A couple of weeks ago Nasser emailed me about a method he was trying to use for his Revit Structure link add-in. He was trying to export floor elements with curved edges to the structural analysis software ETABS. Like...
Read more →

October 03, 2011

I presented a sample to using the TransmissionData class to list linked files, and Mike Caruso submitted a comment asking how to use it to set a new path on a RVT file. Furthermore, Guming recently asked how to make use of the ExternalFileReference class. Here is a sample answering both of these questions: Question: Can you demonstrate how I would load, unload and make changes to the path of linked Revit files? Answer: Loading, unloading and editing path to...
Read more →

September 29, 2011

Have you ever looked at the Spiderinnet? Neither had I, until now, but the intro sounds really promising, and the list of articles is very impressive: This blog focuses on Revit Addin Wizards, Coders, and API Widgets. Coding languages exercised in the various Wizards/Coders/Widgets include but are not limited to C#, VB.NET and C++/Managed C++/CLI. Different Revit versions, flavors (Revit Architecture, Revit Structure and Revit MEP) and bitnesses (x86 or x64), different Visual Studio versions such as 2008 and 2010...
Read more →

September 14, 2011

Developers occasionally ask about programmatic access to the 'Transfer Project Standards' user interface functionality. Unfortunately, that is currently not provided by the Revit API. However, it is possible to implement a workaround, although it would require quite a bit of work and testing to ensure that it fulfils your needs, as the following sample by Joe Ye shows: Question: Is it possible through the 2012 Revit API to transfer project standards and or system families between Revit projects? For example,...
Read more →

August 11, 2011

I still keep discovering functionality in Revit 2012 API that I have not yet discussed here, such as the following important enhancement: Previous versions of the Revit API failed to retrieve polyline data from imported DWG files. The polylines were represented by an internal Revit class which was not exposed through the API, so the geometry retrieval simply ignored these objects. Happily, that changed in the Revit 2012 API with the introduction of the PolyLine class. As stated by the...
Read more →