08-14-2023 06:45 AM
Hallo,
I have a programme which takes data from an MME File and along with a graph, is copied to an excel template. Pictures are attached. The programme works fine and the graph and values are correctly copied during VI Execution. But when i convert into an .exe file, the data is copied, but the picture is not being copied. Can someone help me regarding this? I am attaching the code too.
Solved! Go to Solution.
08-14-2023 07:14 AM
Hi Speedy,
@Speedyindian1 wrote:
I have a programme which takes data from an MME File and along with a graph, is copied to an excel template. Pictures are attached. The programme works fine and the graph and values are correctly copied during VI Execution. But when i convert into an .exe file, the data is copied, but the picture is not being copied.
You are using the "App Dir" file constant: are you sure your exe has proper access right in this folder?
08-14-2023 07:18 AM
Hi Gerd,
umm, I am sorry, but i am not quite sure what you mean by it. Can you explain it to me?
08-14-2023 07:43 AM
Hi Speedy,
@Speedyindian1 wrote:
Hi Gerd,
umm, I am sorry, but i am not quite sure what you mean by it. Can you explain it to me?
When I open the block diagram the first item you see is a AppDir file constant, that's what triggered my response.
Now that I scrolled up to the RGT code blob I see that you forgot to handle errors completely. How do you know any of those functions runs as expected without errors?
Also the file handling in the first frame to convert a BMP image to PNG completely misses error handling: I don't think the path "Desktop" is a valid path to write a PNG file…
08-14-2023 07:50 AM
Thanks for the Clarification Gerd. The Programme is working fine. I dont understand why the picture is not being copied during the running of .exe file. Can you suggest the changes which i should do, so that it works?
08-14-2023 08:12 AM
08-14-2023 12:20 PM
@Speedyindian1 wrote:
Thanks for the Clarification Gerd. The Programme is working fine. I dont understand why the picture is not being copied during the running of .exe file. Can you suggest the changes which i should do, so that it works?
Apparently it is not "running fine" because it's not doing what it is supposed to be doing. I think what knowledge might be missing is that, by default, an executable has auto error handling turned OFF so any errors that you don't explicitly handle are going to be swallowed. That is why GerdW suggested that you should implement error handling.
08-17-2023 03:49 AM
Thank you for your Replies. I added the error handling and also added Excel Dynamic VI in the dependencies and added it in "Always Included". Now it is working. The picture is also being Copied.