USA: +1-866-806-2068 ( Toll-free )

UK: +44-203-1292-513

OpenLM open API

Implementing OpenLM Open API


Add reference to the OpenLM extension dll (OpenLM_Extension.dll) in your favorite IDE.

Implementation of the following interface is required: IOpenLMExtension that contains 4 functions:

DocumentPath - Return the open document's path. This allows OpenLM to know which document the user is editing.
MainWindowHandler - Return the main application's windows handler. This allows OpenLM to know when the application is not active.
ProductsList - Return the full product list the software is using. This is always the product and sometime there may also be some extensions.
ShutDown - Shutdown the software while saving open documents as instructed by the function's args parameter. This allows OpenLM to save and close the software when it is necessary.

When initiating the application add the following lines:


OpenLM_Extension_Sample
worker = new OpenLM_Extension_Sample();
ExtensionBase ext = new ExtensionBase(worker);
Sample code for implementing IOprnLMExtension:

using System;
using System.Collections.Generic;
using System.Text;
using GlobalMaps.OpenLM.Extension;

namespace DeveloperSamples
{
public class OpenLM_Extension_Sample : IOpenLMExtension
{
#region IOpenLMExtension Members

public string DocumentPath
{
get
{
// Path of current document
return (@"c:\tests\doc.txt");
}
}

public IntPtr MainWindowHandler
{
get
{
// Handler to main window
return this.MainWindowHandler;
}
}

public string[] ProductsList
{
get
{
// return list of produts in use by this software
return("notepad".Split(" ".ToCharArray()));
}
}

public bool ShutDown(GlobalMaps.OpenLM.Extension.OpenLM_EventArgs.ShutdownEventArgs args)
{
if (args.OvderrideExistingProject)
{
// TODO: Save the project
}
else
{
string tempPath = args.TemporaryProjectsLocation;
// TODO: Save to temporary path
}

// TODO: return true only if Successful
return true;
}

#endregion
}
}

Implementing OpenLM in software products that do not support customization

While we can not implement OpenLM inside a software product that does not support customization, we can implement an external executable program who will be able to handle it externally. OpenLM functions will be implemented in the external program and it will perform the actions on the product.
While it is technically possible, this kind of implementation is less reliable and more complex to accomplish.

Summary


OpenLM Open API provide developers with the opportunity to develop extensions in order to support OpenLM functionality in other products. The implementation of OpenLM API is relatively simple, however the work that needs to be done inside the product could be very complex.
OpenLM team is always happy to support you in your in your efforts, please contact us using the support form or in any other way (contact form, email, phone). We are here for you at any stage of your work.