Book a Demo

Author Topic: How to set label visibility?  (Read 6423 times)

alexd

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • Headshot!
    • View Profile
How to set label visibility?
« on: August 27, 2009, 10:43:28 pm »
Hi all
I need a script that sets the visibility of the labels of all connections/diagramlinks in the diagram. I have a large number of datamodel diagrams and everywhere I'd like to set up the same labels visibility. Specifically, I need to set the visible item Middle top label, then all other items set as invisible.
Unfortunately I can not find the right property or method that I used for this setting. I use VBScript in an internal scripter, EA 7.5. Other languages also manage, VB is not a requirement.
What's this world coming to?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to set label visibility?
« Reply #1 on: August 27, 2009, 10:48:45 pm »
We had a recent topic about diagramlinks that might interest you:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1250840058
Starting from there I guess it's just a matter of finding out where to set the visibility of the labels.
I suggest you start looking at the Style(Ex), Properties and Custom Properties of the Connector as a start.

Geert

alexd

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • Headshot!
    • View Profile
Re: How to set label visibility?
« Reply #2 on: August 28, 2009, 12:06:03 am »
Hi Geert
Thank you for your reply.

The corresponding properties are located in the property Geometry of DiagramLink object. All properties are in a string of text and is very crazy to parse the string, repair and assembly.
I think that normalization of data model (of EAP DB) would be appropriate.
What's this world coming to?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to set label visibility?
« Reply #3 on: August 28, 2009, 02:21:03 am »
Quote
I think that normalization of data model (of EAP DB) would be appropriate.
That's quite an understatement.
A redesign of the database is something we are asking for a long time now.
Most of EA users are people who are working in the field of IT architecture and/or design, and it just hurts to see such a bad database design.
The reason I think EA has the database it has now is that Sparx wanted to keep the database stable; which they did for years. That of course has its advantages, I think you can still mix version 6 with version 7.5 clients. The downside is that for every new feature that was not foreseen in  the original db design, the had transform another field into a "Magic String" monster.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to set label visibility?
« Reply #4 on: August 28, 2009, 10:57:24 am »
Quote
Quote
I think that normalization of data model (of EAP DB) would be appropriate.
That's quite an understatement.
A redesign of the database is something we are asking for a long time now.
Most of EA users are people who are working in the field of IT architecture and/or design, and it just hurts to see such a bad database design.
The reason I think EA has the database it has now is that Sparx wanted to keep the database stable; which they did for years. That of course has its advantages, I think you can still mix version 6 with version 7.5 clients. The downside is that for every new feature that was not foreseen in  the original db design, the had transform another field into a "Magic String" monster.

Geert
"Verily, thy lips hath said it..."

As a Data Architect, it HURTS even more....

Paolo
« Last Edit: August 28, 2009, 10:58:36 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

alexd

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • Headshot!
    • View Profile
Re: How to set label visibility?
« Reply #5 on: August 28, 2009, 04:26:06 pm »
I understand the requirement for compatibility between multiple closest  versions of the EA. But the drag the weight of past I think is wrong.

A separate chapter is the lack of API and SDK/API doc. I love the new functionality - Scripter, because they already do not have a lot of support scripts somewhere in the directory. Use Scintilla for syntax highlighting is a great choice. But every user, who has no experience with writing scripts for EA, he'd rather prematurely terminates writing a script, than to search the inadequate documentation and search the web.

Cry pretty, but in the wrong grave.

Thank for your support. Good luck  ;)
What's this world coming to?