Book a Demo

Author Topic: embedded elements in diagrams  (Read 4713 times)

Anna

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
embedded elements in diagrams
« on: September 17, 2008, 01:02:04 am »
Hi,

I have a problem creating diagrams via automation.
When I add components and their ports to a diagram, i can change the components location and size, but not the ports location or size. The Ports allways shown in the upper left corner, far away from the components they belong to.
During my many tries to move the ports i found out, that the status bar in EA tells me the correct position, even if the ports shown somewhere else.

Until now I only figured out one way to make the ports go to where they belong to: When I move the components manually, the ports jumping to their places.

Any suggestions how to move the ports automated?

Anna

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: embedded elements in diagrams
« Reply #1 on: September 17, 2008, 01:44:56 am »
Sorry, it seems it was only a problem with the variables i use.
I think i can move ports now.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded elements in diagrams
« Reply #2 on: September 17, 2008, 01:46:24 am »
The obvious first question is: did you call refresh() after moving the ports? [I know, I know, but we all forget sometimes.] That said...

What happens if you force a diagram refresh after moving the ports? [I mean that you should do all these through automation, not the UI.] Does that cause the ports to snap into position?

If refreshing the diagram does not work, what about reloading the project?

David
No, you can't have it!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded elements in diagrams
« Reply #3 on: September 17, 2008, 01:47:21 am »
What variables were you using, and what turned out to be the problem? [Just in case any of us trip over the same thing.]
No, you can't have it!

Anna

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: embedded elements in diagrams
« Reply #4 on: September 17, 2008, 02:05:22 am »
It was a very simple and well hidden mistake. I just set the variables to 0 somewhere in the deeps of my code.

But I'm still wondering why i have to move the ports to the components by myself and there is no way to let EA move them without moving the components.
Or is there any way?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: embedded elements in diagrams
« Reply #5 on: September 17, 2008, 07:38:52 am »
Not that I know of. Of course you could always try moving the component only, then reloading the diagram. Somehow I don't think it would work, but you never know.

NB: Perhaps you could select the set of items through automation, then move them. I have no idea if that would have any effect on any of them. If it did, it might handle the set.
No, you can't have it!