November 28, 2017

The Revit API discussion forum continues to reach ever new levels of depth and coverage.
Here are a couple of recent topics
– Welcome to the top solution authors, Jim!
– Setting a parameter to regenerate the model
– Checking model for C4R versus local file...
Read more →

March 31, 2017

Today is the last day of the Forge accelerator, and I am still working on the ForgeFader project.
The topics today are mainly related to Revit, though
– Google prettifier on GitHub
– WTA mechanical family placement add-in
– Provision for void
– What is a provision for void?
– Creating a provision for void...
Read more →

December 09, 2016

A Python Revit API question on renumbering viewports helps highlight two separate important programming aspects; I also add some other notes from the Munich Forge accelerator
– Question
– The need to regenerate
– Use built-in parameters to access parameters
– Forge accelerator and outage report
– Added materials to 210 King model...
Read more →

October 06, 2016

Lots of exciting news for today, like every day, once again on the pure Revit API, connecting the desktop and the cloud, and Autodesk Forge
– Isolating an element in a newly created view requires two transactions
– Forge research enquiry
– Connecting desktop and cloud – Roomedit3dv3 live
– Could you demo this remotely?
– Connecting desktop and cloud draft handout
– Table of contents...
Read more →

May 20, 2016

Thank you for your questions during the Autodesk answer day. I am still busy supporting the Barcelona Forge Accelerator participants in the Autodesk office. I am also working on a very exciting new project connecting BIM and the cloud using a direct socket.io connection to communicate changes back to the desktop, instead of the inefficient polling mechanism I implemented in previous projects. Once again, it consists of two parts, the node.js web server and View and Data API handler and the C# .NET Revit API add-in client
– Revit Idea Station
– TextNote Bounding Box Requires Regen
– Regeneration Performance Benchmark...
Read more →

January 12, 2016

Today we have two ever-recurring topics to revisit: a discussion on how to react to a document modification and yet another example of the need for regeneration
– Idling and external events, DMU and DocumentChanged
– Need for regen in an updater...
Read more →

November 18, 2015

I am still working on my Autodesk University preparations, and, as always, lots of Revit API cases, both from ADN and Revit discussion forum threads. Let's look at the current state of affairs regarding AU, DevDays, and two of those threads
– AU 2015 – Connecting Desktop and Cloud for AEC
– Regeneration invalidates all geometry
– Autodesk DevDays 2015 and Cloud Accelerator Week...
Read more →

November 11, 2014

Let me address two questions concerning form generation in family documents raised by Alex Hearn: Rotation by π NewSweptBlend using arcs Among other things, the answers also demonstrate some trivial migration steps of the form generation code from Revit 2012 to 2015 and, yet again, the occasional crucial importance of regeneration. Rotation by π Question: I am exploring and really enjoying your blog site. Thanks for all the detailed information. I have been attempting to build a Revit translator that...
Read more →

August 12, 2014

Here is an interesting case with a simple solution that was rather hard to discover. In summary, you need to ensure that all family symbols are activated before making use of them. Question: I'm having a strange problem when replacing curtain walls by windows in Revit 2014. When I run my add-in command, all the curtain walls are successfully replaced by the window family instances. All except the first also cut the hosting wall in the proper manner. The first...
Read more →

June 26, 2014

I talked about how to refresh element graphics display back in 2011, and it seems like the time has come to revisit that topic. After that, I also want to mention an approach to determine the height of a schedule in a sheet and how to avoid running a web server. Refresh Element Graphics Display Afshin just submitted a comment about this on replacing an Idling event handler by an external event, and another developer asked something similar today, so...
Read more →

April 10, 2014

We looked at a nice example of using Boolean operations and InstanceVoidCutUtils back in the year 2011, cutting out part of a beam using a void cutter family. I tried to make use of this again in a recent Revit API training and was somewhat shocked to discover that it did not work as expected. I checked all the prerequisites were fulfilled. Void Cutter Family First of all, the void cutter family must have its 'Cut with Voids When Loaded'...
Read more →

November 25, 2013

