LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically call a VI in an executable without including it in Source Files or without using a static VI reference

Hii,

I want to call a VI (dyna_x.vi) dynamically in my Main.vi because I want to change the contents of a Strict-Type Cluster(st_c.ctl) used in dyna_x.vi before I call dyna_x.vi thr' referencing(which gets loaded and the updated clusteris available).

This works fine in development.

The issue arises when I build an application. I cannot add the VI to source files because then the dyna_x.vi is loaded which defeats the purpose.
The application now cannot find the dyna_x VI & there is an error?

 

 

the code above is a reference to the  dyna_x.vi .

The probes show the result in Development & EXE.

 

regards,

Akshay

0 Kudos
Message 1 of 16
(303 Views)

Dynamischer Pfad_EXE Fehler.png

0 Kudos
Message 2 of 16
(301 Views)

Seems to me the path is wrong.

 

VI paths change in executables. It will include the executable as folder...

 

Put a Message Box in the code, showing the VI path converted to string. Make sure it is correct. I think it's not. The wrong path is shown in the probe. Note the executable name in the path...

 

"c:\source code\my sub vi.vi" will turn into "c:\builds\my executable\my sub vi.vi", and you use this path to make the dynamic path...

0 Kudos
Message 3 of 16
(280 Views)

You probably want to use the 'Application Folder' function (q.v.) to locate the dynamic VI.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 16
(185 Views)

I've never felt the urge to change a typedef of any kind in the middle of an executing program.  Could you give a brief description of what you are planning?  I'm just curious - always ready to learn something new.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 16
(142 Views)

used Application Folder VI, does not help.

0 Kudos
Message 6 of 16
(116 Views)

Hello Bill,

the issue here is I update the Type def from the Contents of a Folder which has different Config Types as .ini files. So  the tester can change the files  at will before the start of Test depending on the Version number of each DuT,  So he has the ease of not maintaining a .CFG file for any changes.

I hope I make imy Point clear .

0 Kudos
Message 7 of 16
(113 Views)

@aparab wrote:

used Application Folder VI, does not help.


Put a indicator or a MessageBox in your application so you can examine the path that is used.

 

See how it is wrong, and what is needed to fix it..

 

Do you get the same error? Even if the new path is correct, there could be a new error that could be completely unrelated. Maybe even more errors when you fix that one as well...

0 Kudos
Message 8 of 16
(110 Views)

@aparab wrote:

Hello Bill,

the issue here is I update the Type def from the Contents of a Folder which has different Config Types as .ini files. So  the tester can change the files  at will before the start of Test depending on the Version number of each DuT,  So he has the ease of not maintaining a .CFG file for any changes.

I hope I make imy Point clear .


A dynamic enum will only make sense to the dynamically loaded part. The enum will not update in the rest of the program (unless you use variants).

 

I'd usually fall back to rings. The ring's items can actually change dynamically.

0 Kudos
Message 9 of 16
(108 Views)

Hii,

yes I am using a Ring  Strict type, in the Cluster , everything works fime in Dev.

The issue is the EXE  ist be able to load the VI dynamically , I do not include it in Source files for that reason, as it has to load dynamically.

 

lets see,

Thanks Akshay

 

0 Kudos
Message 10 of 16
(102 Views)