Clean up huge graphs, and the use of "def return" functions in a code block

Hey people,

I have a huge graph (you dont want to see!) It works, but I need to clean it up in a proper way. I have been looking into code blocks - “node to code”, and I can see potenial in this. The solution is of cause not to mark everthing, right click, and then go node to code, I can see that. I thought of this function here maybe, as I call the same parameter name many times. Then I could get rid of all these hundreds of wires from that same string block. I would like to here your opinion on this, also i you have other good advise to make complex graphs less complex.

Thank you!

It’s certainly a good idea to start focusing on code blocks at some point and to keep your graphs clean and legible. How you do that is highly dependent on who will be using and modifying your code.

While code blocks can look a lot nicer and reduce clutter, they can also be harder to understand for users who don’t have as much experience with them. The same goes for using custom functions for common inputs - it’s a good idea in theory when it comes to maintaining a clean graph layout, but it’s actually less efficient and potentially harder to understand for newer users.

If you don’t have a ton of newer users getting into your big, complex graph to make changes too often, then it may not be worth the effort to convert it right now. Instead, you could focus on being more efficient and intentional with new graphs. You can always make changes on an as-needed basis otherwise.

2 Likes