giovedì, settembre 25, 2014

Export Sheets in shared coordinates

When working with consultants or clients it's fairly common to ship PDFs and DWGs of the sheet sets along with the Revit model, however DWGs are the weakest part of the overall process.
Revit is not able, natively, to export DWG in shared coordiantes from a sheet view, but from a regular model view it does although it will never be a native DWG file. So I wrote a macro (see a previous post) that collects the views on a sheet and exports them in a separate folder to have them organized and in shared coordinates.
What was missing was the ability to include the title block, which was ok for consultants but not for the client.
So here's a video that shows how this issue can be solved using both Revit and AutoCAD.
DWGs are still X-Refs and they are not clipped like in the previous version, each view is then rotated accordingly to the Revit file. Each viewport only shows the layers of the corresponding x-ref. For further enhancements the views could be locked automatically, there could be a batch file that will open AutoCAD and do the job for each sheet file, etc... I'm still working on and testing it. I hope to find a way to run the whole thing from Revit with the press of a button. Suggestions and critiques are appreciated as long as they are constructive.



lunedì, settembre 22, 2014

Super Tag - Parameters grouping



In this examples I'm trying to retrieve the parameters of a generic model representing a person (a generic model smile shaped) in a room with all the equipment that belongs to his/her such as the workstation or the phone (each family has its own parameters).
In the previous example parameters were just listed in a certain order hard-coded in the Updater, this time the order needs to change slightly so that the parameters referring to a spefic person are all consequential.
In order to do this an additional step must be included in the process.
The best way I could think of is to group the families involved (the person, the workstation and the phone), retrieve the parameters for grouped objects first and then the remaining outside of groups.

mercoledì, settembre 17, 2014

Super Tag - Dynamic Model Update




I've been wrapping my head around dynamic model update in order to push my code further to be more "Revit-ish", so it updates instantly and has no longer a "fire and forget" sort of behaviour.
I've implemented an IUpdater interface that loops through the family instances, reads their parameters in a certain order and then pushes them into the comments of the room.
It's not perfectly Revit since it's not bi-directional at the moment, anyway it gets the job done nicely.

Technically the oddest part in developing this idea was to realize that an IUpdater doesn't need a transaction to work.

Applications are endless, this one I called "Super Tag", it would give the ability to the users to push calculated values into tags (finally!), embedding a piece of code in the template file assuring that everyone on the team has the same tools available.

There are considerations to make on performances, but it sure is a great thing we have to suit our design.

sabato, settembre 06, 2014

Dynamo - Document Nodes Confusion

In addition to Marcello's post  on confusing node names for selection in Dynamo, I'd like to point out what I've just discovered about the Document nodes.

In the API the document that is shown to the user is called Active UIDocument (for brevity uidoc), this element has a property called "Document" that refers to the data base level document (for brevity doc). Any time we want to edit a file in Revit we need to open a transaction that points to a specific doc, while the user interacts with the current uidoc.
In a Revit session there could be multiple docs opened at the same time at a database level (think for instance to a host and links scenario, linked files are documents somehow opened at a database level but not directly editable by the user in the current session; similarly, with multiple editable docs opened, the user is allowed to edit just one at a time, the active document, the uidoc), they could be project or family documents.
The API allows access to those docs without the user interaction and for this reason it's important to have clear in mind the differences between the two: for example, object selections belong to the uidoc (because they require the user intervention), walltypes belong to the doc (because their definition doesn't depend on variables such as the active view), etc.


In the picture above you can see that Document.Current is referring to the UIDocument since I got the active view name, while the Element.Document is referring to the Document since I got the title.
Hope this is gonna be fixed or cleared up in releases to come.


Are you kidding me???


venerdì, settembre 05, 2014

Dynamo - Rooms Solids - Color Scheme for any parameter

