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 - Steve Wartik

Pages: 1 [2] 3
Automation Interface, Add-Ins and Tools / Re: Order of toolbox pages
« on: January 14, 2014, 05:45:09 am »

Not quite -- #5 refers to the toolbox items, not the toolbox pages. But it turns out the notes below the table provide the answer I sought. Thanks for the reference!



Automation Interface, Add-Ins and Tools / Order of toolbox pages
« on: January 14, 2014, 02:24:12 am »

I'm developing an MDG technology and adding several toolbox pages -- that is, stereotypes extending «metaclass» ToolboxPage. How can I control the order in which Enterprise Architect displays these pages in the toolbox? The default appears to be lexicographical. Do I rename my toolbox pages, or is there another way? Thanks.

I'm extending ToolboxItemImage. For the record, all my stereotypes extend the same instance of ToolboxItemImage. The XML file containing the saved profile contains all the icon bitmaps. Yet some display and others don't.


Good idea, but unfortunately that isn't the problem. I tried both 8-bit and 4-bit depth. Still not working. Can anybody else help?

I'm developing an MDG technology that includes some custom icons for toolbox items. Enterprise Architect displays some of my icons but not others. I have examined the XML file and verified that it contains the icons. The only things I can see right now are:
  • Enterprise Architect uses the default icon (not my custom icon) for all stereotypes that extend metaclass Package.
  • One of my stereotypes that extends Generalization has the custom icon. Another doesn't.
Any thoughts on this? Thanks.

Good thought, but didn't work. Thanks for the time you spent on this. Tech support, here I come.

I don't know of any real differences between objectProperty and UnionClass. They have different attributes; that's all I can think of. Any ideas on other kinds of differences?

I don't have any similar existing stereotypes. None have a name that's even close.


So far I've only tried EaElement. I do have some examples, but my technology is hard to condense into something I can fit on the forum. Is the following enough?

The profile implements the (as yet unofficial) version 2 of ODM. (It was originally developed by a former Sparx Systems employee.) The code:
org.sparx.Package model = ...;
org.sparx.Collection<org.sparx.Package> pkgs = model.GetPackages();
org.sparx.Package p = pkgs.AddNew("ontology", "B62663A0-03::owlOntology");
works, except that the stereotypes are from EA's built-in ODM profile. The code:
org.sparx.Collection<org.sparx.Element> e = p.GetElements();
e.AddNew("objProp", "B62663A0-03::objectProperty");
works as I expect. The code:
e.AddNew("uc", "B62663A0-03::UnionClass");
throws an exception.

In my profile, owlOntology extends metaclass Package, and objectProperty and UnionClass both extend metaclass Class.


I have developed an MDG technology. I've been trying to automate certain capabilities using the Java API. I'm puzzled by the Type parameter of the Collection::AddNew method. I recall reading somewhere that, when adding an element from an MDG technology, the correct usage is:

   collection.AddNew(name, "profile-id::element-type")

where profile-id is the ID of the UML profile in my MDG technology (specifically, the value of the id attribute in the Documentation element) and element-type is the name of an element from my MDG technology that is a stereotype.

The odd thing is, sometimes this works and sometimes it doesn't. When it doesn't work, the API throws an exception whose message is "Invalid type".

Can someone provide more information on this topic? What values are acceptable, and why? I suppose some understanding of EA's internals is required; at least, I haven't found anything in the available documentation.  If you know of something, please point me that way. Thanks!

(By the way, I've tried other approaches: not including the profile ID, and using the profile name rather than its ID. These either fail or are unsatisfactory for reasons for which I won't burden this forum.)

Automation Interface, Add-Ins and Tools / Re: MDG Technology "Missing"
« on: August 08, 2012, 06:13:59 am »
That may well be the problem -- I do have a dll that I haven't recompiled after upgrading to a 64-bit architecture. Thanks for the suggestion.

Automation Interface, Add-Ins and Tools / MDG Technology "Missing"
« on: August 08, 2012, 03:05:53 am »
What does it mean when the status of an MDG Technology is "Error - Missing"? That's what the Manage Add-Ins window (menu item Extensions>Manage Add-Ins) is showing.

I've verified that the requisite file exists after invoking Tools>MDG Technology Import, so that's not the issue. Any ideas what might cause Enterprise Architect to display this status?


Thanks -- that bit of magic helps too.


Thanks -- your solution is workable for the time being. Let us hope Sparx Systems improves API support for stereotypes soon.


I'm using the Java API, so SynchTaggedValues() isn't available.

I don't know if it's relevant, but I've tried opening Enterprise Architect and synching the stereotype from the toolbox (i.e., right-click a toolbox item and select "Synchronize Stereotype"). The action has no effect. I have also tried:

Code: [Select]
repository.CustomCommand("Repository", "SynchProfile", "Profile=profile-name;Stereotype=stereotype-name;");
without success.

Perhaps another way to ask my question is as follows. I can transfer my project to a MySQL database, dump the database, then restore the database; Enterprise Architect still knows which is the good element and which is the bad one. What information is it using to do so? I have looked at the MySQL dump and can't figure out how EA knows which element is created from my MDG technology, despite both having a stereotype with the same name (and same value for the Description field in the t_xref table).

I've developed an MDG technology. When I use use it to create an element in a diagram, it works as I expect. When I use the automation interface to create an element, it doesn't.  The symptoms appear in the tagged values pane:
  • For the "good" element, the label at the pane's top displays a fully qualified path name from my MDG technology (i.e.,  it has the form "ProfilePkg::stereotypeName"). For the bad element, it just displays the element's UML type (e.g., "Package").
  • For the good element, the tagged values pane displays the tags I expect. For the bad element, it doesn't list any tags.
Can someone please explain this behavior to me, and tell me how to get the automation interface working?

Pages: 1 [2] 3