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...
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
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...
Happy New Year! I spent some time during the winter break working on CSV export of room boundaries for a Forge BIM surface classification tool. Ali Asad presented a new Visual Studio WPF MVVM Revit add-in template – Export room boundaries to CSV for Forge surface classification – Visual Studio WPF MVVM Revit add-in template...
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...
Let's tackle a 2D fire rating zone intersection task. Actually, it was originally raised a 3D intersection task. Reducing it to 2D makes it much more tractable – 3D solid extrusion creation and intersection task – 2D area intersection task – Jack's sample and description – Soffit subdivision sample code – Cleanup and GitHub repository...
Intersecting elements has always been a hot topic, cf. various previous discussions on 3D Booleans, cutting and joining elements; intersecting with elements in a linked file is even more challenging. Happily, the Revit API provides tools to support that as well – Intersecting linked elements with current project ones – Retrieving rebars intersecting a structural element...
I'll start this week with several solutions from the Revit API discussion forum and elsewhere, especially two different approaches to create rotated rebar stirrups – Embedded tooltip icon resource – Revit 2019 tooltip videos are MP4 – How to read and write bolt, plate and weld – Creating rotated rebar stirrups...
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...
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...
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...
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...
I am back from my July vacation. As planned, I visited the Buddhist monastery Plum Village near Bordeaux. Here are some personal notes from my experiences there, followed by a Revit API related issue that just cropped up – Plum Village and its visitors – Mindfulness and relaxation – My struggle with the smile – Mindful watering of seeds – Line intersection with topography surface...
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...
Today, we revisit the interesting and generic question on retrieving all exterior walls. That may be easy in a perfect and complete model. However, it raises some challenges in an incomplete BIM – Retrieving all exterior walls – Several possible approaches – Using a computational geometry approach – Manually adding the huge surrounding room – Encapsulate transactions and roll back instead of deleting – Determining model extents via wall bounding box – Implementing the huge surrounding room approach – Retrieving family instances satisfying a filter rule...
Today, we explore how to retrieve visible DWG geometry, i.e., geometry elements contained in a CAD import instance on a layer that is visible in the currently active view, and how to import an image to the foreground instead of the default background setting – Retrieve CAD import geometry on visible layer – Import image using foreground option...
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...
Александр Пекшев aka Modis @Pekshev submitted a very succinct and useful pull request for RevitLookup that I integrated right away, and provides many other valuable inputs as well – Snoop stable representation of References – Project point on plane correction – Revit export geometry to AutoCAD via XML – RevitExportGeometryToAutocad – Description – Versions – Using – Example...
Question: I am trying to create a swept blend geometry and assign it to a
The initial code threw an exception when calling the
How can I fix this?
Answer: The path parameters assume that they should be normalised or that the curve has a range of parameterisation from 0 to 1...
Revitalizer shared two important hints: a performance issue using
ElementTransformUtils and a problem reporting mechanism built into the
First, though, let's highlight an even more important upcoming event, the series of DevDays online webinars
– Register now for Autodesk DevDays online webinars
– Avoid using
ElementTransformUtils for batches
– Finding cause of
DirectShape generation problem...
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...
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...
I am attending the Forge DevCon conference in Darmstadt, Germany, right now, and putting the final touches to my presentation on Rational BIM programming using Revit and Forge at the European Autodesk University on Wednesday. We discussed several different approaches to retrieve the outer loop of a planar face. Richard Thomas recently shared a possible solution to determine the outer-most EdgeLoop. He now posted a new approach: I found a more straightforward and likely reliable way of getting outer loops of planar faces. This method also allows for faces made up of disjointed parts...
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...
A rather hard struggle led to a rather simple solution for determining the start and end points of dimension segments. In summary, the solution looks like this – A
Dimension element is either single- or multi-segment; these two cases need to be handled separately – In case of a single segment, the dimension element itself has a line, an origin and a value; the line is indeed the dimension line. However, it may be unbounded...
Here is a follow-up on the recent discussion on how to modify a grid curve end point using
In the Revit API discussion forum thread on off-axis grids causing warnings in Revit, an attempt to use the same approach fails. Instead, Fair59 presents a solution using
RotateElement to align an almost horizontal or almost vertical grid that is slightly off-axis...