LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disconnect wire through VI scripting

Solved!
Go to solution

How to disconnect wire between two terminals through VI scripting?

0 Kudos
Message 1 of 8
(3,443 Views)
Solution
Accepted by topic author awang_synovus

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.

0 Kudos
Message 2 of 8
(3,435 Views)

There is a "Metodology" here that triggers my "Wrongometer"  

 

Spoiler
The "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?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 8
(3,422 Views)

@JÞB wrote:

There is a "Metodology" here that triggers my "Wrongometer"  

 

Spoiler
The "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!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 8
(3,412 Views)

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.

0 Kudos
Message 5 of 8
(3,390 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 8
(3,374 Views)

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. 

Message 7 of 8
(3,324 Views)

@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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(3,304 Views)