AU 2022 classes are available online now, as well as a new Dynamo book and resources project.
I also present some ongoing nitty-gritty discussions on external events and
– Modern add-in deployment and testing
– Parametric curvature in families
– Awesome Dynamo online book project
– Launching command after closing form
– Chaining Idling events and other solutions...
Sooner or later, every serious Revit add-in developer will be scratching her head a bit over symbol versus instance geometry.
Here is a nice juicy challenge...
Wrap you head around this one in depth and future challenges in this area will seem trivial.
Retrieving references from symbol versus instance geometry when placing an instance on a line throws an
We recently shared a brief note on using the
BreakCurve API for splitting a pipe.
Matt Taylor now pointed out a much more comprehensive discussion asking, is there any API available to split a duct programmatically?
That is not just an example, but an entire tutorial, so I think it is very useful to share here as well for all to enjoy..
Here is a last-minute announcement that I will be attending the Swissbau Basel on Wednesday, a quick hint to answer a support case that just came in today, a forum thread issue, and a pointer to a drum solo – Attending Swissbau Basel on Wednesday – Comparing families using part atoms – Maximum area rectangle in polygon – Neil Peart drum solo...
Pieter Schipper worked hard at solving the task of swapping nested families using Python and Dynamo and very kindly shares his solution here with us today, including
his four Python scripts
– Task at hand
– Problems faced
– Solution and detailed implementation
– Collect all family instances in document
– Export families via
– Update Nested Family Definitions
– Reload updated families...
I completed the move to my new computer, and happily all systems go now.
Here are some other topics that came up in the past few days
– Revit-IFC Release 20.1.0
– Community discussion on Revit
– Solid or instance, depending
– Exporting parameters to Access
– Store globals on custom
– Iranian civil engineering project video...
I played around creating a new SectionCutGeo add-in to retrieve the geometry resulting from cutting a family instance in a section view. This was prompted the Revit API discussion forum thread on getting intersection lines from cut in section view – Intersection of section and family instance task – Solution options, geometry elements and view settings – Retrieving curves in the cut plane – Helper methods and external command mainline – Sample model and results – Caveat...
I am probably doomed to spend the rest of my life telling people not to unnecessarily apply
ToList to a filtered element collector.
It happened several times again today answering questions in the Revit API discussion forum
– Don't trust the family instance location point
– Searching by name for element type and text note type
– Searching using a negated category filter...
A demonstration of using the
NewSweep method was very kindly provided in yet another helpful answer by Frank @Fair59 Aarssen to the Revit API discussion forum thread on how to create a sweep with multiple closed loops in profile.
Let me also highlight an interesting TED talk on the topic of poverty versus universal basic income
– Creating a sweep with multiple closed loops
– Poverty versus universal basic income...
Inundated with interesting topics, let's skim a few topmost ones off
– Passing an add-in custom command line parameters
– Useful methods help verify a
Face is rectangular
– Automate complex family creation
– C++ code extracts 3D line segments from point cloud
– Big data visualisation and storytelling...
Today we discuss a couple of Dynamo considerations, Revit family and element fundamental concepts, and an exception handler required for a custom exporter
– Revit API versus Dynamo for Revit
– Dynamo 2.0.X versus 1.3.3
– Difference between
– Custom exporter
Execute may throw
– Turned on Git LFS...
One of the most exciting Revit related topics at Autodesk University is the expansion of the Forge Design Automation API to include support for Revit families and models in RFA and RVT files, aka Design Automation for Revit or DA4R – Design Automation for Revit Public Beta – FDC226894 – DA4R at DevCon at AU Las Vegas – AS226079 – Manage Revit Digital Content using DA4R – What is Forge Design Automation for Revit (Revit.io)? – Revit.io Model – Terminology – Why Revit.io? – Cloud based content management with automated client requirements and standardization – Generating native project templates through Revit I/O on the cloud – Creating Templates – Learn how to link to Forge for Real-Time query and visualization – Learn how to manipulate and manage content in the cloud...
The Forge accelerator in Rome is winding down with the demonstrations of what was achieved being recorded as I write. An interesting conversation I had at the celebratory dinner last night gave me an idea for a solution to a longstanding question on family tampering protection – Roma accelerator group photo – Protecting a family from tampering – Implementing a canonical key for geometrical objects...
We already looked at deleting unnamed non-hosting reference planes back in 2012 and 2014.
Some things have changed since then, and the old code requires fixing and updating.
Other interesting topics also want to be mentioned
– Embodyment workshop
– Bös Fulen mountain hike
ReferenceIntersector to place lighting fixture on ceiling face
– Reformat stable representation string for dimensioning
– Deleting unnamed non-hosting reference planes updated...
José Alberto Torres Jaraute implemented an add-in tool to protect the intellectual property built into a complex hierarchy of nested family instances by replacing them with a flatter and simpler hierarchy, yet retaining all the relevant non-confidential custom data. Basically, his tool also enables location of overlapping elements and duplicates elimination. In the course of this work, Alberto raised a number of questions in the Revit API discussion forum – Explode nested families – Insert a curve-based family instance associated to a face – Explode family instance to get all the components of a family in project – Change the host and work plane of a family...
An interesting question was raised on renaming a family after it has been loaded into a project, which throws some light on the underlying relationship between the family name and the
Before that, we revisit the eternal topic of getting started with the Revit API, and what to do to prepare for it before actually touching Revit at all.
Afterwards, and similarly, we pick up a good suggestion or two on planning and preparing your extensible storage schema for future version handling
– Before getting started
– Renaming a family in a project
– Extensible storage – versioning best practices...
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...
Questions on how to use
NewFamilySymbolProfile have come up a couple of times in the Revit API discussion forum.
The short answer is: retrieve the family symbol from the profile family, then call the creation application
I implemented a new sample add-in for you to demonstrate the steps using the Profiles_L-Angles.rfa profile family...
I'll begin the new year by discussing a bunch of topics addressing various aspects of
– Updated DirectShapeFromFace
– Improve loft form creation speed using
DirectShape instead of conceptual mass
– Create surface from face
DirectShape from solid
DirectShape colour and material
– Improve family performance suppressing
DirectShape from room...
Alexander Ignatovich shares an exceedingly elegant solution for automatic wall creation, illustrating a number of important concepts and implementing the following functionality very succinctly indeed
– Retrieve all the
cube family instances
– Retrieve their
height parameter value
– Retrieve their solids making use of the .NET
– Extract their horizontal outline contours using an
– Create walls along each contour curve segment
– Place a door family instance at the midpoint of each wall...
Alexander Ignatovich answered several interesting questions in the Revit API discussion forum
ExtentElem and duplicating legend components
– Obtaining generic model square face references for dimensioning
– Preparing family with reference planes for dimensioning
– Creating a line perpendicular to another...
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...
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...
Here is another Revit 2018 API enhancement that is obviously worth highlighting, since it immediately answers the question on getting a specific reference from a family instance raised in the Revit API discussion forum: Is it possible to get a named reference plane from a family without going into the family editor API? For example, I would like to have users be able to name a reference plane 'my arbitrary location' when they are creating a family...
In Revit 2018, cancelling family instance placement during a call to
PromptForFamilyInstancePlacement throws an
– Easily fixed, once discovered
– Change in Behaviour
– Exceptions Should be Exceptional
– The Building Coder samples
I completed a first revision of the ForgeFader project, bringing it up to par with RvtFader. It is pretty cool seeing the same functionality implemented in two such different ways, on completely different platforms, using different tools. Alan Seidel shared another exciting Revit add-in. First and not least, another exciting topic for me personally is switching to half-time work – Work half – AKS Opener – Video – GitHub repository – Why? – Specific interest – RvtFader – ForgeFader...
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...
I am traveling to Gothenburg for the Forge accelerator. Meanwhile, Allan Seidel shared his WTA FireP 3D Aimer add-in that creates a custom ribbon tab with discipline related tools for placing specific Revit family types with some families requiring parameter settings made on the fly and the 3D Aimer example that "aims" a special Revit family to a target – WTA FireP 3D Aimer Tools – GitHub Repository and YouTube Video – Source Code Documentation – WTA Elec – Another Family Plunk and Concept Share...
I briefly mentioned the AEC Hackathon in Munich yesterday. Here is some more information on that, highlighting the exciting speaker line-up and target topics, plus a solution for determining the bounding box of an entire family – AEC Hackathon Munich Topics and Speakers – Family bounding box – Continuous integration for RevitLookup?
I am away on vacation. In the meantime, Roman Lavrov shared his Revit Family Browser, saying: I am working on family browser for Revit using Revit API and WPF. Your blog helps me a lot, so I decide to share my work with you. I think, some ideas will be useful for other coders. If you have time, please take a look my program on GitHub at github.com/RomanLavrov/RevitFamilyBrowser...