I am working at a facility that has some 500+ workstations running the CAD software CATIA, developing automation tools in VB .net. We have a fundamental problem getting the correct CATIA application object when there is more than one session running on a workstation. The “GetObject” method will always return the first running instance of the application. What I am looking for is a way to pass the application object from a VBA running within the CATIA application to an external VB .net application.
I do not wish to register my VB .net application in the COM because that would compromise my ability to dynamically make changes. In my current arrangement, I only have admin privileges on my development machines. Revisions would have to be coordinated with our IT department at a frequency about once a month.
A few of the ideas I am toying with include:
1) Passing a pointer to the memory location of the application object created by VBA as some sort of converted command line argument. (Could use COM object created in C# or C++ in Visual Studio but have no real experience with these languages. And really, should I?)
2) Creating a .net COM object to fire a new .exe process and pass the application object. (.net to .net - but I still don’t know how to do this.)
3) A different route would be to have a .net application fire off the CATIA application using "CreateObject." But I still have the issue of passing off the CATIA application object to other .net applications on demand.
As you can see I am considering desperate means to achieve my goal and would welcome any ideas on how to either make these methods or any other methods work. I’m really hoping someone will have a much simpler more direct process – even if the dope slap would sting a bit.