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 - Simon M

Pages: 1 ... 388 389 [390] 391 392 ... 416
5836
Element.Tests is a collection of EA.Test

5837
[split] [link=http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1213581045][splithere][/link][splithere_end]

5838
Then have a look at Repository.GetTreeSelectedItem.  However I think it only handles one item.

From that you can get an object and cast it appropriately depending on the return value.

5839
As has been said twice here, a diagram ID is incompatible with an element ID.  Your code may appear to do something right just because there happens to be an object with the same ID as the diagram.  But really the behavior will be undefined.

From what I read, Dermot is probably correct that you want to iterate over the elements on a diagram.

5840
Are you wanting Project.DoBaselineCompare()?

5841
See http://www.sparxsystems.com.au/EAUserGuide/index.html?importingcodetemplatesfrom.htm
Quote
User-defined Code Templates can be imported and exported as Reference Data (see Import and Export Reference Data in the Enterprise Architect User Guide). The templates defined for each language appear in a list of tables with the language name suffixed with _Code_Templates.

You could also embed them in an MDG technology.  (http://www.sparxsystems.com.au/EAUserGuide/index.html?addingcodemodulesinmdgtec.htm)

5842
[split] [link=http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1211980532][splithere][/link][splithere_end]

5843
Thanks David,

I didn't think I'd made a mistake, but did appreciate that are more lengthy and formal description could remove possible ambiguities from what I said.

5844
Thank you for the quote about keywords from the specification.  I think that the first part of that particuarly expresses what I was trying to say much more clearly.  (Either that or I have become too used to "specification talk".)

5845
I suspect that realize is not a stereotype, but a keyword.

Although they look the same, a keyword is goes with the base class (in this case realization) and can't be modified.  However, I think that there is still a potential problem here because if it is in the stereotype field it should also be in the stereotypeex field.

Yes, there are other examples of this.  The only one I can think of at the moment is interface.

5846
Automation Interface, Add-Ins and Tools / Re: Add-in thread safety.
« on: June 19, 2008, 08:53:26 am »
I don't believe that the EA automation interface is thread safe.  Although you may be able to use some classes (eg. Element, Connector) I wouldn't attempt it for Repository and Project.

5847
Another possible solution is that until relatively recently (7.1?) the java API didn't like being called from a different thread within a program that had already used it.

That used to produce a similar error.

5848
CA is correct, (in my understanding) that function adds a window where you find diagrams.

EA doesn't currently support docked windows from add-ins.

5849
ImportPackageBuildScripts is the wrong function.

You need Project.ImportPackageXMI.

Code: [Select]
Repository rep = new Repository();
rep.OpenFile("D:\\testproject.eap");
Collection<Package> packs = rep.GetModels();
Collection<Package> elems = packs.GetPackages();
Package importPack = elems.GetByName("test");
rep.GetProjectInterface().ImportPackageXMI(importPack.GetPackageGUID(),"D:\\test.xml",1,0);

5850
What have you put in your file template?

If you put plain text in does it generate that to a file?

Pages: 1 ... 388 389 [390] 391 392 ... 416