I avoid answering non-confidential questions in private, as I tell everyone who tries to do so.
However, some non-confidential queries still come in via ADN.
Here are two that came in today that might be of general interest and therefore seem worth sharing
– Batch processing Revit families and documents
AsValueString results differ...
We have looked at numerous different approaches to determine wall openings in the past, so it seems pretty hard to nail down, and pretty important to solve.
Now Håvard Leding of Symetri contributed yet another exciting idea which highlights a number of surprising aspects,
demonstrates a further creative use case for
GetDependentElements and expands on his
recent RevitLookup enhancement to retrieve and snoop dependent elements
– Get demolished solid
I recently implemented the IfcSpaceZoneBoundaries add-in to link in and analyse IFC file zones and spaces, then prepared it for use in Forge Design Automation. Now I want to add level information to the CSV export. However, the
DirectShape elements created to represent the rooms and zones have no valid level assigned, so their
Level property is invalid.
Happily, we can easily analyse the BIM and generate the equivalent information ourselves
– Retrieve levels sorted by elevation
– Determine level from element elevation
– Carl Bass and Zoox autonomous vehicles
– Physical reasons to be happy to be alive...
Håvard Leding explores relationships between stable reference of main elements and their sub-elements, related to the intriguing undocumented
ElementId relationships and stable representation magic voodoo.
We need to access the sketch association to the element being sketched.
I printed out stable references for 3 floors, and also the references for each
ModelLine in their 3
Let's highlight a nice interactive didactical Python-based Revit API learning challenge on how to get the bounding box from a Revit element and determine its centre – Cyril's Python HVAC blog – Rotating elements around their centre in Python – Retrieve element and bounding box from picked reference – Use location point instead of bounding box centre – Final working solution...
A solution to a longstanding question on the view template 'include' setting
– Does the Revit API provide any access to the view template 'include' settings defined by the check boxes in this form?
– I can get the 'includes' via
The method returns a list of parameter ids, and you can then use
viewTemplate.Parameters to map them...
I have a whole bunch of exciting overdue topics lined up. Let's start with these – Tailor Your BIM sums room areas with F# – Control view for design option elements with F# – Copy legend view and component from background file – Forge RVT to IFC translation defaults to 2x3 – Latitude and longitude in Revit IFC export – Takeoff creation requires branch duct...
Still at the Forge Accelerator in Rome and looking further into
the Forge Design Automation API for Revit.
Althpough it is not yet available or documented, you can still start preparing your add-in for the day when it comes
– Aspects to consider
– Accessing the Revit
– DB application add-in manifest
– Next steps...
My colleague Zhong John Wu just solved a Revit API discussion forum issue on how to create dimension line for rebar. I took this as a prompt to clean out a bunch of other dimensioning related issues lurking in my infinite and growing to-do list – Create dimension line for rebar – Newly created dimensioning not displayed – Dimension leader remains visible after removal – Dimension wall centreline, centre and faces of core – Grid references for dimensioning...
Some happy news about two new Revit API supporter colleagues, Naveen Kumar and Zhong Wu. They already reached second and third place in the list of top solution providers. Here is also a very relevant recent case handled by Zhong – Top solution authors – Naveen on Naveen – Zhong shifts to AEC – Zhong on Zhong – Deleting a non-shared project parameter...
I am back from a multi-day hike of about 70 km along the Swedish Sörmlandsleden wilderness trail. In the meantime, lots of noteworthy things happened – Revit 2019.1 update and features – Revit Add-Ins using the CEFsharp library – BIM 360 Issues API – Forge Accelerator in Rome and elsewhere – Looking for a Forge development partner – New way to retrieve a parameter id...
I returned from my time off in July. I dived in deep into the Revit API again to resolve an issue retrieving wall profile curves. Here are some other noteworthy items to keep company with my debugging report – CmdWallProfile update – Access to the IUpdater original value – Getting element dimensions from IFC files – Creative workaround to rotate elevation marker in chunks...
Here comes another solution for efficiently compiling add-ins for multiple Revit version targets from one single code base, a note on resources for CAD term databases for consistent terminology translation, and a discussion on accessing custom texture maps in Forge and Revit
– Multi-targeting Revit versions using
– Further enhancement using the
– CAD terminology resources for consistent translation
– Showing a custom Revit texture map in the Forge Viewer...
I am attending the BAM Digital Construction Live event in the UK and presenting on Forge for that domain. Today, I'll share my slide deck from this event and welcome my colleague Xiaodong answering his first Revit API cases – Forge for Digital Construction – Welcome Xiaodong and invoking the Draw Model Line command...
I am participating in a Digital Construction Live event in the UK next week and presenting there on Forge for the BIM domain. Today, let's focus on the real message and some live samples putting it to use: – The real message – BIM collaboration roles and magnitudes – Forge for AEC Sample Live – Connecting Forge with BIM360 Sample...
I am busy in the Revit API discussion forum.
However, you can check the discussions there yourself.
Here and now, I'll mention some different topics – oops, one of them is from there after all
– RST and the Structural Analysis SDK
– Determining the path of a recently exported file
– Driving NavisWorks programmatically via
– The Autodesk assistant Ava and the uncanny valley...
How to export all the Revit data to an external database?
It is very simple to extract all the parameter data.
Let's implement a solution to do so
– Existing sample implementations
– Black box input
– Choices for the output and its structure
– Retrieve parameter values from an element
– FilterCategoryRule versus category filters
– Category description extension method
– Retrieve parameter data for all elements of given categories
– External command
– Sample run results
A discussion with Håvard Dagsvik on the use of
TransmissionData, standalone access to the
BasicFileInfo without the need for a valid Revit API context, and a Revit-independent method replacing
– No document required for
TransmissionData requires a valid Revit API context
GetFamilyXmlData method replacing
– Windows explorer
BasicFileInfo right click utility...
Several questions on filtering for intersecting elements came up recently. It is pretty easy as long as a bounding box can be used. However, the bounding box is generally aligned with the cardinal X, Y and Z axes. If the containing volume of interest is not, too many elements may be selected – Family instances in a diagonal room – Conduits intersecting a junction box – Generate 2D arc from radius, start and end points...
An add-in will often need to retrieve the elements that it just created for further processing. Frequently, the Revit API method used to create them will return their element ids. Sometimes, that is not the case. Now this topic arose again in a couple of cases and brought some other aspects to mind – Using the element lister – Consecutive element ids – Retrieving recently added elements – AEC job openings in Munich and elsewhere...
Is there a way to return failure information to your main command when creating a transaction?
My program does some error logging and creates an error report at the end, and I'd like to include some information from specific types of Revit failures (i.e., include if multiple instances were created in the same place).
Yes, you can use the
PreprocessFailures method argument
failuresAccessor to review and store failure message information for later use...
Two recent Revit MEP related cases brought up some new information on the pipe
K factor table and custom calculations for pipe fittings, the Forge DevCon class recordings are now available, and I discovered Konrad Sobon's wonderful archi+lab Revit API blog, which helps resolve an installation and setup issue
K factor table
K factor calculation for pipe fittings
– Dynamo code to change loss coefficient
– Forge DevCon 2017 class recordings
– Revit add-in installer and buttons...
A quick geometrical question on retrieving geometry from a basic wall being used as a panel in a curtain wall.
I am struggling to retrieve the geometry data from a curtain wall that contains a Basic wall in one of the curtain wall panels. My example curtain wall has two panels. With one of the panels, a basic wall type is associated. I need to get the geometry data (i.e., the faces) for the entire curtain wall. When I reach the second panel in my code, the
SymbolGeometry contains zero objects, so my code cannot retrieve any geometry for it...
Here is an official answer from the Revit development team on the long-standing and recurrent issue on retrieving the path to a specific material texture bitmap file
– Question: I am working on an exporter plugin for Revit that exports all geometry from selected objects using the
When extracting object materials, I can successfully get most of the information, but I can't seem to find the path to the material texture
A biggish post rather late in the week... still answering too many cases – Forge for AEC demos and sample code – Determining the starting view – Detecting installed Revit version – Detecting installed C3D version – Moving items inside a detail group – Filtering for family instances and types by family name...
Forge versus Revit programming – Access Revit BIM data and element ids from BIM360 – Unique IDs for Forge viewer elements – Edit and export Revit properties in Forge – Upcoming Forge accelerators – Updated Visual Studio Revit add-in wizard installation – Question on RevitLookup installation – RevitLookup cannot snoop everything...
Depending on circumstances, interactively picked family instance geometry may be returned in the global Revit world coordinate system WCS, or in the family instance definition local coordinate system LCS. A family instance may have its own non-empty solid, or use the symbol geometry. The symbol geometry requires keeping track of the instance transform to map it to the actual instance project location – Question on Incorrect Face Normal – Working Plane has no Effect – Non-Picked Face Normals are Correct – Solution – Detecting When to Use LCS versus WCS – Retrieval of Picked Geometry Face from Instance is Untransformed...
Here is another brilliant and super succinct solution provided by Fair59, answering the Revit API discussion forum thread on how to get cutting void instances in the floor using the
FindInserts method – Question: I have a floor on which a family instance is inserted on the face of the floor (the instance host is also the floor). I checked in the family the "Cut with Void When Loaded" parameter, so that the void is created in the floor. Now, I want to retrieve all the instances that create voids in the floor...