This project is read-only.

ATTENTION! This project is now hosted on google code so please follow this link below from now on for the latest source as this site will not be maintained.

The Mapinfo .NET OLE Wrapper

The Mapinfo .NET OLE Wrapper project aims to act as a type safe wrapper around common commands needed when working with Mapinfo Professional OLE.

A bit of background

I started on this project about 6 months ago to aid my efforts when I was working with Mapinfo OLE and .NET together. Mapinfo's COM object only exposes two commands Do and Eval which only accept and return strings. After coding a few applications that used Mapinfo COM I realised that a lot of errors where being made with incorrectly formated strings and/or spelling mistakes which due to Mapinfo's error handling where very hard to track down and debug., and so the Mapinfo .NET OLE Wrapper was born.

As Pitney Bowes Mapinfo Professional 9.5 has the ability to call .NET methods from a Mapbasic program which has complied using Mapbasic 9.5, and .NET becomes increasing popular with the Mapinfo developer community, this wrapper will hopefully provide a nice type safe environment for those new and old to the Mapinfo automation world.

This project also aims to aid people who can't afford/or do not wish to purchase Mapxtreme but who would rather stay using Mapinfo but still achieve small tasks of automation in .Net without to much fuss.

Check out the quick start for a quick run down.


  • Provides type safe access to common Mapinfo OLE commands.
  • Can be used with any version of Mapinfo.
  • Allows users to easily automate Mapinfo without sending hundreds of string commands.
  • Makes your code look cleaner, no more String.Format just to add values to a Mapbasic command.
  • Allows for easier debugging of Mapinfo OLE applications.
  • Now has basic implementation of a LINQ provider for Mapinfo:

LINQ Example
  • A LINQ query like this:
  • Will generate this Mapinfo query string:
        SELECT * FROM Lines 
        WHERE Road = "Test Road Name" OR 
                    CENTROIDX(obj) = CENTROIDX(CREATEPOINT(507288.24,10002958.9)) AND 
                    CENTROIDY(obj) = CENTROIDY(CREATEPOINT(507288.24,10002958.9)) 
        INTO WrapperTempTable
  • Result will look like this:

More Info

  • Some code examples with and without the wrapper can be found on the examples page.
  • A current class diagram can be found on the design page

Last edited Jun 15, 2009 at 10:59 AM by Madmanwoo, version 39