This is a further development of previous Dynamo definition, now it can apply the color scheme for any parameter, there's a little bit of coding in there because I couldn't figure out why a cross product lacing over a List.FilterByBoolMask returned a null list for the In and Out output ports.
Anyway I did it myself using a very simple script in Python.
I'm trying to avoid them as much as I can, really, but when I'm tight on the dead line and I need  the get the job done, coding is always my best option, even if I don't feel particularly comfortable with Python, but I guess it's how my brain works, I know for a fact that amazing things are achievable just using the OutOfTheBox set of nodes, so I hope to have enough time to obtain the same thing using a "pure nodes" approach instead.

I guess that the beauty of Dynamo is that everybody can play with it and  make his own tools, no doubt about that.

Here's the code I've used to collect rooms in the project:


Here's the code I've used to retrieve indexes evaluating the elements of ListA against the elements of a ListB, the output is a list of integers, as long as ListA.
In this example ListA contains Department values for each room in the project (11 rooms gives 11 items) while ListB contains the same values but derived from the Color Scheme file (5 department entries gives 5 items).


The outcome of this python script is used to determine which color has to be used to override each one of  the solids derived from rooms.

Solid extraction and ListA:


Color override and ListB:


Here's a .Zip file containing the .Dyn, .Rvt and .Csv used in this example.
In action:






giovedì, settembre 04, 2014

Music as a Language: Victor Wooten at TEDxGabriolaIsland

One of the greatest musicians of our times, Victor Wooten gives a speach at TEDx on what music is for him, sharing his experience and some interesting thoughts on life.
Enjoy.

mercoledì, settembre 03, 2014

Dynamo Room Solids





I've been asked today by a collegue how to replicate an axonometric view of AutoCAD spaces into Revit for a preliminary design.
In the past I've tried to do something using IFC but the result wasn't that good after all for many reasons.
This time I tried a Dynamo approach to the problem since it allows access to data and particulary to the solid representation of elements.
What I needed was a little bit of code to select rooms in the project but I still suck in Python, I happend by chance in a package by Nathan Miller called LunchBox and one of the custom nodes inside this package retrieves a lot of room data. What I did in this case was to copy the import statements from this node and write a few lines of Python code on my own to filter objects belonging to the Room Category.
After that it was fairly simple extract the solid representation for each room, I created a list to keep the geometries distinct because I wanted to be able to control the color of each room to match the color scheme in 2D views.
Here comes the sloppy part: unfortunately the API (Revit 2014 as far as I know) still doesn't give access to the color scheme parameters, so not even in Dynamo it shouldn't be possible to retrieve those parameters.
To keep it simple I decided to write a CSV file containing the paramter value and the components for the colors in the color scheme (this one was based on the name of the room, but it could be done for every parameter availible, just keep in mind that room solids have to be grouped as one big object for each value of the color scheme (I know it's not very handy but I couldn't figure out another way to do it, suggestions appreaciated).
Here's the definition for those who want to have a closer look to it.

martedì, settembre 02, 2014

LOR - Level Of Reliability

Using acronyms is not really in my culture since I'm not an english mother tongue, it's fairly common though in the rest of the world and I happend to get used to it. I had to be explained what "RAF" stood for in a project based in London, since for me it was Royal Air Force, but the other BIM Manager on the phone told me it was Raised Access Floor, just to name a funny episode that happend to me not too long ago.
Right now the usage of these "magic words" is spreading also in the AEC industry (here's another one).
If everybody understands these acronyms, such as BIM, BEP, VCD and so on, and everybody knows precisely what they refer to there's absolutely no problem with using them.
Unfortunately this is not the case for the subtle LOD (Level of Development), which is sad to note that still too many people tend to confuse with level of detail, which is a completely different concept.
I'd say to shift the attention from the model to the results of the analysis that can be performed on a model at the certain stage of its development.
LOR Level Of Reliability would measure the reliability of those analysis (in a general kind of way), less people would confuse the terminology and the key concepts behind it.
I think at least it is worth a discussion.