Sunday 14 February 2016

Revit Circuit Tag Customisation

I had a request the other day from one of my electrical colleagues to help out with a Revit Circuit tag problem. They wanted on their project to reverse the order of the Phase and Way in the tag to comply with the industry standard in the UK.

The Revit standard circuit tag we are using is formatted Panel Name / Circuit, with Circuit being (Phase/Way). The industry standard for circuit tagging in the UK is however Panel Name / Way / Phase. From what I can tell there is no way of customising this directly into Revit. After a bit of research online I've found that this problem came up quite a few times on forums, with no particular fix however. 

To work around it I assigned two shared parameters to the Wires category in Project Parameters. These two parameters would then allow me to modify the circuit tag with the format I needed. 

Revit Wire Properties
However this workaround would require someone to manually populate the newly created Phase and Way parameters. One quicker way of doing this would be to export the circuit parameters into an excel file and manipulate the data there. Even though this would be slightly faster, it would still be quite a time consuming workflow by introducing excel into the scheme. Whenever possible I try to avoid data manipulation in excel if it can be avoided. 

The task seemed perfect for Dynamo and a good opportunity for me to put my limited Python knowledge to use. 
Dynamo Diagram
Python - Circuit Phase data extraction

Python - Circuit Way data extraction
The Dynamo diagram would read all the Wire Circuits Parameter values in the model and then using the Python script it would break the data into two. In my case I had L2/1, L2 being the phase and 1 being the Way. The new data would then be pushed back to Revit and the newly created parameters (Phase and Way) would be populated based on the Circuit data. 

Last step of the exercise was to modify the Revit Wire Tag Family to work with the newly created parameters.
Revit Wire Tag Family - Edit Label window


Sunday 7 February 2016

D-day is here

I started this blog as a personal archive of thoughts on BIM for MEP, Dynamo for Revit as well as to keep a record of my progress with learning Python and Dynamo for MEP design.

I initially started collecting this kind of information using oneNote, however everything has become very hard to manage. The idea of using a blog for tracking my Pyton/Dynamo learning curve as well as storing other useful information related to BIM came from listening to episode two of CodingNewbie. In this episode Brian Douglas talks about his experience with learning Ruby and the steps he took from being a complete newbie to a professional programmer.

I am a mechanical engineer at Arup. I was first introduced to Revit in September 2011 when I joined Arup as a graduate mechanical engineer. Since then, I feel in love with how Building Information Modelling (BIM) and Revit have revolutionised the buildings industry by ensuring better coordination and management of construction information. My main focus as an engineer and as a BIM enthusiast is finding ways of using the "I" in BIM, that is the information in the models to inform the design process and project deliverables.

I have always been interested in programming and since I was ten I had various attempts to get in the programming world. I started with learning Pascal programming language in school and continued with Visual FoxPro in high school. I wrote a few small programs in Visual Basic and C# along the years, however due to my job I got a bit disconnected coding and never took it further than the basics. With no practice, I can say I forgot most of the syntax but still remember some of the concepts.

Almost one year ago I stumbled across Dynamo, which is a Visual Programming medium that helps create add-ins for Revit. It can also be used for solving problems not related to Revit, however the Revit interface is what it is typically used for. After playing around for a few months and creating small add-ins, in December 2015 I had the opportunity to participate at Autodesk University 2015 as a co-speaker with Andrew Duncan. We presented the An MEP Engineer's Guide to Dynamo to a class of 200 people. This has really opened my appetite for Dynamo and I stated researching more about it.

Dynamo comes with a number of standard nodes which you can use to create the programs. The community also generates loads of new nodes almost everyday. However, sometimes that is not enough or you would like a node that would do what you want instead of using 15 nodes to achieve the same thing. For these kind of situations Dynamo also supports Python script based on the IronPython platform. I decided to use this as an excuse and try to make a comeback in the coding world by learning Python.

With this blog I aim to monitor my progress both with Python and Dynamo, but also keep track of other BIM related topics.