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 - Alika87

Pages: [1]
1
Suggestions and Requests / Re: XSD Datatypes
« on: June 27, 2013, 05:52:12 pm »
Thank you for your reply Mark.

I defined a couple of own Datatypes. These are the ones, which are not recognized. At the End I get a File, with the package names, Element names, Attribute names but no values for the Attributes.

2
Suggestions and Requests / XSD Datatypes
« on: June 26, 2013, 08:26:24 pm »
Hi guys,

I am just working on a project with Enterprise Architect. Now I want to generate a XML Schema of my Model. The only problem here is, that the generator gives me a failure message that looks like this.

Adding class attributes...
      Warning no XSD type found for: "xyz".  Default is: xs:string

and so on, for every selfdefined Datatypes.

My Question now is, where can I define this additional XSD datatypes. I searched and searched but couldnt find any option, to do that.


Thank you very much and best regards.

3
General Board / Re: Difference between a copy and a instance?
« on: August 21, 2013, 11:37:46 pm »
Sorry for bringing up this Topic again. I got a small question, that really bothers me. I want to add some classes and packages automatically, so I am writing a small AddIn. I strictly followed the instructions of EA for adding something.  When I run the AddIn, the package and also the class diagram is generated, but no elements and I receive a failure message: EA_MenuClick: Invalid Type. I am sure the reason is not far away, but i cannot see it. Thanks a lot.          

myPackage = Repository.GetTreeSelectedPackage();
newPackage = myPackage2.Packages.AddNew(myPackage.Name.ToString(), "");
newPackage.Update();
EA.Diagram diagram;
EA.Element o;
EA.DiagramObject v;
diagram = newPack.Diagrams.AddNew(newPack.Name.ToString(), "class");
diagram.Update();
o = newPack.Elements.AddNew("App", "class");
o.Update();
v = diagram.DiagramObjects.AddNew(o.Name.ToString(), o.Type.ToString());
v.ElementID = o.ElementID;
v.Update();
newPack.Diagrams.Refresh();

4
General Board / Re: Difference between a copy and a instance?
« on: August 01, 2013, 09:34:20 pm »
Quote
Addin new things via the API always goes through the magical EA.Collection.AddNew()

So if you want to add a new element to a package you do myPackage.Elements.AddNew()

If you want to add a new attribute to a class you do myClass.Attributes.AddNew()

If you wan to ..... euh, you get the picture ;D

Geert

thanks for that picture :D

5
General Board / Re: Difference between a copy and a instance?
« on: August 01, 2013, 08:20:19 pm »
I try to explain my problem more exactly. I got a MetaModel with several Classes, all of them have different Cardinalities ranging from 1...*. Now I want to create automatically with an AddIn, Instances of this classes with a Cardinality of 1.

At first I tried the lazy method. Clone the Package, then iterate through the Classdiagrams and try to change the Multiplicity of the class to 1. I dont know how correct this idea is, but I couldn't implement it, because I couldnt find any instruction to change multiplicity.

My second idea is(probably the more correct one) is the create a new Package and iteratively Add the class diagrams of my MetaModel into my new created package. I looked up in the help guide and other resourcese at the EA-Website an couldnt find a method for creating oder Adding new Items(in this case classes).

Am I missing something? Guys I dont want to bother you much longer and neither I want to ask for a finished solution. It would be nice if you could give me some hints. At the moment I am stucked in this deadend and wanna get out of it.

6
General Board / Re: Difference between a copy and a instance?
« on: August 01, 2013, 06:56:31 pm »
Quote
Can't you just pretend the method exists? I mean the compiler should not really care unless the linker croaks.

q.

I just excluded the Interop.EA.dll and icluded it again. Now it finds the Clone-Method. Interesting.

7
General Board / Re: Difference between a copy and a instance?
« on: July 31, 2013, 11:53:41 pm »
Quote
Are you sure you are using the correct version of the Interop.EA.dll?
Mine has version 2.10.238.1 and contains EA.Package.Clone

Geert

I got the same version you have. No matter what I tried, couldn't see the Clone-Method anywhere.

8
General Board / Re: Difference between a copy and a instance?
« on: July 31, 2013, 11:40:21 pm »
Quote
An instance is a copy of a class being Object (or whatever) as Type and having ClassifierID being the ObjectID of the original class. Connectors need to be duplicated manually (depends what you're doing).

If you want a smarter entry into EA's API have a look in my Scripting book.

q.

I started to try some solutions. At first I wanted to clone my Package and recursively Add new Elements to the new Package.

Now I encounter a probably trivial failure. My Compiler tells me, that there is no method named Clone in EA.Package, though the UserGuide tells me, that there is a Method called Clone. Do I have to include any special Reference to use this Clone-Method?

9
General Board / Re: Difference between a copy and a instance?
« on: July 31, 2013, 08:08:54 pm »
Thanks for your reply Helmut.

You guessed it right and gave some useful hints. Like you suggested, I am writing now an AddIn for Enterprise Architect, that can automatically generates instances of a whole package. Can you give me any hint, where to start. I know how I can get access to the diagrams over the Repository, but at the moment I dont know how the create instances of the selected Diagrams, plus the according Connectors.

10
General Board / Difference between a copy and a instance?
« on: July 19, 2013, 02:22:15 am »
hi guys,

My task requires that i am able to reproduce whole package, with all diagramms, the relations between them and all attributes + operations.

I thought: http://blog.sparxsystems.de/2010/02/ea-8-0-feature-kopieren-von-packages-im-ea/

Following this instructions would do. Copying them by stripping the GUIDs, would have effect, that the classes/objects are not an exact copy, more than an class by themselfes, because  their ID's are diffenrent. Seemed for me to be a fast an easy way to reproduce die Diagrams. I showed that to my person in charge, but he said its just a partial solution, because we need all Attribut of a class, including all inherited one from the mother-class, grandmother-class and so on. And this copies dont give that, thats why we need instances.

What do you think about that and do you know a way to automatically generate instances of a class?

Thank you for reading and hopefully i was able to explain myself in a proper way.

11
Automation Interface, Add-Ins and Tools / Re: Attribute values
« on: June 27, 2013, 07:50:38 pm »
Quote
Hi,

you want the value of an Attribute?

An Attribut has a buch of properties/attributes but no property value. The possible properties are described in the help (Automation and Scripting, Reference, Element Feature Package, Attribut Class).

Valuable information you can also find in Thomas Kilians book ScriptingEA.

Best regards,

Helmut

sorry, of course i meant the initial value of a particular attribute. Thank you Geert for your suggestion, i will try it right away.

edit: it works, thank you again :)

12
Automation Interface, Add-Ins and Tools / Attribute values
« on: June 27, 2013, 06:25:57 pm »
Hi Guys,

I have a model with a buch of packages and diagramms. Now i want to write a little AddIn in C# to save the Proporties of a class or package in a CSV-File.
My problem now is, that i get the names of attributes but cannot access to the defined attribute-values.

Code: [Select]
tagString2 = tagString2 + theAttributes.Name.ToString() +
"=" + theAttributes.//here i need a
function that gives me the value of that attribute//.ToString();

The little codepart looks like that. Do anybody can give me a little clue?

Pages: [1]