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

MDG_NewClass

Topics

Topic

Detail

See also

Details

MDG_NewClass enables the Add-In to alter details of a Class before it is created.

This method is called when Enterprise Architect generates a new Class, and requires information relating to assigning the language and file path. The file path should be passed back as a return value and the language should be passed back via the language parameter.

 

MDG_PreGenerate

Syntax:

Function MDG_NewClass(Repository As EA.Repository, PackageGuid As String, CodeID As String, Language As String) As String

The MDG_NewClass function syntax contains the following elements:

Parameter

Type

Direction

Description

CodeID

String

IN

A string used to identify the code element before it is created.

For more information, see MDG_View.

 

Language

String

OUT

A string used to identify the programming language for the new Class. The language must be supported by Enterprise Architect.

 

PackageGuid

String

IN

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

 

Repository

EA.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 string containing the file path that should be assigned to the Class.