LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically creating a tunnel with LV scripting

Solved!
Go to solution

Hi everyone !

 

I have that really dumb question, but lost 3 hours trying to solve it...

 

So far, I went through the tutorials on VI scripting available on the NI website.

I am currently trying to build this VI programmatically :

VI.GIF

I had no problem to create the controls, the add function, wire the case selector etc. My problem is with the tunnels: how to create them ?

I have no clue on what to give to the "style" node of the "New VI object" VI. The constant enum has a way too much choices to try them all...

Moreover, none of the official example uses a tunnel on a structure (especially the "Working With Structure.lvproj" example, which is really poor imo 😕 )

 

Ok, I know that there is no official support for VI scripting, but thank you in advance for answering my question !

 

Bat.

 

0 Kudos
Message 1 of 3
(2,751 Views)
Solution
Accepted by topic author Bat_aaaaahhh

Tunnels are either very easy or very hard, depending upon how particular you are about how the end result looks.

 

Easy Way

Wire between the two terminals using the terminal method Connect Wire.  The tunnel will automatically be connected for you.

 

I Want It Where I Want It!

To put the tunnel where you want it, you need to make sure the wire goes where you want it (moving the tunnel afterwards is a lot harder).  So, for each location where you want a wire bend, drop something with a terminal (e.g. a bundler).  Make sure the center of the terminal you will wire to is where you want your bend.  Wire between all the terminals on all the objects, then delete the temporary objects.  The internal LabVIEW codegen engine does this.

 

Let us know if you need more info.

Message 2 of 3
(2,749 Views)

Ok thank you for your answer !

 

I didn't even think of the easy way... But it was supposed to be a dumb question by the way ^^

0 Kudos
Message 3 of 3
(2,744 Views)