Recently I found online script from Cesare Caoduro (@Cesare_Caoduro3). I tried that script but I am keep getting error from the element geometry inside architectural model. Any ideas why? Please see screenshot of script and error.
My guesses: a curtain wall, or a wall which is been edited to have no geometry (i.e. a door was demoed, and replaced to match the other doors, now the infill wall has nothing left as the void of the door cuts it all).
To know for certain: Find the index of the null, then get the item at that index, and then check the item out in the project.
Thatâs where your list management comes in. You need to use RemoveNulls to remove the null items from your list as well as any other items that âline upâ with the null elements. In your case, youâd want to remove the nulls from the geometry list AND get rid of the Base Constraint items representing the null elements. The easiest way to do this is to just filter your list of elements before using any other functions on them.
Run the script on the elements to find the reason for the failures. Once you have that you can filter out the elements before the issue presents itself. We would need to know why the error occurs (and so we need you to confirm the reason for the error) so we can help you to remove the errorâŚ
âRun the script on the elements to find the reason for the failures.â
What does that mean? How do I run scripts only on elements? I am pretty new with Dynamo so I am probably asking dumb questions. Do I need to introduce a new node to the system?
âOnce you have that you can filter out the elements before the issue presents itselfâ
He means run the script so you get the errors. Look at which indices are null and the corresponding element Id so you can look up the failing elements in Revit. Hopefully this will shine a light on why the geometry is failing or returning null.
Once youâve confirmed that the failing elements are not a problem (walls that no longer have geometry like @jacob.small mentioned) you can use the Manage.RemoveNulls node to remove the null values and the failing elements from their respective lists.
To build on what @Nick_Boyts said. To remove all âerrorsâ you need to remove the elements with no geometry before progressing. To help you do this we need to know what the elements are. Confirm the elements as described above, we can then help you remove the offending types as needed so you can then get the elements removed.
Alternatively if you just want the script to work, use a remove nulls method as @Nick_Boyts suggested above.
Preview the results of both the Element.Geometry node and the All Elements Of Category node.
Find the null results in the Element.Geometry node.
Find the matching index in the all elements of category node. That is of index 356 in the Element.Geometry node is null, then find the item at indx 356 in the all elements of category node.
In Revit use the Select by ID command (in the manage tab) to find the Element in question. Use the show button to find the Element in a 3D view and review the element type and parameter values in the properties pallet.
I managed to find null elements, and it appears that null elements are only four walls (out of 1900 inside the project). I attached screenshots of those walls, but I couldnât find why are those walls null elements.
If walls are not correctly recognized by Dynamo, you could just try to replace them. But the best way to find whatâs wrong in scripts you copied would be to start building your own and see whatâs happening step by step
Itâs that Dynamo isnât recognizing their geometry. Nothing too All nodes are all core nodes so no reason to dig too deep on that.
It appears that the first wall isnât indicating any endpoints - is it a curtain panel or has the geometry been severely edited in any way? Now that you have the elements you need to identify what makes these walls different from the rest.
To be honest, I couldnât find why is that happening to those walls, but I am not too worried because that is happening to only 4 walls out of 1900.
Now I have come to another problem which I couldnât solve. I am trying to make a void around fire damper but I donât know how to define proper geometry with Dynamo. This is how the fire damper look like:
The problem is that Dynamo doesnât catch the geometry of fire damper as it catches from ducts. See how dynamo recognizes all ducts as solid:
This is likely best asked in a new thread as it doesnât really relate directly to the current title, and that is how people find solutions later on. Can you start a new thread?
You may be best suited to use a wall hosted opening family located by the element.location for the damper and setting the elevation, height and width by the damperâs height/width parameters instead of trying to create Dynamo geometry to cut a void.
Out of curiosity does the damper not have a void element built into it? Are there other elements associated to it which can inform the location of the opening?