by Dennis Collin
One of Revit’s strengths is its approach to data driven design and automated creation of schedules, which ensure consistency when issuing construction documentation.
Whilst Railing and Fence families can be scheduled per instance and certain parameters like manufacturer, length and family description and comments can be scheduled. Revit currently lacks a native ability to count what many to consider a vital part of any railing or system family. Namely the thing that holds it up or posts!
Fig 1. Revit needs a custom parameter to store the number of posts for railings.
There are several workarounds to this. Users can employ a formula that derives a post number parameter from the railing’s length value. However, this would not work for every railing type, and there might be the odd miscount of posts for bespoke modelling scenarios.
A better solution would be to derive a method of counting the post component themselves. A reasonable solution can be found by utilising Dynamo Scripting from within Revit. The script will prompt users to select individual or multiple railing families and their host family be it a slab, ramp or toposolid element etc. and convert the resultant geometry to solid elements.
Dynamo can then perform an intersection operation and count the number of intersections and then set that to a custom shared parameter for scheduling and data extraction purposes.
The limitation of the script is that it is not automatic and for an accurate count the script will need to be re-run when the model gets updated. Also, the script may crash or provide an incorrect result with very complex families, but for most of the railing or fence types in the standard library, and some example types from manufacturers, a correct post count result can be obtained, saving users from traditional methods of counting and the resultant errors and frustration that can occur!
Fig 2. Script creates a parameter to store the number of railing posts!
The first task the script performs is to create a project parameter called ‘No_of_posts’. This parameter is set to integer type and assigned to the railings category. If using the script on a ‘new’ project, it may be necessary to set the types to the appropriate values (Integer, and Construction) It is also possible to tell the script to access a shared parameter file using different nodes and provide options to label the railings using a suitable tag family.
Fig 3. Element selection, and the filtering out of unwanted components!
The main portion of the script involves selecting singular or multiple railing families and if appropriate, an appropriate hosting element such as a slab or toposolid element. If there is no slab type element, a post number will still be created from the solid elements converted from the post families.
For complex railings, such as exterior security fencing, a number generation node is used to allow for the provision of isolated concrete footings in addition to the posts. If no supports exist, then the node can either be omitted or left at a default value of 1.
To improve script performance times some, Dropitematindex and Getitemsatindex nodes are used to simplify the amount of items Dynamo needs to consider before converting to solid geometry elements.
Fig 4. Counting solid Intersections to establish a post count value.
This information is then processed in the final section of script, where the generated solids are counted to form post count number value. This value is then set via the Setparameterbyname node to the railing families. If applicable a divide node can adjust the post value number to allow for any additional supports required by the railing posts.
Fig 5. Using this script users can count the number of posts for railing and fencing families!
This post counting script should work for most railings that intersect slabs, ramps and toposolids. It will not work with railings that are just floating in space or hosted upon stairs. This could be addressed with an If condition node with a user controlled Boolean toggle.
Fig. 6. Final script executed from Dynamo Player, with the dialogue, properties, and railings post count!
For more information on Dynamo scripting within Revit click here:
Fig 7. A security fence family with the correct number of posts.
Dynamo Scripting, parameters and Revit work-around solutions are some of the topics covered on our follow-on Revit training courses. Visit the ARKANCE UK site to get an overview of the courses on offer and talk to one of the team for dates and availability or if you have more bespoke requirements, just ask, we are here to help!
In the next blog post we will describe a simpler method based on a formula.
Opmerkingen (0 opmerkingen)