Sei sulla pagina 1di 15

ARIS OLE Automation Methods

ModelSourceWins True, Corresponds to the Conflict Resolution - Models


False option.

True: Source overwrites target

False: Target preserved

ObjDefSourceWins True, Corresponds to the Conflict Resolution - Objects


False option.

True: Source overwrites target

False: Target preserved

UserSourceWins True, Corresponds to the Conflict Resolution - User


False option.

True: Source overwrites target

False: Target preserved

UserGroupSourceWins True, Corresponds to the Conflict Resolution - User


False Groups option.

True: Source overwrites target

False: Target preserved

MixUserToUserGroup True, Corresponds to Merge Associations of Users to


False User Groups option.

True: Yes

False: No

bUseUMLSystemFilter True, Corresponds to the Import Entire UML Contents


False option.

True: The entire UML content in the database will


be transferred, regardless of the current method
filter.

False: Only the selected UML content that is


permitted by the current method filter will be
transferred.

35
ARIS OLE Automation Methods

4.4.8 Method: Import XML File


This method imports the file into the open database according to the
settings in the script or the Options/XML Import and Options/XML
Import/Conflict Resolution dialog boxes.

Call

BOOL ImportFile(FileName)

Parameter

FileName Path and name of the XML file (example C:\XMLExport.xml)

36
ARIS OLE Automation Methods

4.5 ARIS Model Generation

4.5.1 Method: Connect to the Database


This method establishes a connection to the database on the server.
Returns TRUE if the database opens successfully, otherwise FALSE.

Call

BOOL Connect(String ServerName, String DatabaseName, String


UserName, String UserPassword, String FilterGUID, long
LanguageId )

Parameter

ServerName Name of the server where the database is located

DatabaseName Name of the database

UserName Name of the user. Ensure that the specified user has the required
access privileges.

UserPassword Password of the user

FilterGUID GUID of the method filter

LanguageID Locale ID of the language in which the database is to be opened,


e.g. 1033 for English.

4.5.2 Method: Disconnect from the Database


This method closes the connection to the database. After this method
is called, model generation is no longer possible. Returns TRUE if the
action was successful, otherwise FALSE.

Call

BOOL Disconnect()

37
ARIS OLE Automation Methods

4.5.3 Method: Model Generation Based on Models


This method generates a model based on other models. To generate
multiple models, you must call this method for each model individually.

The source models and other items are identified by their OID (object
identifier). To obtain the relevant OIDs, call the Item::ObjectID
method.

Call

BOOL GenerateModelFromModels(String ModelName, long


ModTypeNum, String() ModelOIDsList, String GroupOID, String
UserOID, String UserName, long LanguageId)

Parameter

ModelName Name of the new model

ModTypeNum Type number of the new model

ModelOIDsList Array of the OIDs for the models to be used as a basis for the new
model

GroupOID OID of the group in which the new model is saved

UserOID OID of the user to be entered as the creator of the new model

UserName Name of the user to be entered as the creator of the new model

LanguageId Locale ID of the language in which the model name is to be


maintained, e.g. 1033 for English.

38
ARIS OLE Automation Methods

4.5.4 Method: Model Generation Based on Objects


This method generates a model based on objects. To generate multiple
models, you must call this method for each model individually.

The source objects and other items are identified by their OID (object
identifier). To obtain the relevant OIDs, call the Item::ObjectID
method.

Call

BOOL GenerateModelFromObjects(String ModelName, long


ModTypeNum, String() ObjectOIDsList, String GroupOID,
String UserOID, String UserName, long LanguageId, BOOL
AlsoConnected)

Parameter

ModelName Name of the new model

ModTypeNum Type number of the new model

ObjectOIDsList Array of the OIDs for the objects to be used as a basis for the new
model

GroupOID OID of the group in which the new model is saved

UserOID OID of the user to be entered as the creator of the new model

UserName Name of the user to be entered as the creator of the new model

LanguageId Locale ID of the language in which the model name is to be


maintained, e.g. 1033 for English.

AlsoConnected TRUE: In the new model, both the relationships interrelating the
source objects and the relationships between the source objects and
other objects in the database will be displayed. Occurrences are
created for these objects, too. You specify the display level in the
Options/Model Generation dialog box.

FALSE: The new model will show only the relationships interrelating
the source objects, and occurrences will be created only for the
source objects.

39
ARIS OLE Automation Methods

4.6 ARIS Web Publisher

4.6.1 Method: Database


This method opens

ƒ on the server you specified

ƒ the database you specified

ƒ as registered user (optional)

ƒ with the corresponding password (optional)

ƒ with the filter you specified (optional)

ƒ with the database language you specified (optional).

Call

Bool Database(String sServer, String sDatabase, optional


String sUser, optional String sUserPassword, optional
String sFilterGUID, optional long lDBLanguageID )

Example

Set Database = wp.Database("LOCAL", "Demo", "system",


"manager", "dd838074-ac29-11d4-85b8-00005a4053ff", 1033)

Return Value

Database The opened ARIS database. All commands of the database


object are available for this object.

Parameter

