05-09-2023 03:35 AM
Hello everyone!!!
I'm trying to clone the vi but this vi is working in project without error.
But its showing invalid reference in exe.
vi calling in main
clone vi
error in exe
vi which has to be cloned
Solved! Go to Solution.
05-09-2023 07:10 AM
This happens because the vi path is different in the exe. You may use a Static Vi Reference (Application Control palette) of READ INI.vi. Wire the reference to a Property Node and use the Vi Path property to get a path valid for both IDE and exe.
05-09-2023 09:22 AM
Thanks for your support.
can check out this is correct has you mentioned said???
I need to use this clone sub vi to clone multiple vi other Caseses also.
05-09-2023 09:39 AM
Why do you need that VI to be cloned? It will be done really fast. Just call the VI normally. The only VIs that should really be ran asynchronously are "Actors" (DQMH modules, Queued Message Handlers, other GUI VIs that need dynamically loaded into subpanels).
05-09-2023 12:22 PM
Thankyou crossrulz
Actually, the original vi which I to clone is contains data that cannot be disclosed, I had tried the same patten here.
The original vi has tcp communication with 3rd parity device, where I'm using few function pallets like Que, notifiers etc.
The vi has communicate with more device with different IP and I have to give different unique name for those Que and notifier so I'm trying to clone the vi.
Now I found that I'm getting error open reference (vi broken or vi location been moved) again this error only exe not in project file.
Hope you understood.
05-09-2023 03:00 PM
I think this is what @Pincpanter was suggesting to you. The code below uses Start Asynchronous Call to start a Modal Dialog VI that displays an Error Message for 5-10 seconds, then stops itself.
The VI to be "spawned" is "Show Error Message", held in a Static VI Reference. The red Star on the Reference means I've specified it as "Strictly Typed", as that is required by Start Asyncrhonous. You can see it wired to the Property Node and the Path property being used to generate the proper "path" for the Open VI Reference. The "magic" comes that this exact same code works both in the Development environment (when you are testing the code) and in the Executable environment (when your customer is running the code as an Executable).
Bob Schor
05-10-2023 12:31 AM
Please review the attached code which works in project not in exe. (Main vi)
IN exe its showing error 1003 not in project development area. I have cross check the path also.
Please guide me to solve that error.
05-10-2023 02:55 AM
@arunachalmarun wrote:
Please review the attached code which works in project not in exe. (Main vi)
IN exe its showing error 1003 not in project development area. I have cross check the path also.
Please guide me to solve that error.
If you do as Bob showed above and send in a static VI ref instead of the name as string it'll work.
05-10-2023 05:45 AM
Hi Yamaeda.
I'm new to the LabVIEW programming. I'm not getting your point could please explain.
05-10-2023 06:01 AM - edited 05-10-2023 06:04 AM
@arunachalmarun wrote:
Hi Yamaeda.
I'm new to the LabVIEW programming. I'm not getting your point could please explain.
In your Clone.vi you send in the vi name and then try to build a path that you open. If you instead place a Static VI reference and drop the target vi in that, you can do as Bob showed above.
It'd also be nice if you added an Icon to Clone, TCP and Process so the code is clearer.