03-25-2022 03:17 PM
I have a reference to an output terminal of a SubVI call. I execute this code to disconnect the terminal from the wire:
Sometimes it just disconnects leaving the broken wire (which is what I want); and sometimes the wire gets deleted (which I don't want because I need that wire later).
Whether or not the wire gets deleted seems to depend on which particular SubVI (in both cases it's an Express VI), and which particular terminal is involved.
I can't figure out what the difference is that sometimes causes the wire to disappear and sometimes remain intact.
03-25-2022 04:15 PM
Any chance it has to do with either bends in the wire or branches in the wire? I can't reproduce it right now, but I feel like I've seen wires behave differently if they're straight vs bent or maybe branched vs. single-wired.
03-25-2022 04:37 PM
@BertMcMahan wrote:
Any chance it has to do with either bends in the wire or branches in the wire? I can't reproduce it right now, but I feel like I've seen wires behave differently if they're straight vs bent or maybe branched vs. single-wired.
That was my first thought; but nope.
03-29-2022 07:05 AM - edited 03-29-2022 07:07 AM
Could LV's auto wiring algorithms be kicking in?
Also, is this reproducible and\or consistent?
03-29-2022 10:08 AM - edited 03-29-2022 10:09 AM
wiebe@CARYA wrote:
Could LV's auto wiring algorithms be kicking in?
Also, is this reproducible and\or consistent?
Turning off autowiring didn't help.
It's somewhat reproducible. The attached code manifests the problem, but if you edit "BUG.vi", the problem sometimes goes away (and may come back if you edit again).
The loss of the wires happens when
runs in "..\Universal Dialog Box\Support\Common\Utility\Scripting\Disconnect-Reconnect Wires on SubVI.vi"
03-29-2022 10:29 AM
Just found it: If the wire length is 32 pixels or less, the wire gets deleted, greater than that, and it remains intact.
03-30-2022 03:19 AM
@paul_cardinale wrote:
Just found it: If the wire length is 32 pixels or less, the wire gets deleted, greater than that, and it remains intact.
Definitely not desirable behavior when you're scripting...
03-31-2022 12:35 PM
wiebe@CARYA wrote:
@paul_cardinale wrote:
Just found it: If the wire length is 32 pixels or less, the wire gets deleted, greater than that, and it remains intact.
Definitely not desirable behavior when you're scripting...
Same thing happens with manual editing.
Still scratching my head on a workaround.
04-01-2022 04:01 AM
@paul_cardinale wrote:
wiebe@CARYA wrote:
@paul_cardinale wrote:
Just found it: If the wire length is 32 pixels or less, the wire gets deleted, greater than that, and it remains intact.
Definitely not desirable behavior when you're scripting...
Same thing happens with manual editing.
Still scratching my head on a workaround.
I guess a workaround is to 'record' the wire, disconnect the terminal, and if the wire is deleted, recreate the wire... If there's another terminal, you could use create described wire. If not, well, it's a lot of work... Both cases you loose the original UID...
You could try to re-route the wire (add joints, give it some length) so it isn't deleted. I suppose you can reroute in a way that it's easy to undo the rerouting.
04-04-2022 12:09 PM
wiebe@CARYA wrote:
@paul_cardinale wrote:
wiebe@CARYA wrote:
@paul_cardinale wrote:
Just found it: If the wire length is 32 pixels or less, the wire gets deleted, greater than that, and it remains intact.
Definitely not desirable behavior when you're scripting...
Same thing happens with manual editing.
Still scratching my head on a workaround.
I guess a workaround is to 'record' the wire, disconnect the terminal, and if the wire is deleted, recreate the wire... If there's another terminal, you could use create described wire. If not, well, it's a lot of work... Both cases you loose the original UID...
You could try to re-route the wire (add joints, give it some length) so it isn't deleted. I suppose you can reroute in a way that it's easy to undo the rerouting.
I discovered that the deletion won't happen if, after the disconnect, there are at least 2 terminals still connected.
So my workaround is:
In the end, this leaves loose wire ends, so I have to remove those after I've reconnected.