Area Boundaries From Room Boundaries

I’ve found an Autodesk University article about automating occupancy calculations for code analysis. Part of the process requires a dynamo script labeled “Area Boundaries_From Room Boundaries”. I’ve recreated the script from the reference info but continue to experience an error. Is anyone familiar with this particular script or know how to troubleshoot this one. I’ve attached a screenshot from the article showing the script. Thank you!

Original Handout can be found here:

What is the error, and which node is throwing it?

Check your levels and lacing to make sure the rooms curves are being read correctly for the Area creation node.

The errors occur along the Area Plan View group. Please see attachment. The first error is located at the Element.Name node and replies “Warning: Internal error, please report: Dereferencing a non-pointer.”. The second error is located at the List.FirstItem node and replies “Warning: List.FirstItem operation failed. Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index”. Thank you for your time and replies!

Have you cleaned up unplaced rooms in your model prior to running the graph? If not you may want to filter out rooms with an area which is not greater than 0 to see if this prevents the issue.

1 Like

There do not appear to be any unplaced rooms. I’ve noticed that after running the graph, the area boundaries graphically appear. They are, however, unable to be selected or to define an area. This occurs only while Dynamo is up and running. It’s almost like the graph is correctly generating the area boundary curves but unable to terminate. This graph was created verbatim from a an Autodesk University course about 2 years ago. I’m sure updates to Dynamo since then have caused the issue. I welcome other suggestions, thank you!

This is likely the background preview of the room geometry.

Please check the object types from the Element.Level bode with an Object.Type node. Then use a List.UniqueItems node so we can confirm there are no nulls (typically from unplaced rooms).

When I connect the Object.Type node to the Element.Level custom node I get a “null” result. I get the same “null” result when I attach the List.UniqueItems node to the Element.Level; should I connect this node elsewhere? According to my room schedule, I shouldn’t have any unplaced rooms in either phase. Thank you!

Is the issue in the lower or upper set of nodes? Element.GetParameterValueByName should allow you to pull the level value from the views of the Clockwork node is acting up there. You may also need a different version of the Clockwork package for your Revit and/or Dynamo version.

The issue is in the lower nodes and look to occur between All Elements of Category and Element.Level. Element.Level gives a “null” result. I’ll try an older version of Clockwork and let you know if I have any luck.

The 2.1.0 version of Clockwork which had a date around August 2018 worked for me. The difference appears to be in the Python Script within the Element.Level node. The node worked fine for the rooms category but not for views. Thank you for your help!