sServer Name of the server on which the database is stored. Local


databases are located on the LOCAL server.

sDatabase Name of the database to be opened. This name must match


the database name displayed in ARIS Explorer (not
necessarily the attribute name of the database).

sUser Name of the user who is to be logged in to the database

sUserPassword Password of the user who is to be logged in to the database

40
ARIS OLE Automation Methods

sFilterGUID GUID of the method filter that is to be used for the database

lDBLanguageID Locale ID of the required database language

4.6.2 Method: SetWizOptions


This method specifies the options for the wizard.

Call

void SetWizOptions (short nExportFormat, short nTreeFormat,


LPCTSTR sConfigFilter, LPCTSTR sExportDir, LPCTSTR
sExportFile, long nModelScale, const VARIANT FAR&
bUsePrintScale, const VARIANT FAR& bBlackAndWhite, const
VARIANT FAR& bTransparent, const VARIANT FAR& bFixColumn,
const VARIANT FAR& bFixRow, LPCTSTR sScaleValues, short
nAddToExportMode, LPCTSTR sAddToExportDT, LPCTSTR
sExtLinkRegKey, short nElemLink, long nLangId, const
VARIANT FAR& bAddToExport, const VARIANT FAR&
bExportObjects, const VARIANT FAR& bMakeDownload, const
VARIANT FAR& bModelOverview, const VARIANT FAR&
sAllowedObjects)

Parameter

nExportFormat Format used to display the model graphic:

0: Java 1.3 JRE (WMF format)


1: HTML (GIF format)
2: HTML (JPG format)
3: Java 1.1 (GIF format)
4: Java 1.1 (JPG format)

nTreeFormat Format used to display the tree view:

0: HTML (JavaScript)
1:Java 1.1 (user-defined)
2: Java 1.3 JRE (complete)

sConfigFilter GUID of the evaluation filter that is used in conjunction


with the current method filter. If you create exports with
older scripts, sConfigFilter is the name of the evaluation
filter. However, the system looks for the filter GUID. The
evaluation filter is then ignored. Please update older
scripts by replacing filter names with GUIDs.

41
ARIS OLE Automation Methods

sExportDir Absolute path to the output directory without start file

sExportFile Name of the start file with the extension htm or html
Default: Index.htm

nModelScale Initial scaling for model graphics. When you open the
model graphic, it is displayed in the scaling level specified
here.

bUsePrintScale Specifies whether or not the print scale is used to


generate model graphics.

True: The nModelScale parameter is ignored and the


print scale of each model is used as initial scaling.

False: The value specified for the nModelScale


parameter is used as initial scaling for each model.

bBlackAndWhite Specifies whether the model graphic is generated in black


and white or color.

True: Black and white


False: Color

bTransparent Specifies whether or not the model graphic will be


transparent.
0: Java 1.3 JRE (WMF format)
1: HTML (GIF format)
3: Java 1.1 (GIF format)

True: Transparent
False: Not transparent

bFixColumn Specifies whether the first column of models with


row/column display (Swimlane models) is frozen.

True: Frozen

False: Not frozen

bFixRow Specifies whether the first row of models with


row/column display (Swimlane models) is frozen.

True: Frozen

False: Not frozen

42
ARIS OLE Automation Methods

sScaleValues String that includes the scaling factors (including initial


scaling with value 1.0).

Example: 0.25 0.5 1.0 1.25 corresponds to 25%, 50%,


100%, and 125% based on the nModelScale initial
scaling or PrintScale

nAddToExportMode Specifies the Add to Web mode.

0: Add all
1: Add by file date
2: Add by specified date value
(see sAddToExportDT parameter)

sAddToExportDT Adds string with date entry for the Add to Web mode.
See nAddToExportMode parameter, value 2.

Example: 24,02,2005,04,05,06 corresponds to date


02/24/2005 and time 04:05:06

sExtLinkRegKey Attribute type numbers of attributes that are exported as link


attributes.
Separate the individual attribute type numbers with a comma.

nElemLink Specifies the link mode:

0: Only for the selected items


1: For all items

nLangId Locale ID of the required database language Database


contents are exported in this language. Method contents
are dependent on the method or interface language.

bAddToExport Specifies whether or not an existing export should be


added. Existing HTML files are not deleted, but
overwritten, if required.

True: Existing export is added


False: Existing export is not added

bExportObjects Specifies whether or not object information is exported.

True: Object information is exported


False: Object information is not exported

43
ARIS OLE Automation Methods

bMakeDownload Specifies whether or not models can be downloaded.

True: Models can be downloaded


False: Models cannot be downloaded

bModelOverview Specifies whether or not the model overview is to be


generated. This option is only active for JAVA exports.

True: The model overview is generated


False: The model overview is not generated

bAllowedObjects String that contains object type numbers for which object
information pages are to be generated.

Example: "22, 18, 43" corresponds to function, event,


and organizational unit

44
ARIS OLE Automation Methods

4.6.3 Method: SetOptions


This method specifies the cross-export options on the Options page in
ARIS Web Publisher.

Call

