Database Export in a path dynamic - value in a Tag

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
andrea
Posts: 72
Joined: Tue Dec 11, 2012 5:44 am

Database Export in a path dynamic - value in a Tag

Post by andrea »

Hello,

I ask you if with internal function Database Export (image attached) is possible to set a patch, for example an external USB memory stick but with the last directory variable keeping the name from the value in a tag.

Thank you

Andrea
Attachments
iXDatabaseExport.png
iXDatabaseExport.png (18.08 KiB) Viewed 8921 times

andrea
Posts: 72
Joined: Tue Dec 11, 2012 5:44 am

Re: Database Export in a path dynamic - value in a Tag

Post by andrea »

For export the recipe I found and tried this code and seems ok

Globals.Recipe1.ExportRecipe("Recipe1.csv",@"K:\Test06092013\" + Globals.Tags.Gestione_Ticket_Number.Value.ToString() ,true);

What about similar code for AuditTrail, AlarmServer and so on?

Thank you

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Database Export in a path dynamic - value in a Tag

Post by mark.monroe »

You will need to query those databases and save the data to a file yourself if you want to change the export path. There is a forum post with a script example on how to query a database in iX Dev. The Script_Database_Export.zip example in the other forum post will show you how to do that. Both AuditTrail and AlarmServer data is stored in a database and you can query those database the same way you query the datalogger database. You can use the Database viewer in iX Developer to find out what the database tables are named.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply