Altova MapForce 2025 Enterprise Edition

Application

Home Prev Top Next

The Application interface is the interface to a MapForce application object. It represents the main access point for the MapForce application itself. This interface is the starting point to do any further operations with MapForce or to retrieve or create other MapForce related automation objects. For information about creating an instance the Application object, see Accessing the API.

 

Properties to navigate the object model:

 

Application

Parent

Options

Project

Documents

 

Application status:

 

Visible

Name

Quit

Status

WindowHandle

 

MapForce designs:

 

NewDocument

OpenDocument

OpenURL

ActiveDocument

 

MapForce projects:

 

NewProject

OpenProject

ActiveProject

 

MapForce code generation:

 

HighlightSerializedMarker

 

Global resources:

 

GlobalResourceConfig

GlobalResourceFile

 

Version information:

 

Edition

IsAPISupported

MajorVersion

MinorVersion

 

Properties

Name

Description

ActiveDocument

Read-only.

Returns the automation object of the currently active document. This property returns the same as Documents.ActiveDocument.

ActiveProject

Read-only.

Returns the automation object of the currently active project.

Application

Read-only.

Retrieves the application's top-level object.

Documents

Read-only.

Returns a collection of all currently open documents.

Edition

Read-only.

Returns the edition of the application, e.g. "Altova MapForce Enterprise Edition" for the enterprise edition.

GlobalResourceConfig

Gets or sets the name of the active global resource configuration file. By default, the file is called GlobalResources.xml.

 

The configuration file can be renamed and saved to any location. You can therefore have multiple Global Resources XML files. However, only one of these Global Resources XML File can be active, per application, at one time, and only the definitions contained in this file will be available to the application.

GlobalResourceFile

Gets or sets the global resource definition file. By default, the file is called GlobalResources.xml.

IsAPISupported

Read-only.

Returns true if the API is supported in this version of MapForce.

LibraryImports

Read-only.

Gets a collection of imported libraries. In the MapForce graphical user interface, these correspond to entries from the Manage Libraries window, added at application level.

MajorVersion

Read-only.

Gets the major version number of MapForce. The version is calculated starting from 1998, and is incremented by one every year. For example, the major version is "18" for the release 2016.

MinorVersion

Read-only.

The minor version number of the product, e.g. 2 for 2006 R2 SP1.

Name

Read-only.

The name of the application.

Options

Read-only.

This property gives access to options that configure the generation of code.

Parent

Read-only.

The parent object according to the object model.

ServicePackVersion

Read-only.

The service pack version number of the product, e.g. 1 for 2016 R2 SP1.

Status

Read-only.

The status of the application. It is one of the values of the ENUMApplicationStatus enumeration.

Visible

True if MapForce is displayed on the screen (though it might be covered by other applications or be iconized).

 

False if MapForce is hidden. The default value for MapForce when automatically started due to a request from the automation server Application is false. In all other cases, the property is initialized to true.

 

An application instance that is visible is said to be controlled by the user (and possibly by clients connected via the automation interface). It will only shut down due to an explicit user request. To shut down an application instance, set its visibility to false and clear all references to this instance within your program. The application instance will shut down automatically when no further COM clients are holding references to it.

WindowHandle

Read-only.

Retrieves the application's Window Handle.

 

Methods

Name

Description

HighlightSerializedMarker

Use this method to highlight a location in a mapping file that has been previously serialized. If the corresponding document has not already been loaded, it will be loaded first. See Document.GenerateCodeEx for a method to retrieve a serialized marker.

NewDocument

Creates a new empty document. The newly opened document becomes the ActiveDocument. This method is a shortened form of Documents.NewDocument.

NewProject

Creates a new empty project. The current project is closed. The new project is accessible under ActiveProject.

NewWebServiceProject

Creates a new empty Web Service project. The new project is accessible under ActiveProject. This method is available in MapForce Enterprise Edition only.

OpenDocument

Loads a previously saved document file and continues working on it. The newly opened document becomes the ActiveDocument. This method is a shorter form of Documents.OpenDocument.

OpenProject

Opens an existing Mapforce project (*.mfp). The current project is closed. The newly opened project is accessible under ActiveProject.

OpenURL

Loads a previously saved document file from an URL location. Allows user name and password to be supplied.

Quit

Disconnects from MapForce to allow the application to shutdown. Calling this method is optional since MapForce keeps track of all external COM connections and automatically recognizes a disconnection. For more information on automatic shutdown see the Visible property.

 

Events

Name

Description

OnDocumentOpened

This event is triggered when an existing or new document is opened. The corresponding close event is Document.OnDocumentClosed.

OnProjectOpened

This event is triggered when an existing or new project is loaded into the application. The corresponding close event is Project.OnProjectClosed.

OnShutdown

This event is triggered when the application is shutting down.

© 2018-2024 Altova GmbH