AnsweredAssumed Answered

Calling ProcessBook display macro from C# .Net Add-In

Question asked by sFung on Aug 9, 2017
Latest reply on Aug 31, 2017 by sFung

I'm working on converting an old VB6 ProcessBook add-in to C#.Net.  One of the problems I ran into is that the add-in works closely with a specific display, where it calls specific functions in the display VBA code.  In VB, I can just cast the display to Object and call the function like this:

Dim o as Object

set o = application.ActiveDisplay

o.someFunctionDefinedInDisplay

 

but I can't seem to find a way in C#.  I tried doing the following, but it's giving me an error saying method not found (I tried it on standard Display functions too, and it gave me the same thing):

Type myType = typeof(PBObjLib.Display);

myType.GetMethod("someFunctionDefinedInDisplay").Invoke(null, someArgs);

 

any ideas?

Outcomes