Naveen
Naveen

Reputation: 67

Import MDG Technologies to Model

Through C# plugin can we load the MDG to the model.if yes what is API providied by EA to load the MDG file to the Model.

Upvotes: 0

Views: 269

Answers (2)

Dah Sra
Dah Sra

Reputation: 4435

Try

 public object EA_OnInitializeTechnologies(EA.Repository Repository)
 {
    return MyProject.Properties.Resources.yourMDGxml;
 }

It will load an MDG and enable it.

Add the created mdg xml in the resource of the c# project and return it in the above broadcast event .

EA_OnInitializeTechnologies broadcast event used to pass an technology for loading.

Please refer sparx help for more details

EA_OnInitializeTechnologies

Deploy an MDG

Upvotes: 0

Geert Bellekens
Geert Bellekens

Reputation: 13784

It seems like you are looking for the function EA.Repository.ImportTechnology(string Technology)

ImportTechnology (string Technology)

Boolean

Notes: Installs a given MDG Technology resource into the repository.

Returns True if the technology is successfully loaded into the model. Otherwise returns False.

This applies to technologies imported into pre-7.0 versions of Enterprise Architect (imported technologies), not to technologies referenced in version 7.0 and later (referenced technologies).

Parameters:

Technology: String - the contents of the technology resource file

See the manual for more info

Upvotes: 1

Related Questions