From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-01-2008 02:38 AM
tca-adam wrote:....
Any clues to what this could be? I was wondering if it had to do with the NET references not being closed as someone else had stated earlier in this thread.
thanks.
Yes, I assume that not closing the refnums will cause this.
Have you tried closing the refereces?
Ton
12-01-2008 01:59 PM
tca-adam,
I concur with TonP. It sounds like there is a reference left open somewhere. I would suggest stepping through your code with Highlight Execution on and see where the code breaks then look around that area.
12-01-2008 06:11 PM - edited 12-01-2008 06:11 PM
The VI as it is, runs fine.
Where the problem happens is when you loop it, as it appears to keep the file open that you have used as an attachment.
eg I want to record data every 5 mins and then once an hour email the results saved in a spreadsheet file. First iteration works fine, then after that I get this error:
Error 5 occurred at Open/Create/Replace File in Write Spreadsheet String.vi->Write To Spreadsheet File (DBL).vi->gmail loop.vi
Possible reason(s):
LabVIEW: File already open.
C:\Temp\atw.txt
Error 1172 occurred at Constructor Node in Gmail.vi->gmail loop.vi
Possible reason(s):
LabVIEW: A .NET exception occurred.
There appears to be a number of .NET references open in this VI (eg MailAddress, MailMessage, Attachment, AttachmentCollection etc). Do I need to close all these references, or can I close just one to cover them all?
12-02-2008 01:02 AM
tca-adam wrote:There appears to be a number of .NET references open in this VI (eg MailAddress, MailMessage, Attachment, AttachmentCollection etc). Do I need to close all these references, or can I close just one to cover them all?Message Edited by tca-adam on 12-02-2008 11:11 AM
Yes, close them all in reverse order, first close the reference last opened.
Ton
12-02-2008 05:11 AM
12-02-2008 06:14 AM
Eriquito wrote:
Yes.. I threw that example together rather hurredly when I made it. I believe that LaVIEW automatically closes the .NET references when the program completes,
LabVIEW will close those references once the VI (or even LabVIEW) is fully removed from memory...
Ton
12-03-2008 07:53 AM
12-03-2008 08:20 AM
You can send to multiple "To" recipients by using MailMessage(String from, String to) instead of MailMessage(). You can then comma separate the addresses.
12-06-2008 05:24 PM
Has anyone had any luck closing the appropriate references so that you can access an attachement file after the email is sent? I've tried closing the references but must be doing something wrong...I still can't move the file after it's been accessed by the VI...the system thinks it's still in use.
12-06-2008 06:20 PM
Minitor,
When you embed images in your e-mail, you must actually attach the images then submit the e-mail. Then you can go back and edit the message and insert the images into the body of the message. As you have it now, your images are pointing to a temporary location on the NI website which was created when you previewed your e-mail. You must submit the message first so that you can get the permanent message ID number on the website. Then when you insert the images after that, they links point to the permanent location on the NI website.