LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

current vi reference

Solved!
Go to solution

Hi I'm new to Labview. I want to know how to get the current VI reference as the graph shown below. Functions>Application Contrl>Class Specifier Constant, but I couldn't find the VI option in its VI server class option.

 

 20151016100301.png

0 Kudos
Message 1 of 10
(4,702 Views)

As far as I know VI references are big rectangles:

VI Ref.PNG

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 10
(4,678 Views)

I think they work the same way. I am just curious where is it from. There is no mark ahead any of its options.

 

20151016104806.png

0 Kudos
Message 3 of 10
(4,663 Views)

Yeah, that is weird. Can you attach the control, or the VI?

 

You can't even cast a Generic reference to a VI reference because they're two different things reference types.

Cast VI Ref.PNG< This throws an error

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 4 of 10
(4,657 Views)

Attached is that part of the vi file. Thank you very much for your help.

0 Kudos
Message 5 of 10
(4,642 Views)

Ah, I'm back in 2014 still, no 2015. Maybe this is something new in 2015?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 10
(4,636 Views)

The code is made in LV 2013, I just copy it to my LV2015.

0 Kudos
Message 7 of 10
(4,633 Views)
Solution
Accepted by topic author Xinghe.W

The only way I know how to create a 'VI' class specifier constant is the following:

 

1. Drop a Class Specifier Constant and select it.

2. Press Ctrl-Space.

3. Type "VI".

4. Press Ctrl-B (the 'VI Server Rename' shortcut in Quick Drop).

 

There may be another way to do it, but this is the only way I know of. This functionality is available in LabVIEW 2010 and later.

Message 8 of 10
(4,625 Views)

That code is from the JKI state machine. OpenG has a "Current VIs Reference" vi that you can use to quickly get the reference.

 

Current VIs Reference.png

Message 9 of 10
(4,621 Views)

Thank you, this solved my problem.

0 Kudos
Message 10 of 10
(4,611 Views)