Book a Demo

Author Topic: Element resize & Port array  (Read 4499 times)

strongpine

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Element resize & Port array
« on: July 06, 2015, 11:45:34 am »
i'm using EA 9.

"Add New" Function gets the locate information by string. but I want to insert the information as a formula. something like, "2 x+10". is this possible??


if you feel hard to understanding, I apologize about my bad english skills.  :-[ :-[

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Element resize & Port array
« Reply #1 on: July 06, 2015, 02:48:38 pm »
Can you explain what you mean by "locate information"?

q.

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Element resize & Port array
« Reply #2 on: July 06, 2015, 04:40:08 pm »
Hello strongpine,

You can create a new Diagramobject by AddNew function with empty location information, then you can specify Diagramobject.Top, Bottom, Left and Right properties by using the 'formula'.
After setting the properties, call Diagramobject.Update.

HTH,
--
t-kouno

strongpine

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Element resize & Port array
« Reply #3 on: July 07, 2015, 10:16:55 am »
Hello, qwerty! i mean "l = 10; r=20; t=10; b=20" like this!

and i think "T kouno" solve the problem!

I appreciate all you guys answer! Thx!

strongpine

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Element resize & Port array
« Reply #4 on: July 07, 2015, 02:55:18 pm »
[code][dim testDiagramObject as EA.DiagramObject
      set testDiagramObject = diagramObjects.AddNew( "", "" )
      testDiagramObject.top      = 150
      testDiagramObject.bottom= 200
      testDiagramObject.left = 100
      testDiagramObject.right = 200
      testDiagramObject.ElementID( testElement.ElementID )
      testDiagramObject.Update()/code]

it isn't work... :'( :'( what's wrong?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Element resize & Port array
« Reply #5 on: July 07, 2015, 07:32:05 pm »
Down is negative. Like in real cartesian systems if top left is (0|0) you need to address the y-coordinate negative to see it.

q.