void SetOptions(String sMPraefix, String sOPraefix, String


sDownLDir, String sImportDB, String sDokDir, short nMSort,
short nOSort, short nASort, optional Bool bUseNewFileNames,
optional Bool bUseGUID, optional Bool bMakeCopies, optional
Bool bEvalOLEObj, optional Bool bEvalSapAttr, optional Bool
bEvalLAttr, String sE3WebServerPath, optional String sUser,
optional String sPassword, optional Bool bUseE3, optional
Bool bUseVBM, optional Bool bEvalHierarchy, optional short
nHierarchyDepth, optional Bool bExportRoles)

Example

webpub.SetOptions "m", "o", ".\download", "LOCAL\DEMO",


".\doc", 0, 0, 0, False, False, True, True, True, True,
"http://appsrv/lan/de/database.html", "system", "manager",
True, True, False, 0, True

Parameter

sMPraefix Prefix for generating model file names.

Example: Each model file name is preceded by prefix m


Consequently, model file names are m001.htm,
m002.htm...

sOPraefix Prefix for generating object file names.

Example: Each object file name is preceded by prefix o


Consequently, object file names are o001.htm, o002.htm...

sDownLDir Absolute or relative path to the export directory.

sImportDB Path to the import database in the format


SERVER\DATABASE.

Example: LOCAL\demo

sDokDir Absolute or relative path to the export directory.

nMSort Sort mode for model information.

0: Sort ascending
1: Sort descending

45
ARIS OLE Automation Methods

nOSort Sort mode for object information.

0: Sort ascending
1: Sort descending

nASort Sort mode for attributes.

0: Sort ascending
1: Sort descending
2: By method

bUseNewFileNames Specifies whether the Speaking File Names option is


enabled or disabled.

True: The file names are generated on the basis of the


corresponding item names.
False: No speaking file names are created.

bUseGUID Specifies whether the GUID Export option is enabled or


disabled. File names are generated using the item's GUID
instead of the OID.

True: The file names are generated on the basis of the


GUID.
False: The file names are generated on the basis of the
OID.

bMakeCopies Specifies whether or not documents are generated for links


1 to 4 or for linked OLE objects in the Web Publisher export.

True: The documents are generated.


False: The documents are not generated.

bEvalOLEObj Specifies whether or not OLE objects are evaluated.

True: The OLE objects are evaluated.


False: The OLE objects are not evaluated.

bEvalSapAttr Specifies whether SAP attributes (transaction codes) are


enabled or disabled.

True: The SAP attributes are enabled.


False: The SAP attributes are not enabled.

46
ARIS OLE Automation Methods

bEvalLAttr Specifies whether or not Lotus Notes attributes (LNC) are


evaluated.

True: The Lotus Notes attributes are evaluated.


False: The Lotus Notes attributes are not evaluated.

sE3WebServerPath URL of an ARIS Business Designer start page.

Example: http://appsrv/lan/en/database.html

sUser User of ARIS Business Designer.

sPassword Password of the ARIS Business Designer user.

bUseE3 Specifies whether or not the model can be opened in ARIS


Business Designer.

True: Functionality is provided, model can be opened.


False: Functionality is not provided, model cannot be
opened.

bUseVBM Specifies whether or not improvement proposals can be


entered for models and objects in ARIS Business Designer.

True: ARIS Change Management is provided, improvement


proposals can be entered.
False: ARIS Change Management is not provided,
improvement proposals cannot be entered.

bEvalHierarchy Specifies whether the assignment hierarchy is included in


the export.

True: Assignments are exported.


False: Assignments are not exported.

nHierarchyDepth Specifies the assignment level up which assignments are


included.

bExportRoles Specifies whether an export with role-based access or a


standard export is carried out.

True: Generates an export with role-based access.


False: Generates a standard export.

47
ARIS OLE Automation Methods

4.6.4 Method: SetNG


This method must be called for export types.

Call

Bool SetNG(String sLayoutPath)

Example

Dim bVariant
bVariant=webpub.SetNG("E:\Programme\ARIS_cd\wplayout\design
s\de\yellow")

Return Value

True, if the layout directory was found.

Parameter

sLayoutPath Absolute path to the layout in use.

4.6.5 Method: UseProfile


You can call this method instead of the SetNG, SetWizOptions, and
SetOptions methods. If you specify an existing profile that contains
all options, you do not need to call the aforementioned methods.

Call

void UseProfile(String sProfileName)

Example

Dim bVariant
bVariant=webpub.UseProfile("My Profile")

Parameter

sProfileName Name of the profile you want to use.

48
ARIS OLE Automation Methods

4.6.6 Method: Select


This method selects the specified item for the subsequent Web
Publisher execution. You can select multiple items by calling this
method repeatedly. The parameter is the string representation of the
model or group OID. To obtain the relevant OIDs, call the
Item::ObjectID method.

Call

void Select(String sOID)

Parameter

sOID String representation of the model or group OID.

4.6.7 Method: Execute


This method starts the Web Publisher export. Before you can call this
method, you must have specified options based on the methods
described above.

Call
void Execute()

49

Potrebbero piacerti anche