Banxia Logo
Home
Products
Downloads
Where to buy
Training
About Us
. . Header picture .
   Home  Decision Explorer®  XML

COM Interface

This page gives technical details for developers who wish to use the COM interface available in Decision Explorer® version 3.2.3 or later. This interface is primarily for allowing integration of Decision Explorer® into larger decision support systems, or for adding value to the data.

Last updated 17 Mar 2002.

Functions

The following table contains the functions available in the COM object.

Function
Parameters Description
WriteXML

szModel: PChar;
lOptions: Integer;
szSetName: PChar;
szDestination: PChar
vResult: OleVariant

Writes the concepts in the set specified (all concepts if empty string) to the file specified in szDestination. The model to export must be specified.

The result is zero if all is well, -1 if the model does not exist.

The options should be zero or a bit-field specifying the following items:
#define XXI_DETAILED 0x0000001 // verbose info

#define XXI_WHOLEMODEL 0x0000002
#define XXI_SELECTED 0x0000004

// model info
#define XXI_MODELINFO 0x0000010
#define XXI_ALLVIEWS 0x0000020
#define XXI_CURRENTVIEW 0x0000040

// concept related
#define XXI_CONCEPTS 0x0000100
#define XXI_CONSTYLES 0x0000200
#define XXI_SETS 0x0000800
#define XXI_MEMONONE 0 // no memo output at all
#define XXI_MEMOBYREF 0x0001000 // memo section and references
#define XXI_MEMOREPEAT 0x0002000 // memos repeated on concepts (not recommended)
// link related
#define XXI_LINKS 0x0010000
#define XXI_LINKSTYLES 0x0020000

#define XXI_ARBITRARY 0x0100000

// inclusive options
#define XXI_ALL_DATA 0xfffdff1

ReadXML

szModel: PChar;
lOptions: Integer;
szSource: PChar;
bOverwrite: Integer
vResult: OleVariant

Reads the contents of the source file specified in szSource into the model specified in szModel (it must be open). The Options are the same as above (though only for the areas). If Overwrite is non-zero, existing concepts will be updated. If zero, then the import will ensure concepts do not overlap.

The result is zero if all is well, -1 if the model does not exist.

OpenDE OpenMode: Integer
vResult: OleVariant

Ensures that Decision Explorer is running. The COM interface is not actually built-in to Decision Explorer, so this can be used to ensure it is operational. Decision Explorer 3.2 or later must have been run at least once on the machine for this to work.

The result is zero if all is well, -1 if it fails.

CreateModel vResult: OleVariant

This creates a new empty model. Use the modelnames property to watch for its actual name for later reference.

The result is zero if all is well, -1 otherwise.

OpenModel

szModelFile: PChar
vResult: OleVariant

Opens a model file specified in the szModelFile parameter. Use the modelnames property to watch for its actual name to ensure it is opened (note that Decision Explorer can only open 4 models at a time - this may be raised to 8 in the 3.2 release).

The result is zero if all is well, -1 if the model does not exist.

CloseModel

szModel: PChar;
ForceSave: Integer
vResult: OleVariant

Tells Decision Explorer to close the model. If ForceSave is non-zero, then it will be saved as though File->Save was selected unless it is un-named, in which case the user will be prompted if they wish to save. The user is able to cancel this command..

The result is zero if all is well, -1 otherwise. Note that the result does not reflect the actual close state, only that it was initiated.

CloseDE

ForceSave: Integer
vResult: OleVariant

Tells Decision Explorer to close all models and shut down. If models are not saved, then the user will be prompted to save unless the ForceSave is non-zero, when the user will be prompted. The user is able to cancel this command.

The result is zero if all is well, -1 otherwise. Note that the result does not reflect the actual close state, only that it was initiated.

BringToFront

szModel: PChar
vResult: OleVariant

This command brings the specified model to the front of the users display. This should work on all operating systems including Windows 2000 and XP if the application that is calling this is the current foreground application.

The result is zero if all is well, -1 if the model does not exist.

ConvertToMDL

szXMLFile: PChar;
szModelFile: PChar;
lOptions: Integer
vResult: OleVariant

This composite is currently not implemented. You can achieve the same using the other functions.

The result is undefined at this time.

ConvertToXML

szModelFile: PChar;
lOptions: Integer;
szSetName: PChar;
szXMLFile: PChar
vResult: OleVariant

This composite is currently not implemented. You can achieve the same using the other functions.

The result is undefined at this time.

property ModelNames vResult: OleVariant Read-only access to a variant array of the full pathnames to the currently open models. You need to access this list to obtain the model name for some of the other functions.
GetVersion vResult: OleVariant Returns a string containing the current version number ("3.2.3").
IsRunning vResult: OleVariant Returns 1 if Decision Explorer is running, 0 if it is not.

If any point here is not clear, or you would like something changed to improve it, please email technical@banxia.com with your query, and we will try to clarify this information.