Automating Data Imports

In addition to using the MPM interface for importing data it is also possible to automate the import process outside of MPM using customer developed code and the MPM Importer dynamic link library (dll), MPMImporter.dll.

The MPMImporter dll provides a programming interface between customer or 3rd party software and the various MPM import modules. Any language capable of accessing Microsoft Active X objects can be used. Visual Basic, Visual C, C++ and other object oriented languages are excellent candidates.

Potential uses and advantages of the MPMImporter dll include:

Requirements

Use of the MPM Importer is considered an advanced operation and should only be attempted by someone with a sound background in programming Microsoft COM objects.

The MPMImporter DLL is preinstalled with the MPM executable files. In order to interact correctly with the MPM import modules it must remain in this directory.

Any programming language which can call and set Microsoft COM object properties and methods may be used to develop the customer's interface. Visual Basic, Visual C, C++ are typical languages.

MPMImporter only provides a direct link to the various MPM import dlls. Your application, in addition to calling this dll must provide the following:

Sample Code Example

To use the MPMImporter, client software will instantiate an instance of the MPMImporter class, assign values to the instantiated object's properties and execute its single method, Process.

Failure of records to be successfully imported is handled by the appropriate import module and reported in the Report File.

The following sample code written in Microsoft Visual Basic executes a WBS Schedule import:

Dim MPMObject as Object

Set MPMObject =CreateObject("MPMImporter.cImporter")

With MpmObject

.UserName = "Bob"

.ProjectorGlobal = "SVIIBL3"

.Datapath = "C:\DELTEKMPM"

.ImportFileName = "A:\Oct Schedule.csv"

.ReportFileName = "C:\DELTEKMPM\Results\Results.txt"

.ImportCategory = 2       

'WBS Schedule

.Options = "25-Sep-97,E,N,L,N,N"

End With

MpmObject.Process

 

The code above creates an instance of the MPMImporter class, sets its properties according to the specific import desired and executes the import by calling the Process method.

Typically the user will imbed the above code in an application which might provide for a user interface to select import type and set options, as well as display import results. Alternately the same code might be used within a fully automated application which creates the import data from an external source, schedules the import, and sends the import result to an administrator.

Common Properties

The following properties are common to all import categories:

Property

Data Type

Description

Example

ProjectorGlobal

String

MPM Project or Global Name

SVIIBL3, DEFAULT

UserName

String

Valid 8 character MPM user name

Sysadmin, Bob, Frank

DataPath

String

Data path to MPM executable files

C:\DELTEKMPM

ReportFileName

String

Name and path of file to store import module result information

C:\DELTEKMPM\Importinfo\

Results.txt

ImportCategory

Integer

Specifies type of import

1 — WBS Description

2 — WBS Schedule

3 — Estimates

4 — Basis of Estimate

5 — Globals

6 — Milestones

7 — BCWP

8 — Actuals

9 — Distributed Project

10 — Task Description

1,2,3,4,5,6,7,8,9 or 10

ImportFileName

String

Name and path of import file

A:\OctEst.csv

Option Property

In addition to the common properties, the options property must be set for the import category specified. This provides the conditioning normally applied through the MPM user interface. The property is a comma-delimited string. For those imports which do not require this additional conditioning the value should be set to blank ("").

Import Category

Condition

Value(s)

Example

WBS Schedule

Time Now

User defined point in time where updating dates and shifting reports begin

21-SEP-06

Base Date

Possible values:

(I)mport. This option is selected when using Data Import function to import a file.

(E)arly. This option sets baseline start dates equal to early start date contained in the import file.

(L)ate. This option sets baseline start dates equal to late start dates contained in the import file.

I or E or L

Base Shift

(Y)es or (N)o

Y or N

ETC Date

Possible values:

(I)mport. This option is selected when using Data Import function to import a file.

(E)arly. This option sets ETC start dates equal to early start date contained in the import file.

(L)ate. This option sets ETC start dates equal to late start dates contained in the import file.

I or E or L

ETC Shift

(Y)es or (N)o

Y or N

Sched Shift

(Y)es or (N)o

Y or N

Force Shift

(Y)es or (N)o

Y or N

EOCs

26-byte string, first 13 represent EOCs in order listed on import screen. Second 13 are value to be 'held'. If blank then no value type to be held. Possible values are:

(H)ours (C) total cost

(E)qp (D) total $

(P)rime (T)otal Price

(O)riginal Estimate

(B)urden

0123456789LMOHPPOOOO OOOOO

Estimates

Autospread

(Y)es or (N)o

Y or N

Partial

Y = Partial N = Complete

Y or N

From

Import From Date (if partial, otherwise blank)

21-SEP-06

Thru

Import Through (if partial, otherwise blank)

02-DEC-06

Update Option

A= Accumulate

R = Replace

A or R

Import Type

 

B — Baseline

E — ETC

A — Both

B or E or A

Milestones

Identify Milestones by

I = ID

D = Description

S = Symbol/Description/Schedule Date

I or D or S

Update BCWP Status

(Y)es or (N)o

 

Y or N

As of Date

Fiscal Status as of Date

YYYYMMDD

Actuals

Auto Burden

Y = Import with Autoburdening

N = Import without Autoburdening

Y or N

Duplicate Actuals

A = Update with new values

B = Accumulate old and new values

C = Ignore new values

A or B or C

Distributed Project

BCWS

Include BCWS data

Y or N

BCWP

Include BCWP data

Y or N

ACWP

Include ACWP data

Y or N

ETC

Include ETC data

Y or N

Schedule Dates

Include Schedule Dates

Y or N

Milestones

Include Milestones

Y or N

 

Actual option settings must match those in the above table and are not necessarily the same characters used in the MPM Import conditioning screen.

Programming and Installation notes

Use of the MPMImporter DLL does not alter or bypass any of the MPM production import functionality.

User must provide own security surrounding execution of an application based upon the use of MPMImporter DLL. Although a user name is required to be passed to the object there is no corresponding requirement or check for a valid password.

The WinImporter DLL expects to be located in the same directory as the MPM import DLLs i.e. MPM executables.

Depending on system environment settings it may be necessary to either copy MFPAD.DLL and MFREPORT.MFL to the \Windows\System32 directory or add the MPM executable directory to the system environment path.