From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Type Specificer

Solved!
Go to solution

When working with a call by reference, one needs to use a strict reference (so to include front panel objects).

 

But the problem I'm having is making a strict reference. I need to select VI server class, browse to the VI's location, and then open the VI.

 

Wouldn't it be possible just to use the file I'm already using to open the VI's reference.

 

aka

 

Is there a way to automate making a stritic reference to a VI for the call by reference function?

0 Kudos
Message 1 of 7
(2,620 Views)

Yes. Drop a Static VI Reference (from the app control palette). Drag your VI into it. Right click it and select the strict option. This has two other advantages in that it loads the VI into memory (and will automatically include it in a built application) and it allows you to use the VI Path or VI Name properties from the static ref to input into the Open VI Reference function.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(2,617 Views)

You can drag a VI icon onto a Static VI reference to create a reference, you will have to right-click and choose to make it strict.

0 Kudos
Message 3 of 7
(2,615 Views)

Oh never mind I'm an idiot. 

 

If I want to execute a VI based purely on its path I'll have to use an Invoke Node to Call by Reference. Other wise if I make a Call my Reference node I'll have no way to automatically set it's inputs to my specified inputs. 

 

Or will I?

 

 

0 Kudos
Message 4 of 7
(2,613 Views)

You seem to be missing the point. 

 

I don't want to click, I want to make the status automatically based on a path variable. \

 

Aka make the reference without any click or dragging, have the call be set up automatically without right clicking, or dragging. 

0 Kudos
Message 5 of 7
(2,612 Views)
Solution
Accepted by topic author Valarauca

If you want to use the connector pane, you MUST have the strict reference and every VI which you use there will have to have the same connector pane, or you will get an error. I'm not sure why dragging a VI once is difficult. If you want to have multiple VIs, just use one of them as the input to the type specifier (or you can even disconnect it, but I don't feel like describing that process) and obtain the path separately.

 

If your VIs have different connector panes, then you can't use CBR to call them and you will need to use the Run VI method as you suggested.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(2,590 Views)
It's not that it's difficult it's just I wanted it to be done automatically by a different function because I didn't see why I couldn't (or why it shouldn't be possible)
0 Kudos
Message 7 of 7
(2,586 Views)