Book a Demo

Author Topic: Expand selected Elements  (Read 6334 times)

gunnar

  • Guest
Expand selected Elements
« on: December 19, 2002, 06:36:21 am »
I'm looking for a way to expand e selected element by n levels on a diagram. Couldn't find it in EA.  ???
In Rose, its the Menu Query --> Expand selected Element

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Expand selected Elements
« Reply #1 on: December 19, 2002, 07:07:09 pm »
Hi gunnar,

Many of us here are not familiar with Rose. Can you explain what you are trying to achieve ("expand the selected element by n levels")?

Jaime Gonzalez

gunnar

  • Guest
Re: Expand selected Elements
« Reply #2 on: December 20, 2002, 12:27:37 am »
Basically, I'd like to this:

- drag and drop an existing element, i.e. the actor 'salesclerk' onto a new diagram.
- focus salesclerk
- automatically add all elements (of a certain type) that are linked to the salesclerk to the diagram

Does that help?


gunnar

  • Guest
Re: Expand selected Elements
« Reply #3 on: December 20, 2002, 12:33:08 am »
Sorry, forgot to explain the 'n levels' part. What I've just described was expandig by 1 level. By '2 levels' means that the links of the newly inserted elements will also be resolved. By 'n levels' means to resolve all the links recursively n levels deep.

Hard to explain this early in the morning...

gunnar


Takeshi_KOUNO

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Expand selected Elements
« Reply #4 on: December 20, 2002, 03:13:38 am »
Hi gunnar,

I understand what you want to do, but as I know, EA has no function like that.

How to do like that, I think, as follows (not automatically):

1. select target element
2. show link property (property workspace is very useful)
3. at every linked item, "locate in project browser(explorer)", and drag into the diagram.

It's 1 level, but maybe I'll go mad if I do for 'n levels'... :'(

Takeshi KOUNO

gunnarwitschi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • Let's go sailing
    • View Profile
Re: Expand selected Elements
« Reply #5 on: December 20, 2002, 04:57:18 am »
Thank you. After reading your reply I had the idea of using the scripting interface to automate this. One level would actually be sufficient to begin with. But all I found was a Read-Only Interface. Is there a R/W interface?

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Expand selected Elements
« Reply #6 on: December 20, 2002, 11:08:51 pm »
Hi gunnar,

I know this is not the automated feature you are looking for, but here is the way I do it:

1. Select the element in an existing diagram and copy it to the clipboard by Ctrl+C. (I'm recommending this procedure, because you can select several elements at once by Ctrl+click, and then copying them into the clipboard by Ctrl+C.)

2. Go to the target diagram, single-click on any part of it (so the diagram is selected), and do Ctrl+V: the element or elements are copied into your diagram.

3. Double-click on the element, and select the Link tab in the dialog: all the elements linked to it are listed there. You can also find the element in the project tree, do a right-click, and select "Show usage": this shows all the diagrams where your element appears.

4. Copy (Ctrl+C in the source, Ctrl+V) into your target diagrams the linked elements. The associations are automatically shown.

You can hide any associations in the new diagram by right-clicking on them and selecting "Hide association".

Hope this helps.

Jaime

gunnarwitschi

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • Let's go sailing
    • View Profile
Re: Expand selected Elements
« Reply #7 on: December 21, 2002, 06:40:42 am »
Thanks for your ideas.

I decided that I will use some of my free time over xmas to develop an automation using the api from sparx. I don't know if I'll be successful but I'll give it a go and let you know if I found a way. (I guess this is also a good way to get back into programming, which I haven't done for a while...)

Merry xmas to y'all

gunnar