Hallo,
At the moment I'm trying to build an easy Aras11 Filedownloader using c# and Visual Studio 2012.
I'm trying to use IOM Version 11. But when I run the programm I get the System.io.FileNotFoundException concerning Aras.net. But when I use version 9 of IOM.dll it works.
This is my Code :
static void Main(string[] args)
{
Aras.IOM.HttpServerConnection MyConnection;
Aras.IOM.Innovator MyInnovator;
String url = "http://***.***.***.*.***/InnovatorServer/";
String db = "InnovatorSolutions";
String user = "Admin";
String password = "innovator";
Aras.IOM.Item login_result;
Console.WriteLine("Aras Innovator Filedownloader!");
try
{
MyConnection = IomFactory.CreateHttpServerConnection(url, db, user, password);
Console.WriteLine("HTTPSerververbindung hergestellt");
login_result = MyConnection.Login();
MyInnovator = new Aras.IOM.Innovator(MyConnection);
Console.WriteLine("Downloading Files");
Item myfiles = MyInnovator.newItem("File", "get");
Item result1 = myfiles.apply();
Item files = result1.getItemsByXPath("//Item[@type='File']");
for (int i = 0; i < files.getItemCount(); i++)
{
Item file = files.getItemByIndex(i);
try
{
Console.WriteLine(file.getFileName() + "\n");
file.lockItem();
file.checkout("C:\\Test\\Ausgabe\\");
}
catch (System.Exception EX)
{
Console.WriteLine(EX.ToString());
}
}
MyConnection.Logout();
}
catch (System.Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
Any help would be apprechiated!!!