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

Pages: [1]
1
General Board / Re: Multiple Instances of an Element in a Diagram
« on: July 29, 2011, 09:00:13 pm »
Ah, tagged values are synchronised between the original object and the instance; that's good to know.

The thing about the stereotype and, say, default appearance - it's correct when the instance is created, but if the original is changed afterwards then the instance doesn't change too.

Also I can get it to copy the embedded parts now (thanks) but those embedded parts are distinct elements, not related to the embedded parts in the original object. It also doesn't copy connections between copied embedded parts.

It might not be feasible, but I guess what I'm looking for is a way to clone an element that makes a one-way parent-child link. I.e. any change made to the parent (or its embedded elements) is also made to the child, but changes made to the child are not made to the parent.

2
General Board / Re: Multiple Instances of an Element in a Diagram
« on: July 28, 2011, 08:07:02 pm »
But instances made in this way don't maintain the stereotype and other properties of the original (apart from the name, if the instance has no name itself). Other things aren't synchronised, and embedded elements aren't also copied. Would there be some way to do that?

3
General Board / Re: Multiple Instances of an Element in a Diagram
« on: July 28, 2011, 12:57:10 am »
I had a search before I first posted but couldn't find anything.

The reason it's relevant is that we're using EA to architect both hardware and software in a system, so there might be several occurrences of a piece of hardware. I might be asking for the wrong thing with multiple instances (as I may want them to have distinct connectors), but if possible I'd like for them to 'inherit' properties (and changes) from some master element. Thus if the master element had its stereotype changed, all the slaves would too.

4
General Board / Re: Multiple Instances of an Element in a Diagram
« on: July 27, 2011, 11:48:32 pm »
 :P
Is there a good reason why it's a bad idea (given the existing structure of EA) and is there a good reason why it ~should~ be a bad idea? :D

5
General Board / Multiple Instances of an Element in a Diagram
« on: July 27, 2011, 10:23:26 pm »
Hi! Is there a way to put multiple instances of an element into a diagram (not by pasting as an instance, but actual links)? I know the program doesn't want me to do this, but is there a workaround?

Cheers,
Sam

6
Automation Interface, Add-Ins and Tools / Re: Tagged Values in Scripting
« on: August 17, 2011, 01:27:04 am »
Thanks! I've got it working now!

7
Automation Interface, Add-Ins and Tools / Tagged Values in Scripting
« on: August 16, 2011, 01:01:25 am »
Hello! I'm not sure how I'd use a script (I'm scripting in JavaScript) to add a tagged value to an element.

Basically my script assembles an array of a certain type of element and then tags a value "true" or "false" based on its properties. I'm not sure how to add a new tagged value to an existing element, so that I can change it with this script (if it doesn't already exist).

If it's not trivial to add new tagged values, I could change the stereotype for the element (it's in a custom MDG) to create the element with a junk value for this tag, but I'd prefer to do it through the script.

Cheers,
Sam

8
Ah, thanks. It still shows collapsed - is that just a property of being common that overrides setting collapsed to false?

Cheers,
Sam

9
Automation Interface, Add-Ins and Tools / Making a Toolbox Page Common
« on: August 03, 2011, 10:46:07 pm »
I've created a toolbox page which I'd like to appear under the other toolboxes, in the same way as the "Common" toolbox. Previously, when the toolbox was not common but was manually included under another toolbox, it worked fine.

I added the attributes isCommon = true and isCollapsed = false, but it doesn't appear under other toolboxes. Additionally, when selected from the toolbox menu, the toolbox no longer shows imagesOnly, despite that still being set to true. (This bit may be due to right-click changes persisting)

Any idea why this is?

Cheers,
Sam

10
Hello,

I've just started scripting in EA so I might get things wrong, but I'll tell you what I'm able to.

I'm not sure how you'd do it with SQL but if you're using EA scripts you can tell it to use the currently selected package as a root. Then you'd iterate through its child packages and make your own collection of elements that you find. You could also gather diagrams you find and then check their objects, removing the associated elements from that collection to be left with a collection of only elements which are in the project browser but do not appear in any diagram.

Sam

P.S. This resource is what I've been using to find out attributes and methods:
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/reference.htm
It takes some navigating to find particular pages, but finding links in the repository spec is a good start.

11
Automation Interface, Add-Ins and Tools / Re: Hidden Toolbox Icon
« on: July 21, 2011, 02:34:55 am »
Aha!

The problem was that I had a two separate stereotypes (with the same name). One was extending ToolboxItemImage with only the icon attribute, and the other was extending ToolboxPage with all the other attributes. Edit: this also explains why at one point when I saved the profile the icon correct but the button did nothing, based on the ordering of the elements!

By combining all the attributes into a single stereotype that extended both of the metaclasses it worked!

Thanks a lot!
Sam

12
Hello,

I'm working on a custom toolbox, which is imagesOnly and thus icons are fairly important. One of the buttons I have (I will refer to it as The Button leads to a hidden ToolboxPage. The icons within that page work fine. However, the icon on the main ToolboxPage for The Button itself is overridden by a folder icon, instead of the image I assigned.

I want The Button to have an icon image I have made that represents the options presented in the hidden page. Is it possible to change this?

Thanks,
Sam

13
Automation Interface, Add-Ins and Tools / Colouring with scripts
« on: July 21, 2011, 02:13:54 am »
Hello!

I've been messing around with JavaScript scripts and testing out colouring elements based on tagged values. I've been able to do this, but I haven't been able to find a way to turn "Use Default Color" back on. Is this possible in the scripts?

Thanks,
Sam

14
Fixed. Turns out I was only importing the Toolbox profile and it seems you have to add that to an MDG technology for it to work.

I'm having trouble defining a custom toolbox. I've followed both the user guide and this blog tutorial, but my toolbox won't display properly.

I'm using EA v8.0.864, currently a trial version running in professional mode. I've defined the following things:

A package: <<profile>> Newbox
A class diagram: Newbox
1) <<metaclass>> ToolboxPage
2) <<stereotype>> MyToolbox1
 extends (1)
 - UML::Class = add a class
 - UML::Node = Node
3) <<metaclass>> ToolboxItemImage
4) <<stereotype>> UML::Class
 extends (3)
 - Icon = {valid image path}

When I export this as a UML profile, from either the diagram or the package, and import it either as part of an MDG technology or directly into resources, the resulting toolbox displays only the following:

MyToolbox1 (with stereotype icon)
UML::Class (with custom image)

The buttons do nothing. Am I doing it wrong somehow? Is this a problem with the version?

Thanks,
Sam

Pages: [1]