The Dyn. Script dose not work on bigger models

Hey there everyone

i’m currently trying to create a dyn script for constructing holes in walls, where there is a duck intersecting, so fare it works on a small project, but when i run the script in a bigger project it gives me a lot of warning’s the primary warning is

Warning: Element.Geometry operation failed.
Value cannot be null.
Parameter name: source.

i’m not certain how i can come around this warning


Won’t be possible for us to figure out the reason for the failure of the Element.Geometry node from the images
Dynamo seems to be having difficulty generating the geometry of some or all of the walls. Identify the troublesome walls first, can then try to identify the problem.

how do i find the walls that are troublesome for the element geometry fail ?

  • Expand the preview bubble for the Element.Geometry node (or connect a Watch node) and look for null values.
  • Then look for the corresponding indices (of the null values) in walls list. Click on the Element id (number with green highlight)
  • The selected element will be centered in the Revit view

In future, while posting screenshots, expand relevant preview bubbles.

okay thanks i will try that out

by preview bubbles what is it that you mean exactly ??

sorry for simple questions, i’m new in here

On moving your cursor to the bottom right corner of most nodes a white bar will appear below the node
Move your cursor above it to expand the list
Click on the pin that appears to keep it open

Please do not hesitate to ask any questions, simple or not.

1 Like

now that i have found the element who is the trouble maker, have do i make the script remove it ?

You can use List.RemoveItemAtIndex to remove Wall at index 265 before feeding it to Element.Geometry

On any Dynamo script with action, they will fail if you have any null values. I tend to use a Boolean mask to dump any null values before for final list goes in for processing. a code block with “” will find “Null” in Dynamo.

1 Like