Every now and then, you may find that a package upgrade causes some ofyournodes to stop working. This may be because nodes have been removed from the package that you were using. You can use the two DYNs here to quickly check for missing dependencies:
Step 1
This will find dependencies from a selected package or definitions folder and export them to Excel:
Step 2
This will read the Excel file back in, and compare with node names in yourPackages folder (may take a while):
Both of these dyns can be run in standalone / sandbox mode.
If there are missing nodes, they should appear in the pink box. You could then go to DynamoPackages website, download previous version that had the dyf you want, and then copy the contents of that dyf into your own custom node.
Okay, so how can we work around this? Basically, by using psexec to launch Revit using another Windows user. This allows us to have SSOrunning in one ‘Windows user’ and SSO logged out in the other.
Steps:
Ensure you have psexec available
Make a CMD with this text (for Revit 2015):
psexec -u OtherWindowsUsername -p OtherWindowsUserPassword -d -i “C:\Program Files\Autodesk\Revit 2015\Revit.exe” /language ENU
Open Revit in current user and sign out of A360
Run this CMD file, and in the new instance of Revit you can sign back intoA360
The workaround and outcome is shown in the image below:
 As usual, there may be complications with this method (such as access to different network resources etc), so please use at your own risk 🙂
XMLfiles are everywhere. Andin the BIM world, we have to deal with a range of different xml file schemas, such as BCF, Navisworks Clash Reports and Viewpoints, and so forth. Hiding inside these XMLs there is some very useful information. For example, BCF files often have Element IDs in the viewpoint.bcfv component, and Navisworks XMLfiles often have point XYZ values. Can we easily get access to this information for usein Dynamo, and then inRevit?
Yes, we can! There were one or two ways to do this in Dynamo before, but here is my take on it…
Dynamo ships with IronPython, which in turn ships with an XML handler called ElementTree. I have created some basic nodes that give us access to ElementTree functions in Dynamo. Along the way, I learnt a bit about encoding and character sets. It turns out that Navisworks often inserts tricky characters into the XML (like the diameter symbol), so as a workaround (for now) I do a string encoding roundtrip to get rid of these problematic characters. In the same node, I create the ElementTree object: this is a special object that essentially represents structured information about the XML data. The initial import looks like this:
Once we have this ElementTree object in hand, we can start to do some interesting things, like: Iterate through tree to get individual XML elements
andShow a hierarchical representation:
With the individual elements, we can Get Attribute names and values, and the Get the children of those elements:
Obviously, you can immediately do some nice lookups against these lists in Dynamo, depending what information you want. However, on large XMLs this can be quite slow. Happily, ElementTree provides some basic XPATH support, which looks a bit like this:
With the XPATH supportand an understanding of the xml hierarchy, I have created a node to do XPATH calls straight to the ElementTree object:
Now that we can ‘snip’ out useful information from the XML, we can do interesting things with it, like make some points:
When it comes to BCF, its a little bit more challenging. I haven’t figured out how to unpack the bcfzip directly to memory (yet), so we have do that manual step first. Once we have a ‘folder’ from the BCFZIP, we can get the bcfv files from inside it and then get information from them, like this:
So, in the latest Bakerypackage are the nodes needed toread a variety of XMLfiles, get information from them, and do some useful things with that information. It was a learning experience for me, and I hope its useful to you 🙂
Sometimes you have a set of DWFs that you would like to work with in Revit. For example, you might have DWFs of site equipment, fences and trucks that would be useful for site modelling in Revit. Here is one way to get those dwfs into a more Revit-friendly format…
Note: You need to have iConstruct with their Smart IFC Exporter for this workflow
Phase 1
Create a container NWD for DWF files, so that you can fix rotation and coordinates:
Phase 2
Steps toconvertDWFto IFC with colours and object selectability:
Open two Navisworks 2016 instances
Open the rotator.nwd from above in one instance
Append any DWFs you would like toconvert
Adjust their Units and Transform until they look right
Save the rotator.nwd
Open the container.nwf
Refresh to reload the rotator if necessary
Now, hide everything but ‘shell’ elements using a search like this:
Save the search set for Item Type = Shell
Set up an iConstruct IFC config…
IFC2x3
New
Type a Name
Press Building button
Expand to IfcBuildingElementProxy, userdefined
Choose search set for Item Type = Shell from above
Save
Should look like this…
Close config dialog
Go to Smart IFC Export and choose the export config you just saved
Fill out next dialog and press ok
Choose target IFC location
Wait for Navisworksto export the IFC
Phase 3 – intoRevit
After IFC is created, open Revit. Ensure you have latest IFC updates installed, then open the the IFC. Wait for Revitto complete importing… For the most part, you should get a pretty good looking result. One exception is where the DWF had one ‘shell’ with multiple materials, like this:
In any case, now you have a bunch of ‘Revit elements’ (yes, I use the term loosely) that can be made into Model Groups. They aren’t in families, but you can make them into little rvts to load as links. I realise there are some limitations in this workflow, but in some cases there is no other way…
If you are interested in more to do with DWF conversions, check out these links:
If you want to edit Revitviewfilters, you may be frustrated by the fact that the view Filter Edit Dialog box is sorted ‘historically’ – most recently created at the end of the list:
Â
While we can‘t ‘sort’ this listinRevit 2015, we can use the first (alphabetical) list to directly access a Filter by using the Edit button:
Yet another one of these little things where it helps if you know What Revit Wants…
It can be pretty hard to track what is visible in a big federated model, and even harder to figure out when something has been changed or updated. Until now…
Check this little node out:
This gets five pieces of information and writes each of them to a View instance parameter. Currently, it works in the context of the currently active view in Revit. The information acquired is as follows:
current date / time
worksets currently opened
RVT links that are visible in the view
the file sizes of those links
the date modified for those links
The ‘list items’ are converted to a string with line breaks. Then when it is referenced in a Label in a View Title family (on the far right of image above), it basically shows up as a list.
Future applications of this can easily include reading the link status from the view parameter (by converting the string back to a list), comparing it to current link status, and then immediately showing what models have been updated and need to be reloaded…
Ever wanted to bulk duplicate views from one level to another level? There are various addins and ways to do this, but it is also relatively simple in Dynamo:
Get views using Dynamo definition, and
Get view element IDs and send them to clipboard
Close Dynamo
Select by ID… Paste the IDs
Copy (Ctrl + C)
Paste – Aligned to Selected Level
Using some Bakery nodes, the Dynamo definition would look something like this:
Ever had that annoying problem of your entire dwg showing up in Section Views, regardless of where it is cut? If so, check out this tip from Chad at Revit KB: …if you link the DWG into an In-Place Mass instead, then when the section cuts through the Mass/DWG it will only show just the elements which are being cut by the section. … when placed inside a Mass, that Mass can then be Phased which also means the DWG inside it will too.
One of the biggest challenges for many long-time Revit users is that initial ‘starting point’ of getting into Dynamo. It takes a bit of time and effort to make that transition…
Happily, as with Revit, the community is the key. The community is full of people who are providing free packages, definitions, and code, and free advice to new users. But where can we find all of this info? Check out this post on Kyle Martin’s blog. He gives some great tips on how to integrate Dynamo learning into your daily work.
Here are a couple of comments I enjoyed:
been using Dynamo for less than a year with no prior visual programming experience and it has made a significant impact on the way I approach production
Dynamo adds an additional layer of control to overcome Revit limitations by providing the capability to gather and restructure information and elements in the model, thus creating the potential for repetitive task automation
… there are many blogs produced by pure Dynamo enthusiasts that have helped me in my journey. I highly recommend that you check them out if you are looking for answers or inspiration: