Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nik

Pages: [1]
1
Uml Process / Creating Templates for the Model Wizard
« on: April 17, 2009, 01:03:21 am »
Hello!

How can I make a template that I can use in the Model Wizard or import it in another way, so that I can add a predefined package structure to an existing or new project?
I have tried with the Import/Export features at first, but they keep the same guids. I also tried with the generate MDG technology file, but that got a little bit complicated.

Thanks beforehand for your help.

regards, Nik

2
Thanks, the Repository.RefreshModelView worked great!

3
Hello!

I have written an addin with c# for enterprise architect, where I can import elements and packages into a project. I can add them to a model and to the models packages with the addNew command, and then set the properties and call update on them. After they appear in the treeview only the name of element can be seen, and only by selecting an element or by restarting EA also the stereotype appears beside the name.
The same is with adding a new view. After it appers in the treeview, it looks like a normal package and only after restarting EA the specific icon of the view can be seen in the package icon.
So my question is how i can update the whole treeview after adding
new elements, packages and views?

with best regards, Nik

4
Hello!

I want to import elements from another system into EA which have already a Guid.
I get my new elements with the AddNew command, but they are already assigned with a EA generated Guid and this property is read only.
Is there any way to assign a Guid by myself?
This would be very important, because the elements in EA shoud be clearly associated with the elements in our other system.

best regards, Nik

5
Thanks for the tip! Making a new Variable of type EA.TaggedValue, assining the returned tagged value object and then calling update on that helped.

best regards, Nik

6
Hello!

I am trying to program an Add-In in C# which automatically adds two tagged values to every element in a selected package. I have tried it with following code, but if I execute the Add-In, no tagged values are added.

The code looks like:

EA.Package aPackage;
aPackage = Repository.GetTreeSelectedPackage();
                              
foreach(EA.Element theElements in aPackage.Elements)
{
    theElements.TaggedValues.AddNew("Estimate", "String");
    theElements.Update();
    theElements.TaggedValues.AddNew("PSP-Value", "String");
    theElements.Update();
}


I also wondered why there is no Method provided for initializing a
new TaggedValue with an specific value, so maybe the AddNew(...) Method may be not appropriate for dealing with new TaggedValues.

Maybe someone who has experience in adding and initializing new TaggedValues to Elements via Add-Ins/C# coding could help me.
Thanks beforehand,
                             Nik

Pages: [1]