Exploding Node Gets different value

Hey everyone, im trying to explode a node so that everyone in my company can use a graph i made without having to download a package. Ive tried making the package paths on the network so everyone can access but dynamo with crash when they try to repath. So now im trying to explode the node so it will still work for them.

Heres the problem when i explode the median node. it returns different values than when its left intact. Any idea how to fix this??

Thanks ahead of time for any responses!

This is because custom nodes run as a single transaction. Lacing and list levels can effect individual nodes/lines of code when running the the dyn environment. What does your list of inputs look like?

ahh makes sense…

You could define a function or introduce Replication guides to make the code work

median.dyn (10.1 KB)


//begin rant

I cannot stress this enough: breaking apart custom nodes so you don’t have to manage package deployment can lead to more work.

Just about every time I have seen people attempt to circumvent package management by ‘breaking out the code’ they wind up making more work for themselves in the end.

Doing so means you need to maintain multiple versions of the code if a syntax changes in the future (IE: one version for 2020-2024 and one version for 2025 and up), and you have to do so for each bit of custom code (be it Python or Design script). Far easier to bulk deploy your packages via robocopy to each users C drive, or teach users to download missing packages at start (I find that if I make an analogy to downloading Xrefs they didn’t have suddenly they get it quickly).

Don’t make more manual work because the tech seems hard to train or implement.

//end rant