Invoking COM objects or .NET assemblies

Hello.

Is it possible, through scripting, instantiate and invoke COM (Component Object Model) objects or (better) .NET assemblies?
If yes, does someone have some examples?

Of course: these are MS Windows specific platform features but our customer uses only MS.

Thanks in advance.

This won’t be possible through scripting, but you could probably develop a module that let you interact with the COM objects or .NET assemblies, assuming you can find a Java library that actually works and lets you do what you need to do.

Hello.

Thanks so much for your tip.
I’ve found one working solution, using the JACOB package; see http://sourceforge.net/projects/jacob-project/
After install it in the JRE folder, you can invoke COM objects directly inside the Ignition scripting.

Here an example.

[color=#FF00FF]import [/color]com.jacob.activeX.ActiveXComponent;
[color=#FF00FF]import [/color]com.jacob.com.Dispatch;
[color=#FF00FF]import [/color]com.jacob.com.LibraryLoader;
[color=#FF00FF]import [/color]com.jacob.com.Variant;

myObj = com.jacob.activeX.ActiveXComponent("[color=#0000FF]MyProgrId[/color]")

param1 = com.jacob.com.Variant("[color=#0000FF]MyParam1[/color]")
param2 = com.jacob.com.Variant("[color=#0000FF]MyParam2[/color]")
param3 = com.jacob.com.Variant("[color=#0000FF]MyParam3[/color]")

myObj.invoke("[color=#0000FF]MyMethod[/color]", [MyParam1, MyParam2, MyParam3])

Regards.