Guten Morgen,
ja, man kann auch von aussen via COM auf die zenon API zugreifen.
Dafür muss man die zenrt32.tlb (aus dem zenon Programmverzeichnis) als Referenz in den Code einbinden.
Dann kann man sich z.b. via
//get zenon reference and exit if not sucessful
try
{
zApplication = Marshal.GetActiveObject("zenOn.Application") as zenOn.Application;
}
catch (Exception ex)
{
writeConsoleStatusMessage("Error: cannot find zenon runtime! Start zenon runtime before using this application.");
Environment.Exit(0);
}
if (zApplication == null)
{
writeConsoleStatusMessage("Error: cannot find zenon runtime! Start zenon runtime before using this application.");
Environment.Exit(0);
}
eine Referenz auf die zenon Runtime holen und dann entsprechend zugreifen.
Was ist der geplante Anwendungsfall dafür?
Hier ist noch ein link zu einem Blogpost zu dem Thema generell:
http://blog.copadata.at/wp/in-or-out...n-application/
Schöne Grüße,
Felix