# Invoking COM objects or .NET assemblies

**URL:** <https://forum.inductiveautomation.com/t/invoking-com-objects-or-net-assemblies/9484>\
**Category:** Ignition\
**Created:** [December 24, 2014, 1:34pm UTC](https://forum.inductiveautomation.com/t/invoking-com-objects-or-net-assemblies/9484 "2014-12-24T13:34:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Didi71](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@Didi71](https://forum.inductiveautomation.com/u/Didi71)\
**Post date:** [December 24, 2014, 1:34pm UTC](https://forum.inductiveautomation.com/t/invoking-com-objects-or-net-assemblies/9484/1 "2014-12-24T13:34:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 5, 2015, 6:29pm UTC](https://forum.inductiveautomation.com/t/invoking-com-objects-or-net-assemblies/9484/2 "2015-01-05T18:29:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Didi71](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@Didi71](https://forum.inductiveautomation.com/u/Didi71)\
**Post date:** [January 9, 2015, 10:23am UTC](https://forum.inductiveautomation.com/t/invoking-com-objects-or-net-assemblies/9484/3 "2015-01-09T10:23:33Z")

</div>

Hello.

Thanks so much for your tip.  
I’ve found one working solution, using the JACOB package; see [http://sourceforge.net/projects/jacob-project/](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.
