Enterprise Architect Add-in Framework Documentation
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.

Namespace: EAAddinFramework
Assembly: EAAddinFramework (in EAAddinFramework.dll) Version: 1.0.4064.9398

Syntax

C#
public virtual long MDG_Connect(
	Repository Repository,
	long PackageID,
	string PackageGuid
)
Visual Basic
Public Overridable Function MDG_Connect ( _
	Repository As Repository, _
	PackageID As Long, _
	PackageGuid As String _
) As Long
Visual C++
public:
virtual long long MDG_Connect(
	Repository^ Repository, 
	long long PackageID, 
	String^ PackageGuid
)

Parameters

Repository
Type: Repository
An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
PackageID
Type: System..::..Int64
The PackageID of the Enterprise Architect package the user has requested to have connected to an external project.
PackageGuid
Type: System..::..String
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.

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.

See Also