Book a Demo

Author Topic: Line Styles  (Read 4956 times)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Line Styles
« on: August 31, 2007, 10:34:23 am »
In a Domain Class Diagram, is there a way to alter line color or line style, e.g., dashed, dotted, solid, etc. for certain lines.  I find in one diagram that I am working on now that there are a couple of key classes which attach to almost everything else, e.g., like a note, and it would be helpful in being able to see what was going on if I could do something like color every link to Note with a distinctive color.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Line Styles
« Reply #1 on: August 31, 2007, 11:12:42 am »
Thomas,

I don't know the answer off-hand. But...

You can define a shape script for a stereotyped line. Perhaps if you did that, then hid that stereotype so it would not display, you could get the results you want.

David
« Last Edit: September 01, 2007, 10:33:28 am by Midnight »
No, you can't have it!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Line Styles
« Reply #2 on: August 31, 2007, 12:03:40 pm »
Well, I poked around at that a little bit and came up with:

shape main
{
setpen(0,255,0,1); // (R,G,B)
setfillcolor(0,255,0); // (R,G,B)
rectangle(0,0,100,0);
}

Which does get me a green line, but there is a sort of gray ghost line alongside of it.  The explanations aren't too extensive in the help...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Line Styles
« Reply #3 on: August 31, 2007, 01:04:16 pm »
Try getting rid of the fill color and the rectangle. Also, make sure the script is set to draw a line. [I think I remember something about this, but I'm not sure. Check whether it is controlled by stereotyping an association rather than a classifier.]
No, you can't have it!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Line Styles
« Reply #4 on: August 31, 2007, 01:58:47 pm »
It is the same without the fill color, but without the rectangle I get no line!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Line Styles
« Reply #5 on: September 01, 2007, 10:43:30 am »
What about lineto instead of rectangle?

Also, try defining a subshape for each of "source" and "target" to see if that causes anything to appear.

Unfortunately there don't seem to be any relevant examples. I even downloaded another copy of the SDK beta (in case it has been updated) and there's nothing there.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Line Styles
« Reply #6 on: September 02, 2007, 01:54:39 pm »
The "gray ghost" is a shadow that can be disabled by setting noshadow="true".

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Line Styles
« Reply #7 on: September 02, 2007, 02:04:47 pm »
Just a note on the SDK - it is back in the EA User Guide, as a separate section. This makes it available to users who do not have internet access. There has been some technical update since the beta version, but not much in the area of Shape Scripts.

BTW - The SDK section is effectively at the same status as the rest of the User Guide - open for business but subject to update and improvement.

Regards

Roy
« Last Edit: September 02, 2007, 02:23:11 pm by RoyC »
Best Regards, Roy

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Line Styles
« Reply #8 on: September 03, 2007, 04:59:32 am »
Thanks Roy,

But could you please clarify what you meant by these two statements?
Quote
Just a note on the SDK - it is back in the EA User Guide, as a separate section.
[...]
The SDK section is effectively at the same status as the rest of the User Guide - open for business but subject to update and improvement.

Thanks much,
David
No, you can't have it!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Line Styles
« Reply #9 on: September 03, 2007, 08:24:46 am »
Where is this noshadow set?  I tried:

shape main
{
setpen(0,255,0,1); // (R,G,B)
noshadow="true";
rectangle(0,0,100,0);
}

And that gives me an error pointing at the noshadow.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Line Styles
« Reply #10 on: September 03, 2007, 01:12:27 pm »
According to the grammar published in the help file the attribute assignments need to be set at the start of the shape.

Code: [Select]
shape main
{
noshadow="true";
setpen(0,255,0,1); // (R,G,B)
rectangle(0,0,100,0);
}

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Line Styles
« Reply #11 on: September 03, 2007, 01:42:42 pm »
The SDK:

When we created the beta release of the SDK, we copied material from the EA User Guide and added to it. We intended to have the SDK as a separate document, and once it was finished we would have cleared out the duplication from the EA User Guide.

However, we established that having a separate SDK would create problems with access to and use of the material in both documents, so we restructured the User Guide to contain the SDK as a discrete section.

For beta review, the SDK was still in a rough form and the additional material was not available to the full EA user population. It has now been cleaned up and structured properly. As a component of the User Guide, it is now available in 'production' status through the software and the website. We will continue to review the whole User Guide - including the SDK - and make improvements and additions as the need arises.

HTH

Roy

« Last Edit: September 03, 2007, 01:54:47 pm by RoyC »
Best Regards, Roy

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Line Styles
« Reply #12 on: September 03, 2007, 03:53:54 pm »
Bingo, putting it first removes the complaint and produces the desired result.