11-07-2014 04:54 PM
How to disconnect wire between two terminals through VI scripting?
Solved! Go to Solution.
11-07-2014 05:27 PM
Get a reference to the wire and call the Delete method. If the wire is connected to multiple sinks, you could get references to the source and (other sinks), delete the wire, then reconnect it to all the sinks other than the one you wanted to disconnect.
11-07-2014 07:12 PM
There is a "Metodology" here that triggers my "Wrongometer"
why would you need to programatically delete a datapath? And I'm curious-- What application would you like to build that needs that?
11-07-2014 08:09 PM - edited 11-07-2014 08:11 PM
@JÞB wrote:
There is a "Metodology" here that triggers my "Wrongometer"
SpoilerThe "Wrongometer"(tm) is still under develoment, and not for public use
why would you need to programatically delete a datapath? And I'm curious-- What application would you like to build that needs that?
You beat me to it! I was curious also, because I never ran into a situation where that would be needed.
There are two reasons I'd like to know a little bit more about the "why".
The first reason is a bit selfish. I'd like to learn about new situations and file them away for later - this has helped me so many times I have lost count.
The other reason is that maybe if we learned the reaoning behond the request, we can help you to fulfill it in an easier, more efficient manner.
Kind of like if someone asks you the best way to tie a rope to a bumper, instead of telling him the best knots to use, if you knew he wanted to pull a trailer, thenyou could recommend a trailer hitch instead!
11-07-2014 10:48 PM
His use of the term "VI scripting" showed me that the OP is aware of the feature required to programmatically manipulate a VI. If he's working on any sort of editor tool, then he would need to know how to delete a wire.
11-07-2014 11:55 PM
That's kind of why I listed my first reason first. I'm really curious to see what it was that required that bit of manipulation. The other reason was that sometimes I see people going about something in an extraordinary manner when somehow they missed a piece of the puzzle early in their development and they have a blind spot there.
But probaly not so much here.
11-09-2014 01:55 PM
Thank you Darren for solving my problem. Just to fulfill your curiosity, I am working on an xnode, and in the modifycode ability VI, I want to use VI scripting to modify an existing code. That's why I need this function.
11-09-2014 04:54 PM
@awang_synovus wrote:
Thank you Darren for solving my problem. Just to fulfill your curiosity, I am working on an xnode, and in the modifycode ability VI, I want to use VI scripting to modify an existing code. That's why I need this function.
Very cool. This prompted me to look at this link. This is an area where my knowledge is sparse, and that kind of custimization is beyond me. I hope to see your results some day. 🙂