Here is a query and resolution raised by Marc in the discussion forum on erasing extensible storage data with linked files, followed by a reminder of the need to regenerate the model to avoid accessing stale data and hint of possible things to come related to Revit and cloud computing: Erasing Extensible Storage Data with Linked Files Question: I am calling the method Schema.EraseSchemaAndAllEntities in a project containing linked documents, and it is throwing an InternalException. How can this be...
Read more →

December 03, 2012

Whenever your add-in modifies the model in any way and you wish to query the Revit database, you need to pay careful attention to ensure that you do not retrieve stale or invalid data. If anything unexpected whatsoever happens, one of the first things to consider is the possible need for a document regeneration or additional separate transactions between steps. These kinds of issues arise frequently. I discussed adding an extra transaction to modify beam parameters and add openings to...
Read more →

September 05, 2012

Today, exceptionally, a second post, partly to highlight an interesting comment submitted by Jinshou on how to programmatically trigger a refresh of the Revit element properties window, and partly to announce a non-API issue, totally non-API, the imminent arrival of Autodesk Revit LT. Refreshing Revit Element Properties If I first invoke the UIApplication OpenAndActivateDocument method, then highlight elements as described in a previous post, the 'properties' window is updated. The trick is that in order to call OpenAndActivateDocument on the...
Read more →

July 13, 2012

Here is a question that we have looked at in the distant past, brought up again and reinforced by Jon Mirtschin of Geometry Gym, working on BIM and model exchange with Rhino, Grasshopper et al: Question: Sorry to bother you, but trying to get a quick answer to this problem. If you happen to have 5 minutes to help, it will be greatly appreciated. I've attached a sample Revit project. It simply creates a polyline curve array and slab outline,...
Read more →

April 18, 2012

Arnošt Löbel added an important comment on the sample code that I published for refreshing a view: It is for the best if all transaction objects are always properly scoped, e.g. within a C# 'using' block. This includes transactions, sub-transactions, transaction groups, and other scope-like objects such as StairsEditScope. Not doing so can yield some pretty weird situations when exceptions come into play. In your example, proper scoping can be implemented by adding 'using' statements, which automatically dispose of the...
Read more →

April 11, 2012

Welcome back from the Easter break, if you had one. We are pretty busy right now preparing for our next conference, the DevCamps. Ah yes, and before that I have to get ready for the Revit API Training in Munich coming up soon. AEC DevCamp and DevLab – Join us at Camp this Summer! The bi-annual Autodesk AEC DevCamp is taking place near Boston on June 6-7. DevCamps are held every other year where software developers like you can learn...
Read more →

July 06, 2011

Here is a little issue with an interesting workaround that I encountered in the past in similar incarnations in other CAD software packages besides Revit, so it is worthwhile making a note of this for potential future use almost anywhere. The issue has to do with refreshing the graphics display of individual elements in the Revit user interface. Committing the transaction, explicit regeneration, and even calling RefreshActiveView does not help. One additional thing that sometimes does help in similar situations...
Read more →

April 20, 2011

This is the third migration of the The Building Coder samples, after moving from Revit 2009 to Revit 2010 and then to Revit 2011. The move from 2010 to 2011 was a tougher round with many changes. This time around, from 2011 to 2012, it is quite easy and straightforward again. For details on what needs modifying, as always, please refer to the Revit 2012 SDK documentation and especially the chapter 'What's New' in the Revit 2012 API help file...
Read more →

January 19, 2011

Whenever you have a problem modifying or querying the model with your Revit plug-in, one of the first things to check is always your regeneration mode. If you are using the manual regeneration option, you need to check whether you possibly omitted a required intermediate regeneration call. It seems that there can never be enough reminders of this. Here is another case at hand: Question: I am sizing rectangular duct fittings through the API, and I noticed that the different...
Read more →

November 10, 2010

I presented a general introduction to the topic of regeneration in the discussion of my first Revit 2011 add-in, the pipe to conduit converter, and in Kevin Vandecar's performance tips and tricks. We discussed the danger of lacking regeneration calls, best regen practices and some performance issues quite a while ago, and an example of problems resulting from accessing stale data in the location curve of a newly inserted family instance. Here is another interesting and very clear little example...
Read more →