LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1026 invalid reference at runVI invoke method in main exe->subVI->subpanel

Solved!
Go to solution

Hello,

I have a main VI which have subVI's inside case structures set up to show FP when called and be modal.

These subVIs have a subpanel that will pull up a dynamicVI using RunVI invoke method.The dymaicVIs path is built using application directory constant+the VI name to the invoke method.

now the main VI is built into exe with the dynamicVIs in always included list. 

when i run the main exe i am getting 1026 error VI reference invalid. 

 

Plz help

Thanks

0 Kudos
Message 1 of 7
(10,999 Views)

Hi Freemason,

 

The problem could be coming from the use of relative paths, because the path can sometimes change when building an application. Double check to make sure they are calling the right path. You can also try changing the AutoDispose Refnum in your run VI invoke node to false. It is one of the methods you can select in your run VI invoke node. If neither of these solutions work, run your code using the highlight execution function. If you implemented error handling in your program, you should be able to see the source of the error.

 

If you’re still having issues, could you post some screenshots or your actual VI? I may be able to get a better idea of the issue that way. I’ve also attached an example VI that uses multiple subVIs and a subpanel for reference.  Hope this helps.

Paul C
0 Kudos
Message 2 of 7
(10,953 Views)

it got fixed when 8.2 layout is enabled in the advanced tab.

what is the non 8.2 layout ? how is it different in its structure that it pops up the error.

 

Thnks for your help, appreciate it

0 Kudos
Message 3 of 7
(10,947 Views)

I'm not sure I fully understand exactly what you did. Which advanced tab did you find the 8.2 enable in?

Paul C
0 Kudos
Message 4 of 7
(10,920 Views)
Solution
Accepted by topic author freemason

Choosing the 8.X file layout will change the path that your referenced VIs are located when you build your executable.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/referencing_files_in_applications/

 

If you choose that layout option you will just reference the vi you are calling where having the option unselected will mimic your file structure layout as it is in development.

Matt J | National Instruments | CLA
0 Kudos
Message 5 of 7
(10,908 Views)

i am curious to know in what situations the non 8.2 layout is a benefit to me if the exe is built and the VIs are not accessible ? should the internal file stucture matter to me?

0 Kudos
Message 6 of 7
(10,894 Views)

The purpose of the 8.x layout is to help with creating correct file paths. It organizes the source files in your directory in one place. The internal file structure won't make a difference to your overall code. You won't see a huge benefit by always running in the 8.x layout, it is just there as a tool to make sure everything is where it needs to be. Hope this helps.

Paul C
0 Kudos
Message 7 of 7
(10,835 Views)