Dear Mark, thank You looking into my code. In the example code for sending emails, written for previous version iX Developer there are comments:
// Be very careful if you decide to use this code!
// The IEmailSenderService is an internal service, and can change
// between versions of iX Developer!
// There will be a safe API for functions like this in future releases.
IEmailSenderService emailSenderService = Globals.GetService<IEmailSenderService>();
// If the service was not found, abort and send an error message.
if (emailSenderService == null)
return STR_NoEmailSenderService;
The person, who wrote this comment already knew, that some problem would be expected, when upgrading the iX Developer.
As I understand, the problem is not with my code, but with the iX Developer.
Is it possible to write an example code for email sending with an *.csv file (with "Hello world" and some tags inside), specially for iX Developer V2.0?
Regards, Waldemar
Program does not work after iX developer was upgrade to V2.0
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Program does not work after iX developer was upgrade to
For an example on how to attach and send email with iX 2.0, see the Script_email included with iX 2.0.
The MailScriptModule in version 1.31 and version 2.0 of the Script_email sample project are identical. Indicating that nothing has changed regarding how your interact with the IEmailSenderService between version 2.0 and version 1.31 of the application.
The MailScriptModule in version 1.31 and version 2.0 of the Script_email sample project are identical. Indicating that nothing has changed regarding how your interact with the IEmailSenderService between version 2.0 and version 1.31 of the application.
- Attachments
-
- Snap 2012-09-21 at 08.02.15.png (81.91 KiB) Viewed 15538 times
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Program does not work after iX developer was upgrade to
Thank You Mark. As I understand, the only solution at the time being, is to uninstall version 2.0?
It works fine with the iX Developer version 1.3.
By the way, did You test the example with the version 2.0?
Regards, Waldemar
It works fine with the iX Developer version 1.3.
By the way, did You test the example with the version 2.0?
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Program does not work after iX developer was upgrade to
When I run your project on my PC using 2.0, the first error that comes up when I press send says that it can not find file 'Twister 0 0 200 0h 0m.csv'. If I manually make that file and then press send, it works.
You are querying a table named TrendDatalogger1 and that table does not exist. You are not logging the exception that this causes, simply throwing the error away. That is why when you use try/catch blocks you should log the errors that are caught.
Change the table you are querying to Datalogger1 and your issue is fixed.
You are querying a table named TrendDatalogger1 and that table does not exist. You are not logging the exception that this causes, simply throwing the error away. That is why when you use try/catch blocks you should log the errors that are caught.
Change the table you are querying to Datalogger1 and your issue is fixed.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Program does not work after iX developer was upgrade to
Thank You Mark for very valuable information.
As I guess, the reason for failure is, that some sources available in iX Developer 1.3, are not included in version 2.0.
I started programming with an example script ExportTrend Data, which is missing in version 2.0 (why?). The table name: "TrendDatalogger1" was copied from the example. When I change table name, the program stops working on V1.3 as well.
Im my project, in the folder BuildFiles I found automatically generated file TrendDatalogger1.cs. How and from which code this file was created?
How can I change the table name "TrendDatalogger1" in the version 1.3?
What should i add or change in the version 2.0 to get it working with the existing table name?
Regards, Waldemar
As I guess, the reason for failure is, that some sources available in iX Developer 1.3, are not included in version 2.0.
I started programming with an example script ExportTrend Data, which is missing in version 2.0 (why?). The table name: "TrendDatalogger1" was copied from the example. When I change table name, the program stops working on V1.3 as well.
Im my project, in the folder BuildFiles I found automatically generated file TrendDatalogger1.cs. How and from which code this file was created?
How can I change the table name "TrendDatalogger1" in the version 1.3?
What should i add or change in the version 2.0 to get it working with the existing table name?
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Program does not work after iX developer was upgrade to
Please read the last line of my previous post. It tells you to change the TrendDatalogger1 table name to Datalogger1 in your script code.
Use the DatabaseViewer.exe located in '\iX Developer 2.0.356\Bin\' to look at the tables you have in your Database.sdf file. Which is located in your project folder under "ProjectName\Temp\Output\".
Use the DatabaseViewer.exe located in '\iX Developer 2.0.356\Bin\' to look at the tables you have in your Database.sdf file. Which is located in your project folder under "ProjectName\Temp\Output\".
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Program does not work after iX developer was upgrade to
Thank you Mark. Before moving back to V2.0, I would like to clarify some questions. After run DatabaseViewer got NEO_SYSTEMTABLE and UV_setting. Could not find anything like TrendDatalogger1 or Datalogger1.
Where they are?
Found some tutorial about SQL. If a table was created, some code like :
DataTable table1 = new DataTable("Datalogger1");
should be used (is this correct?).
But, the Notepad+ did not find any words like DataTable in my project.
How tables are created in the iX Developer?
regards, Waldemar
Where they are?
Found some tutorial about SQL. If a table was created, some code like :
DataTable table1 = new DataTable("Datalogger1");
should be used (is this correct?).
But, the Notepad+ did not find any words like DataTable in my project.
How tables are created in the iX Developer?
regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Program does not work after iX developer was upgrade to
The name of your datalogger in iX developer is the name of the datalogger in the database. I added a testdatalogger to the project you sent me. And you can see it appear in the database. If you do not have a datalogger in your project or your project has not been executed, then the table might not have been created yet.
Yes, you could add tables to the database yourself, but iX does it for you. iX has many libraries and dll's that you can not search and the code that creates the database could be in there.
Yes, you could add tables to the database yourself, but iX does it for you. iX has many libraries and dll's that you can not search and the code that creates the database could be in there.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Program does not work after iX developer was upgrade to
Thank You Mark. It works fine.
Regards,. Waldemar
Regards,. Waldemar