I need to come to terms with a split personality. Meanwhile, lots more going on in the Revit API discussion forum – Two Jeremys – Multiple collectors versus multiple filters – RevitLookup handles split region offsets – Python and Dynamo autotag without overlap – Custom errors and preventing changes – Ecological cost of crypto currency and art...
I played around a bit with the NavisWorks API and discovered a nice Revit project modification tracking tool in Dynamo – Filter for detail lines subcategory – Revit project modification tracking – Retrieving all NavisWorks model properties – Node.js best practices – Early history of programming and C...
I successfully made it from Switzerland to Paris and the Forge accelerator in spite of the French strikes. My only worry is how to get back again tomorrow. Again, the train I have booked has been cancelled. Meanwhile, let's take a look at – DA4R room support and new samples – Effective filtered element collection...
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...
Today I discuss (once again) an important performance aspect of Revit element filtering, a Python script for tagging JPEG images with EXIF data, prompted by a recent ski tour, and three other interesting topics that caught my eye – Slow, slower still and faster filtering – Python JPEG EXIT filename tagging – TED talks and population growth – Objective reality does not exist – Artificial intelligence judge...
I just discovered an interesting and not completely obvious aspect of using a filtered element collector in
the Revit API discussion forum thread on aborting a long running filtered element collector.
Question: I have really large models where I use an
ElementIntersectsElementFilter that can take a long time to process, and sometimes I want to abort it in a graceful way. Is this possible?
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...
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...
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...
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
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...
Konrads Samulis shared a very nice solution to retrieve the crop box for a given view using a highly efficient parameter filter in
his comment on rotating a plan view.
In digging up this old thread, I found something quite curious in the API in 18.1, that I'm not sure was there before.
The method of using a temporary transaction (with rollback) to find the element id of the crop box was taking a very long time on a large model, so I did a bit of digging to see how I could improve it.
I noticed that in the built-in parameter
ID_PARAM of the crop box contains the element id of the view it's in.
E.g., the crop box 'points' to the id of the view it is in using
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...
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...
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...
Minho re-opened the Revit API discussion forum thread on getting the ElementId of all visible entities in a viewport, providing a good opportunity to mention Colin Stark's answer to the StackOverflow thread on determining whether a FamilyInstance is visible in a View. Question: I am looking for code to get the ElementIds of all entities inside a viewport. A viewport is a region of a big view plan...
I implemented a neat new little sample add-in, RvtFader, that calculates and displays signal attenuation caused by distance and obstacles, specifically walls. It uses two very interesting pieces of Revit API functionality – AVF, the Analysis Visualisation Framework, for displaying graphical data in a transient manner directly in the BIM – The ReferenceIntersector ray tracing functionality to detect walls and other obstacles between two points. In the course of implementing the AVF part of things, I also resuscitated my trusty old RevitWebcam add-in – RevitWebcam – RvtFader – Task – Implementation – Further Reading...
I ran the first query on the collection of tbc blog posts imported into Elasticsearch to experiment for the question answering system Q4R4 Question Answering for Revit API and installed the elasticsearch-head web front end to better explore and understand my local Elasticsearch cluster – Elasticsearch text field mapping – Elasticsearch-head web front end – More RevitLookup updates – Get area scheme from an area...
A lot of interesting solutions were shared in the Revit API discussion forum and private email messages during my absence last week, and several exciting events are looming – Forge Accelerator in Gothenburg – AEC Hackathon in Munich – Autodesk University in London – Retrieve and map texture UV coordinates exporting geometry and material – Collect all rooms on a given level...
The topic of how to determine all views in which a given element is visible has been discussed several times on the past, and a couple of viable solutions have been suggested.
However, for large projects, performance becomes an issue.
This question was raised again by Abba Lustgarten and Erik Eriksson in the Revit API discussion forum thread on finding views in which an element is visible (by geometry or actual visibility), with Erik sharing a
View extension method
IntersectsBoundingBox that helps alleviate the performance impact...
I already created a starting point for the new roomedit3d incarnation last week, in its own repository. This week, I agreed with Philippe to retain the new project in an own branch within the Forge boilerplate code sample collection. Hopefully, that will simplify keeping my BIM sample synchronised with any future updates make to that. Now I need to get started implementing and testing the actual viewer extension functionality itself. My main topic today is something different and purely Revit API oriented, besides the next Forge session – Flipping a section view – Forge webinar series...
I am back from a very relaxing vacation. I did next to nothing, and that felt fine. Meanwhile, obviously, lots of important and exciting Forge community and Revit API related happenings
– PyRevit Blog
– Forge DevCon 2016 material and 2017 dates
– Forge forums closing in favour of StackOverflow
– Forge Accelerator in Munich
– Bounding Box
ExpandToContain Extension Methods
– Bounding Box and Lower Left Corner of Rooms
– Bounding Box of Selected Elements or Entire Model
– Setting 3D section box to selected elements' extents...
While preparing for the Forge DevCon in SF and the Athens Forge meetup and web server workshop at The Cube Athens, I also happened to hear about the solution to the question raised by Chema in the Revit API discussion forum thread on deleting an area in a drafting view – I need to delete some elements (detail items) in a given area of my drafting view...
I want to continue working on the TrackChangesCloud project asap. So far, it only consists of the Revit add-in to determine and list the changes made to the BIM. The interesting part will be to store the results in a cloud database for analysis and reporting. A prerequisite for that is a reliable way to identify Revit project documents. I already explored that topic when starting to implement the FireRatingCloud sample...
A couple of interesting Revit API issues were resolved during my recent absence. Let's start with this question raised by Miroslav Schonauer and resolved by Diane Christoforo: Using the terminology as shown in Schedules, I need to report all 'Not Placed', 'Redundant' and 'Not Enclosed' rooms...