Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: carolin.boeckler on July 03, 2012, 11:04:52 pm

Title: Import reference data to MDG Technology
Post by: carolin.boeckler on July 03, 2012, 11:04:52 pm
Hello,

I try to import reference data (Project-Model Import/Export - Export Reference Data --- Status Types/Status Color) to the MDG Technology. In my MDG Technology I import differnet model templates, e.g.

      <ModelTemplates>
            <Model name="P-xxx Name of Project" description="Template - system model for advanced development (english)" location="SYSMOD_template.xml" default="yes" icon="34" filter="Common"/>
                                     <Model name="P-xxx Name des Projekts" description="....

Depending on the kind of ModelTemplate I like to change the reference data. I know already how to import reference data via C# Repository.CustomCommand("Repository", "ImportRefData", XmlGenerals); but I can I ask if I import a new model template and also which one?

Bye, Caro
Title: Re: Import reference data to MDG Technology
Post by: qwerty on July 04, 2012, 02:01:23 am
What do you mean by "ask"?

q.
Title: Re: Import reference data to MDG Technology
Post by: carolin.boeckler on July 04, 2012, 10:51:09 pm
I have several model templates in my MDG-Profile (different languages and different models). If I "choose" the model template, e.g. 'Projekt (ger)' I like to change the status from table t_statustypes and if I choose 'Beschreibung (ger)' I do not want to change the table t_statustypes. This I mean with 'ask'.

Hopefully it is now clear
Title: Re: Import reference data to MDG Technology
Post by: qwerty on July 05, 2012, 01:09:35 am
Not really. Your use case is not clear, still. When do you want to ask? Where do you want to do that? Do you use an add-in? It would definitely help if your use case is described a bit more.

q.
Title: Re: Import reference data to MDG Technology
Post by: carolin.boeckler on July 05, 2012, 04:10:36 pm
It is not easy to describe what I want.
I have a own MDG Profile and also an add-in.
I insert to my MDG Profile some model templates.
That means if I open the 'Model Wizard' I can choose in the tab 'model patterns' my technology 'SYSMOD Vorentwicklung'. I have there some model templates called 'P-xxx Name of Project', 'P-xxx Name des Projekts', Project Information', 'Projektinformation', ...
I like to change the status of the requirements (table t_statustypes) if I choose the model template 'P-xxx Name of Projects' and 'P-xxx Name des Projekts', but I don't like to change the status if I choose one of the other model templates, e.g. 'Projektinformation' or 'Project information'.

It would be create to insert this to the MDG Profile ... but I don't know how to do this.
Otherwise it would be also ok to have a function which recognize that I opened the 'model wizard' and to have a second funtion wich 'model templates' where choosen. This I meant with 'ask' for the model template. If I choose more than one model template and if one of the model templates is 'P-xxx Name des Projekts' or 'P-xxx Name pf Projects' the status of the requirements should also be changed.

It is really not easy to describe what I want to do
Title: Re: Import reference data to MDG Technology
Post by: qwerty on July 05, 2012, 07:24:43 pm
I think I see what you mean. It's an area where I don't have much experience. When you open a model via the model creation wizard you want to know which one the user had chosen. Correct?

If so, I guess you don't get a direct information from EA. Maybe (likely) the OnPostNew is fired so you can check which of your structures was created and act accordingly (you need to see if it's one distinct elements - maybe a certain view - which was created).

q.