Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
MDG_Connect
Topics:
Topic |
Detail |
See Also |
---|---|---|
Details |
MDG_Connect enables the Add-In to handle user driven request to connect a model branch to an external application. This function is called when the user attempts to connect a particular Enterprise Architect package to an as yet unspecified external project. This event enables the Add-In to interact with the user to specify such a project. The Add-In is responsible for retaining the connection details, which should be stored on a per-user or per-workstation basis. That is, users who share a common Enterprise Architect model over a network should be able to connect and disconnect to external projects independently of one another. The Add-In should therefore not store connection details in an Enterprise Architect repository. A suitable place to store such details would be: SHGetFolderPath(..CSIDL_APPDATA..)\AddinName. The PackageGuid parameter is the same identifier as required for most events relating to the MDG Add-In. Therefore it is recommended that the connection details be indexed using the PackageGuid value. The PackageID parameter is provided to aid fast retrieval of package details from Enterprise Architect, should this be required. Also look at MDG_Disconnect. |
Syntax
Function MDG_Connect(Repository As EA.Repository, PackageID as Long, PackageGuid As String) As Long
The MDG_Connect function syntax contains the following elements:
Parameter |
Type |
Direction |
Description |
---|---|---|---|
PackageGuid |
String |
IN |
The unique ID identifying the project provided by the Add-In when a connection to a project branch of an Enterprise Architect model was first established. |
PackageID |
Long |
IN |
The PackageID of the Enterprise Architect package the user has requested to have connected to an external project. |
Repository |
IN |
An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information. |
Return Value
Returns a non-zero to indicate that a connection has been made; a zero indicates that the user has not nominated a project and connection should not proceed.