Hi, I’m working with Dynamo (2.0 now, though started at 1.6) for a graduation project and so far it’s been going well and I’ve been able to learn and solve any issues I’ve had (though I’m by no means an expert), but now I’ve come across a problem that I don’t think should even be one.
I’ve created a code block with a relatively straightforward imperative block to work out on which element faces a series of points lie. The points and the surfaces have been sorted by the relevant elements for optimisation reasons so as to not have to test every point against every surface with in this particular setup 9600 permutations but limiting the whole thing to a mere 1200 and generally making my life easier further down the road. The actual numbers may become much greater further down the line so I’m having to optimise as much as I can when I can.
The issue I’m having is that when I open the graph, the code block doesn’t evaluate properly; it returns an empty list. This remains the case no matter what I change outside this particular block.
Weirdly, I can work around this by changing seemingly anything in the code - meaning changing some character, adding some brackets, whatever - then clicking outside the box, and it’ll evaluate just fine (running on auto), returning a list of the surfaces I need. Changing it back doesn’t affect the results either; from this point on it works fine until I reopen the file.
However this is clearly not desired behaviour and I’m wondering if it’s something I’m doing wrong but not wrong enough for it to yell at me for it, or if it’s inherent to Dynamo’s internals? It’s not just annoying but would presumably make it impossible to run from the Dynamo Player, though I haven’t been able to test this as I’ve had some issues installing the latest version of Revit on my machine.
There is a fairly large graph riddled with other code blocks preceding this and they all function as normal. I do have all other imperative blocks in defined functions, but this block wasn’t giving the same results that way and I couldn’t be bothered to finagle around with it to get it right.
Can anyone shed any light on this for me?