Book a Demo

Author Topic: Connector thickness  (Read 5369 times)

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Connector thickness
« on: November 02, 2018, 05:09:14 am »
Hi Everyone,
I recently created created a connector profile in an MDG, with a line thickness of 3 points.
This seems to work ok when I make the connection between elements on the same diagram, but when I drag those same elements onto a different diagram, the connector retracts to 1 point.

Is there a way I can do this in mdg? I have tried setting setpenwidth to 3 and tried setpen

drawnativeshape();
setpen(0,0,0,3);
setfillcolor(0,0,0);

but the connector all except the arrow head dissapears.

Thank you for any help.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connector thickness
« Reply #1 on: November 02, 2018, 06:27:02 am »
It should appear the same everywhere. If you're using V14, send a bug report. For older versions try in V14 and if it's the same there, also send a bug report.

q.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Connector thickness
« Reply #2 on: November 02, 2018, 07:56:24 am »
This seems to work ok when I make the connection between elements on the same diagram, but when I drag those same elements onto a different diagram, the connector retracts to 1 point.

Is that different diagram created with your MDG?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connector thickness
« Reply #3 on: November 02, 2018, 08:13:02 am »
Unless there's some MDG add-in wizardry the diagram type should not matter at all. Shape scripts are interpreted according to the stereotype in all diagrams in the same way.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Connector thickness
« Reply #4 on: November 02, 2018, 08:59:16 am »
Hi Everyone,
I recently created created a connector profile in an MDG, with a line thickness of 3 points.
This seems to work ok when I make the connection between elements on the same diagram, but when I drag those same elements onto a different diagram, the connector retracts to 1 point.

You presumably set the line thickness from the "Style" section of the Layout ribbon. That works on a single diagram link (or diagram object) only. If you set the line thickness by pressing F4, it will work on all instances of the connector (or element).


Quote
Is there a way I can do this in mdg? I have tried setting setpenwidth to 3 and tried setpen

drawnativeshape();
setpen(0,0,0,3);
setfillcolor(0,0,0);

but the connector all except the arrow head dissapears.

Thank you for any help.

You need to draw the line after setting the pen width, e.g.

setpenwidth(3);
moveto(0,0);
lineto(100,0);
« Last Edit: November 02, 2018, 09:09:49 am by KP »
The Sparx Team
[email protected]

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Connector thickness
« Reply #5 on: November 02, 2018, 07:36:13 pm »
This seems to work ok when I make the connection between elements on the same diagram, but when I drag those same elements onto a different diagram, the connector retracts to 1 point.

Is that different diagram created with your MDG?

Yes AND out of the box diagrams also

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Connector thickness
« Reply #6 on: November 02, 2018, 07:44:21 pm »
I tried
setpenwidth(3);
moveto(0,0);
lineto(100,0);

As suggested by the Sparx team and it worked perfectly - thank you.