LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relative path in exe

I am running Labview 2011 p1. Within my project I load classes dynamically out of my exe file for quite a while now.

Yesterday, although I haven't changed anything in the part of the code, it stopped working showing me the error 7. It took me quite a while to figure out the reason:

My project resides in c:\users\username\Desktop\abc\xyz

The source of the class I load resides in c:\users\username\Desktop\abc\xyz\classes\class

Up to now I always loaded the class using the following path c:\..\executable.exe\classes\class\class.lvclass

But now I need to load the class with the following path: c:\..\executable.exe\Desktop\abc\xyz\classes\class\class.lvclass

 

I am not aware of any change I made nor is it clear to me why the new relative path is chosen.

 

Any clues?

0 Kudos
Message 1 of 3
(2,740 Views)

Hi

 

please refer to the knowledge base article:

 

http://digital.ni.com/public.nsf/allkb/EEE8A5650DAC28558625762F0070A384

 

so, it should have always worked with the new path you are using " c:\..\executable.exe\Desktop\abc\xyz\classes\class\class.lvclass".

i am not sure how it worked with the "c:\..\executable.exe\classes\class\class.lvclass".

 

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 2 of 3
(2,719 Views)

Hi

 

thanks for the quick answer. Unfortunately I still don't understand it. Maybe you could give me some further explanation.

 

In the example

C:\AAA\Main.vi
C:\BBB\Second.vi

 

translates to

C:\Application.exe\AAA\Main.vi
C:\Application.exe\BBB\Second.vi

 

As far as I understand it LV uses a relative path to a common folder. In our case it would be C:\

But what happens in the following case?

C:\YYY\ZZZ\AAA\Main.vi

C:\YYY\ZZZ\BBB\Second.vi

 

Up to now I thought it would still translate to

C:\Application.exe\AAA\Main.vi

C:\Application.exe\BBB\Second.vi

 

However, in my case it seems to translate to

C:\Application.exe\ZZZ\AAA\Main.vi

C:\Application.exe\ZZZ\BBB\Second.vi

 
But if that is the case, why doesn't it translate to

C:\Application.exe\YYY\ZZZ\AAA\Main.vi

C:\Application.exe\YYY\ZZZ\BBB\Second.vi

 

or in my case e.g. to

c:\..\executable.exe\Users\username\Desktop\abc\xyz\classes\class\class.lvclass

 
It seems rather arbitrary to me.

 

 

 

 

 

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