Skip to main content

Posts

Showing posts with the label python

Does the parameter exist?

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...

Dynamo, Revit, Excel, UI...what a wonderful day!

Introduction Today I'll show you two examples of how to use Dynamo to export existing Revit schedules and how to compose a custom schedule on the fly, to be exported to Excel. Both of them with a very nice graphical user interface thanks to Data-Shapes (https://data-shapes.net/) package. Export Schedules Let's start from the easier. The idea behind this script is to export a list of existing schedules to an Excel file, creating for each schedule a separate tab. To be able to complete this script you'll need two packages: Data-Shapes for the graphical interfaces BimorphNodes to extract schedules data The script is very easy and you have to focus only on how to create an interface Then you can use your input to feed the next nodes. Finished! So just push the run button (or use Dynamo Player is you are in Revit 2017.1 or 2017.2) and enjoy the interface. Export parameters to Excel In the second script I'll focus on something more int...

Change fittings level and offset with Dynamo

This is and old story for Revit: when you try to change a level for a pipe, duct or cable tray, the offset of the element changes automatically to adapt to the new selection and the element doesn't move from his location but, when you try to do this with a fitting, this is another story. All the system connected to that fitting will move to a new location. Actually what happens is that the level is changing but the offset is still the same. Here a small script to prevent this. Is only for pipe fittings but you can easily adapt to other types of categories with the same issue ;) Download the  DYN  file for Dynamo 1.2.1 and enjoy!

WIP - How to keep linked schematic diagrams with 3D model

This is something I'm thinking since long time and finally I've some work in progress. The idea came from a very useful plugin I've in my army: Parameter linker from RF Tool (http://www.rushforthprojects.com/) Now with the power of Data-Shapes nodes, some Python and Dynamo player, is very easy to create user interfaces with inputs so, I prepared this small video with my WIP. As always when ready, I'll share scripts and tutorials! Cesare

Tunnel modeling with Dynamo

Introduction Last week I had a nice conversation with one of my Italian friends. The focus of the conversation was how to model a tunnel in Revit starting from an Excel list of points coming out from Civil 3D. So the answer was: Dynamo of course! First input, the section of the tunnel with his diameter; I can't share the details but lets say that we have: Theoretical excavation profile: 200 mm  Precast segment thickness: 500 mm Whit this two elements and the excel of the theoretical cent alignment, we can do everything! Revit profile family The first family we're going to create is a simple circle profile with a diameter parameter. This family will be as a mass category to be able to nest it later in an adaptive component family for the tunnel.  Just save this family...easy! Tunnel model Now we can create a new family as generic adaptive component and load the profile just created. It's important that the family is able to host rebars for future st...

Dynamo for design changes tracking

Just a simple workflow to compare two versions of the same model and understand what kind of changes we have: - New elements - Elements modified - Elements deleted With this release the script is only able to track where the change happened without any other detail but, I'm planning to make this more useful adding: - Type of change (geometry, paraemter, etc.) - Location of element deleted - Selection of categories to be added to the snapshot (using UI++) - Reports of changes Inspiration came from this post: http://www.martinportfolio.com/blog/2017/1/25/aec-technology-hackathon-2016 but, of course, I would like to create something completely inside Dynamo! For now just enjoy the idea! Cesare

Dynamo for Construction: 4D planning and site execution comparison

Hi everyone, in this post I'll try to explain a workflow to keep planning information updated within the model using Dynamo and an Excel Dashboard. The idea In Revit we have the possibility to create spaces/rooms (it depends if you're an Engineer or an Architect) and you can create schedule listing all the elements that are inside these enclosed areas. But what is you have an element like a duct that is running through multiple spaces?  First option you can split this exactly on the separation line but this is time consuming and even now, you won't be able to schedule the space information.  Second option is to split and manually apply a space share parameter: time consuming and not very useful.  So my idea is to maintain the duct as it is and use Dynamo to calculate the list of spaces and fill the shared parameter automatically. This is the script and, for now, I'm using the Mark parameter to fill this list of spaces but of course you will use a share p...