LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Picture not copied in .exe file

Solved!
Go to solution

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.

0 Kudos
Message 1 of 8
(1,186 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,171 Views)

Hi Gerd,

umm, I am sorry, but i am not quite sure what you mean by it. Can you explain it to me?

0 Kudos
Message 3 of 8
(1,164 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,138 Views)

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?

0 Kudos
Message 5 of 8
(1,133 Views)
Solution
Accepted by topic author Speedyindian1

Hi Speedy,

 

as said before: implement error handling to make sure there either is no error or there is a specific error!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,122 Views)

@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.

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 7 of 8
(1,100 Views)

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.

0 Kudos
Message 8 of 8
(1,061 Views)