I am writing a LV plugin, and have managed to create named bundlers and unbundlers on a wire. With a bundler, you can use the insert node on wire method, and thus place the node precisely where you want on any wire. But with an unbundler I have to use the New VI object primitive. On a simple straight wire, this works great, and I can wire up the unbundler to the wire source and sink terminals. However, when the wire is bent around and has multiple sinks, the wire routing gets messed up. See these two screenshots:
Right-clicking on the upper wire, my plugin can place the unbunder where I want (just below the clicked position), and I would like to wire to originate from that point as shown here:
What happens instead is that the wire source is seen as the cluster terminal, and the wire is routed like this:
I have tried various workarounds. For example, I can manually insert a function like variant to data on the wire, wire the input of that function to an unbundle by name node, wire the input and output of the function to each other, and delete the function, getting the exact result I want. However, I have been unable to get this to work by scripting. Although I get no error on the step where I wire the input and output for a VI together, it doesn't seem to happen, and when I delete the variant to data node, the outgoing wire is left unwired and broken.
Has anyone had luck inserting a branch on an existing wire to a terminal like this?