I want to extract layer thicknesses from each wall type. The ultimate aim to push them into wall type parameters so they can be tagged and scheduled.
I found FamilyType.CompoundStuctureLayers in the Clockwork package but got stuck.
Firstly its input is a list of all wall types. Feeding it the name from Wall Types node doesn’t work. I’m not sure why.
Output for Layers is a list of wall types, with nested list of presumably layers. But each member is Autodesk.Revit.DB.CompoundStructureLayer.
How do I drill down to get each layer’s thickness?
I think that you will fall in love with the “FamilyType.CompoundStructureLayers” node from the clockwork package. Tho keep in mind that if you’re using it in one of the daily 0.81 or 0.82 versions of Dynamo, you’ll need to make a small change due to the way units are handled now:
Clockwork’s node already extracts the thickness of each layer of the wall for you. The node probably didn’t work because you’re using it on a newer version of Dynamo. If you change it as shown above it should hopefully work:
I found Element.GetParameterValueByName on another post which did the trick.
I’m new to Dynamo (as if you couldn’t tell), the problem I’m having is the library search doesn’t come up with everything.
I searched parameter but didn’t get Element.GetParameterValueByName or a whole lot of other nodes that have parameter in their name. The same thing happened with a search for list.
Why? Is there some trick I’m missing. I tried wildcards but they don’t make any difference.
I haven’t started migrating Clockwork to Dynamo 0.8.x yet, so all Clcokwork nodes that report any unitized data will not report correctly because of the way the handling of units has changed between Dynamo 0.7 and 0.8. In order to use this node in 0.8 regardless of what your current display unit is in Revit, I would suggest you modify it as shown below. Note that in the code block I changed the fourth line from Length.FromFeet(seq[3]); to just seq[3];
What this will do is convert the length value from Revit’s internal units (decimal feet) to the display unit currently set in your Revit project (which is what Dynamo is using).
Thank Andreas for your help. I’ve now got the core of it working.
It places a wall’s layer materials and thicknesses into a parameter of the wall so wall layers can be tagged (and scheduled).
Result:
The graph:
Note that FamilyType.CompoundStructureLayers from Clock requires the edits Andreas post above.
A_NumToString is a node I made. It is also posted above.