Struggling trying to list stacked walls and their members with Revit? The answer is Dynamo and Python. Copy and paste this code into a Python node in Dynamo and you'll get as output the list of Stacked walls instances and all the related members. #################################################################### #Copyright 2017© #Twitter: @CesareCaoduro #Email: cesare.caoduro@gmail.com #################################################################### #Declaration section import sys pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib' sys.path.append(pyt_path) import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * import os clr.AddReference('RevitAPIUI') from Autodesk.Revit.UI import * clr.AddReference('RevitNodes') import Revit clr.ImportExtensions(Revit.Elements) clr.ImportExtensions(Revit.GeometryConversion) clr.AddReference('RevitServices') from RevitServices.Persiste
I'm back after a while with a new article on Dynamo. This time I'll try to explain how to check if a list of parameters are available in the project. This can be used as starting point to QA a model against a pre-defined template. The idea is pretty simple: we need to extract all the parameters from the model and to do this we list all the elements of type "ParameterElement". You'll get the list of both shared and project paraemters in this way. Then we can extract the paraemters names and create a list of paraemter that we want to check (this list can be also an input from Excel). Whit a simple Python script that compares all the parameters name, agains the list of predifined parameters, we can easily extract two lists: the first is the list of matched and the second is the list of unmatched. This is the python code. import clr clr. AddReference ('ProtoGeometry') from Autodesk.DesignScript.Geometry import * #The inputs to this node