Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Topic
Prev Next

MDG_View

Add-Ins can use MDG_View to display user specified code elements.

This function is called by Enterprise Architect when the user asks to view a particular code element. The Add-In can then present that element in its own way, usually in a code editor.

Syntax

Function MDG_View (Repository As EA.Repository, PackageGuid As String, CodeID as String) As Long

The MDG_View function syntax contains these parameters.

Parameter

Type

See also

CodeID

String

Direction: IN

Description: Identifies the code element in this format:

      <type>ElementPart<type>ElementPart...

where each element is proceeded with a token identifying its type:

      @ -namespace

      # - Class

      $ - attribute

      % - operation

For example, if a user has selected the m_Name attribute of Class1 located in namespace Name1, the Class ID would be passed through in this format:

      @Name1#Class1%m_Name

PackageGuid

String

Direction: IN

Description: The GUID identifying the Enterprise Architect Package sub-tree that is controlled by the Add-In.

Repository

EA.Repository

Direction: IN

Description: An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

Repository Class

Return Value

Return a non-zero value to indicate that the Add-In has processed the request. Returning a zero value results in Enterprise Architect employing the standard viewing process which is to launch the associated source file.