Help with Script

Start with something simple. Select one pipe and one grid and see if you can get the dimension to show up for that. If it doesn’t work, then it should be fairly simple to pinpoint what part of the script is not working. If it does work, then you can expand the selection method from that point. Pay close attention to your grouping of the pipe references with the grid references and make sure they are grouped based on being parallel to each other. You may need to rethink your process of geometry closest to. The post below has another persons graph that may provide some guidance.

Also, try to see what is causing the errors and resolve. Having nulls in one list but not in another will throw off your grouping.

If you are still stumped, then strip your model down to just a few pipes and a few grids to get the size down below 8mb, then share it along with your latest script.

1 Like

Dynamo Test.rvt (5.7 MB)
Here is a sample model. Thanks Staylor.

Your Dimension type is not correct, you are looking for a dimension type in a list where it does not exist. a simple example of this being here.

And then once you have found the index of that item, it is not returning the dimension because the Getitematindex node is not connected.

Here is a connected example.

image
It does show on this list though?

So i don’t know exactly how Dimension.ByReferences workflow works but by doing it this way you are getting the index of the dimension you want and then a bunch of -1 values (ie Nulls)

If you change the lacing of this node to Auto, what do you get?
image

Null. It is starting to get back to me now that my model has finally been put out there, Dynamo may not work with database driven parts. My script works fine with OOTB pipes. I had a feeling this was the issue. Welp back to manually dimensioning and tagging.