Author Topic: Shape script - centering text on connectors  (Read 3040 times)

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Shape script - centering text on connectors
« on: August 29, 2006, 03:04:08 pm »
Hi there,

I'm trying to add some text to a connector from a tagged value.  Is it possible to do a "moveto()" or otherwise to center the text on the connector?

here is my script:

shape main
{
h_align = "center";
v_align = "center";
if(HasTag("Future interface","true"))
Print("[future]");
else
Print("[current]");
}

The above makes the word "[current]" or "[future]" appear, however they are displayed to the right, adjacent to the source point of the connector - nowhere near the centre at all

Can someone please help me?

Cheers,
David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Shape script - centering text on connectors
« Reply #1 on: August 29, 2006, 03:32:30 pm »
Sorry Dave, but I don't know whether this can be done.

In the meantime I'm beginning to look for updates and docs for the Shape Script language. With that in mind, which EA build were you using?

David
No, you can't have it!

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Shape script - centering text on connectors
« Reply #2 on: August 29, 2006, 05:56:58 pm »
Hi David,

I am using EA 6.1.792.  I've just downloaded Beta 2 hoping the help file for shape script has been updated to include all the commands / features... but it hasn't yet.

Cheers,
David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Shape script - centering text on connectors
« Reply #3 on: August 30, 2006, 04:09:22 am »
Sigh... Life goes on I guess.

I know they extended the language in at least one aspect, but were keeping the version number at 1.0. We'll have to try to get them to move forward on this before another major EA version change.
No, you can't have it!

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Shape script - centering text on connectors
« Reply #4 on: August 30, 2006, 05:46:46 pm »
Agreed.

1. Normally with products like this, they put all the positioning, colouring and other attributes in script.

2. They then evolve the product to make the more common positioning requirements available via the UI  - the 80/20 rule as most users complain they don't want to know how to write code to simply position text / or colours conditional on property values

3. They then evolve the scripting language to something standardised (so they don't have to maintain it themselves) and to get greater community acceptance.

For now we are at step 1.

Having said that - I'd rather have shape script in the form it is now, than none at all.

Personally- the more visio like they can make this product in its presentation - the wider the acceptance in the marketplace.  At the end of the day, managers who hold budgets like nice diagrams....

I would go as far as have a "visio controls" mapping - so people could use Visio navigation and hotkeys etc... much the same as Microsoft did to wean off word perfect users...

Anyway - way off topic now!  :)

David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Shape script - centering text on connectors
« Reply #5 on: August 31, 2006, 12:40:16 am »
The only problem with 'lookalike' options is that users get annoyed when it doesn't work in exactly the same way.

Better to have a good (consistent, Paolo!) visual paradigm that fits the work being done rather than give false expectations.

Maybe just having the bullet point "Visio option" on the feature list would be enough, even if people never used it once they started !

But then you get into feature wars, and I don't think EA has ever done that - waste of effort, especially with Visio which is just a drawing tool ;-)