Corrupted .dyn file after using Dynamo Player

I originally had a nice graph that looked something like this:

I successfully ran the script several times using Dynamo Player on different drawings with no issues. I tried again today on a new drawing and Dynamo Player said “Run completed with errors”. I opened up the graph to see if I could find the issue, and it opened like this:

Bad Graph

All of my nice formatting is gone and all of the nodes are stacked on top of each other. I separated out the nodes and it looks like they are all there, but running the script gives me several errors that say “Warning: Internal error, please report: Dereferencing a non-pointer.”

Any ideas where I should go from here?

OK I figured out why the warnings were happening, but it still doesn’t explain why the formatting got messed up so much.

Could there have been a change in a Dynamo version? What Revit build and Dynamo build we’re you using?

Just to be clear, this is on Dynamo for Civil 3D, not Revit. I don’t believe there was a change in Dynamo version. I did recently install the Dynamo for Civil 3D Update 2, but I’m pretty sure that was before creating this script.

Anyway, the versions I have now are:
Dynamo core v2.4.1.6394
Dynamo Civil 3D v2.4.1.2161

Could this be an issue with binding data and trying to run the script on different drawings? I was just reading about this on the list of known issues in Dynamo for Civil 3D.

There’s also a statement for the Civil 3D Update 2 (the one that added Dynamo Player) that says that “Dynamo script trace data is now stored in the drawing.” Does this refer to element bindings, or is there some other trace data that I don’t know about?

Hi @mzjensen

Looks like by mistakenly someone has selected all the nodes and clicked aligned X. Here is how you can fix it up:

  • Select all the nodes and go to Edit and select “Cleanup Node Layout” or Ctrl+L.

Hope it helps!

Yes, that is in reference the element binding in the context of dynamo for Civil 3D. Exactly how it works isn’t clear to me, as this is something I haven’t experimented with or looked into yet, and is a back burner issue for me personally (I don’t use C3D).

@nigel.peters may have more info.

Yes, the “Cleanup Node Layout” was helpful to get things unstacked. But what I’m most curious about is why it happened in the first place. After I finished making the graph, I only executed it using Dynamo Player. So there wasn’t a point where I opened it up and had the opportunity to select all of the nodes, align X, etc. It went like this:

Save and close .dyn file -> run with Dynamo Player (completed with errors) -> reopen .dyn file to find everything messed up.

And it’s even more strange that all of the colored node groups were lost.

Did you reopen via the edit in Dynamo button or did you close Player and launch Dynamo?

I reopened via the Edit in Dynamo button.

Thanks - this may be the key which helps resolve. :slight_smile:

1 Like

yes, I think thats the issue - (edit in Dynamo button)

Dynamo player only loads the graphs headlessly (no view) - so the node positions are not loaded - when you then load it via edit it appears to save time it may create a view instead of reloading the graph… kind of unexpected, but I guess understandable. Likely at that point if you do not save, but just close the graph and reopen it, it would be fine.

we’ve made some changes to the properties that should be loaded now even when opening without a view, and positions were one of them - I think it will be fixed in 2.5