Difficulties with COM interop

47 views
Skip to first unread message

Steve Tyber

unread,
Apr 27, 2013, 5:10:45 PM4/27/13
to or-tools...@googlegroups.com
I have been working on a project using a combination of C# and Excel that uses Google OR Tools.I am using VBA to feed information from an Excel spreadsheet into a representation of my problem data using C#. By capturing an internal representation of the problem in C#, it's easy to swap out solvers and data sources. For now, Excel is serving as a front-end that will allow a user to tweak problem parameters and observe the impact on optimal solutions.

Things get funky when I try to interact with the solver using VBA. When it was just my internal data model, I could get VBA to talk with my C# library. The moment I try to instantiate the LP solver with Google OR Tools, VBA spits out an error: "Automation error: the system cannot find the file specified." If I comment that line out, it runs just fine again.

The C# libraries work well on their own. I have a small program that populates the object model and constructs and solves the resulting MIP, so I think something might need to be COM accessible that isn't.

I'm pretty new to all of this stuff, so I really don't have a great idea of where to start. Thanks in advance for the help.

CK CK

unread,
Oct 12, 2023, 3:10:58 PM10/12/23
to or-tools-discuss
Hi, Steve.
Have you found the best way to call ORtools from VBA?

воскресенье, 28 апреля 2013 г. в 01:10:45 UTC+4, Steve Tyber:
Reply all
Reply to author
Forward
0 new messages