Book a Demo

Author Topic: SysML - how to get dashed controlFlow links  (Read 5822 times)

Van Lepthien

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
SysML - how to get dashed controlFlow links
« on: February 02, 2010, 06:37:21 am »
Running 7.5.850, Corporate Edition.

When using the SysML Example Model, I can get a ControlFlow to appear as a dashed line by giving it a <<controlFlow>> stereotype.

In any other model where I create and use SysML ControlFlows (whether or not I have loaded SysML under Add-Ins), I cannot seem to get them to appear as dashed lines. There is no controlFlow stereotype avaliable, and the toolboxes available under MDG Technology for SysML (loades with the sample project) differ significantly from those available otherwise.

What would be nice:

  • The ability to format a control flow as a dotted line. This is consistent with SysML 1.1.
  • An example that was consistent with behavior outside of the example.

Does anyone have a technique for accomplishing the former?
« Last Edit: February 02, 2010, 06:38:09 am by VLepthien »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: SysML - how to get dashed controlFlow links
« Reply #1 on: February 02, 2010, 09:04:36 am »
If you want a control flow with a dashed line, you can define your own stereotype with a shape script. Go to Settings>UML, on the Stereotypes tab press New, set the Stereotype (e.g. to "controlFlow"), set the Base Class to "controlflow", select the Shape Script radio button, press Assign, enter the following shape script:
Code: [Select]
shape main
{
      noShadow=true;
      setlinestyle("DASH");
      moveto(0,0);
      lineto(100,0);
}
and you should be good to go.

If you would like to log a formal feature request, we can consider adding this presentation option to our SysML 1.1 technology.
The Sparx Team
[email protected]

Dave.B

  • EA User
  • **
  • Posts: 94
  • Karma: +0/-0
    • View Profile
Re: SysML - how to get dashed controlFlow links
« Reply #2 on: March 27, 2010, 12:18:00 am »
As it happens I've dropped lucky because I had just come across this limitation also. So KP's shape script is a good solution, but is there anyway of hiding the stereotype as the dashed line clearly distinguishes the flow as a control flow?

Thanks
Dave B.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: SysML - how to get dashed controlFlow links
« Reply #3 on: March 27, 2010, 12:57:57 am »
Use the hidelabel("<Labelname>") method.  You'll have to check the line to see which label is being use for the stereotype.  I think, from memory, that if you have a reflexive relation, the label is different to non-reflexive.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

DavidL

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: SysML - how to get dashed controlFlow links
« Reply #4 on: April 06, 2010, 05:07:55 am »
Here is the shape script that combines the two items together.  This worked on my EA 8.0 Beta 3 SW

shape main
{
      noShadow=true;
      setlinestyle("DASH");
      moveto(0,0);
      lineto(100,0);
      hidelabel("MiddleBottomLabel");
}