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.
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?
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.