Book a Demo

Author Topic: How to draw a line without connecting any elements  (Read 9751 times)

jaybright

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
How to draw a line without connecting any elements
« on: October 28, 2011, 07:11:22 am »
Hi There,

I want to draw a line (an arrowed line) at an arbitrary place without having to connect any elements. How to do this?

Thanks,

Jay

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #1 on: October 28, 2011, 08:23:26 am »
Place a boundary and select an alternate image containing an arrow. EA its not Visio...

q.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #2 on: October 28, 2011, 09:38:57 am »
Alternatively you could create some stereo types for boundary that create the lines or arrows you want using shapescripts. You do this via the menu settings>UML...
1. Create a stereotype for boundary called "arrow - right"
2. Assign a shape script to the  stereotype.
Here is a shape script example of an arrow pointing to the right.
Code: [Select]
shape main
{
    startpath(); // Start to trace out a path
    moveto(0,25);
    lineto(0,75);
    lineto(75,75);
    lineto(75,100);
    lineto(100,50);
    lineto(75,0);
    lineto(75,25);
    lineto(0,25);
    endpath();  // End tracing out a path
    // Fill the traced path with the fill color
    fillandstrokepath();
    
    addsubshape("namecompartment", 75,130);
    shape namecompartment
    {
        h_align = "center";
          v_align = "center";
        editablefield = "name";
        println("#name#");
    }
}
Hope that helps :)
« Last Edit: October 28, 2011, 09:53:57 am by phenzell »
Happy to help
:)

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 draw a line without connecting any elem
« Reply #3 on: October 28, 2011, 03:59:29 pm »
Since 9.1 you have the Whiteboard toolbox which contains arrows and directed lines.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #4 on: October 28, 2011, 05:09:27 pm »
Also (and I don't recommend this approach for any kind of real modelling, but I have used it in the past for grabbing screen shots) you could draw a connector between two classes and apply the stereotype «invisible» to the two classes. The stereotype would need to apply the following shape script:

Code: [Select]
shape main
{
}
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #5 on: October 28, 2011, 05:55:43 pm »
Quote
Also (and I don't recommend this approach for any kind of real modelling, but I have used it in the past for grabbing screen shots) you could draw a connector between two classes and apply the stereotype «invisible» to the two classes. The stereotype would need to apply the following shape script:

Code: [Select]
shape main
{
}

How does that look like if you have enabled to display the full name space? Strange, I guess :-)

q.

jaybright

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #6 on: October 29, 2011, 06:17:57 am »
Thanks everybody for your responses. I will try the methods. And based on these, can I draw conclusion that for general purpose drawings, Visio is a better tool than EA? I'm trying to use EA for both general and UML diagrams, but it might not be a good idea. Personally I love both Visio and EA.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #7 on: October 29, 2011, 07:36:55 am »
EA is for UML modelling. It uses UML which is a language (like Chinese which also uses symbols). Visio is a drawing tool. It can also draw symbols (and partially understands UML). But it's language is more like that of a Picasso or van Gogh. A different abstraction. On a low level you can easily live with both tools. But when you want to speak fluent UML you need something like EA.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #8 on: October 31, 2011, 04:56:23 pm »
Quote
EA is for UML modelling. It uses UML which is a language (like Chinese which also uses symbols). Visio is a drawing tool. It can also draw symbols (and partially understands UML). But it's language is more like that of a Picasso or van Gogh. A different abstraction. On a low level you can easily live with both tools. But when you want to speak fluent UML you need something like EA.

q.
Indeed so... Just to emphasize the difference between a drawing and a model, if you copy an EA element from one diagram and paste it into another diagram you have the same object.  If you do that with Visio (even withing the same drawing or page) you get a new object.

You can only create a model by linking a drawing tool with a repository.  Oh, wait - that's what Sparx did with EA!  ;) (1)

My AU$0.05

Paolo

(1) yes, I know - it should be linking a repository with a drawing tool.

Actually, EA doesn't , in my view, provide NEARLY ENOUGH drawing tool functionality to really visualise the model effectively - but that's another story.
« Last Edit: October 31, 2011, 04:56:54 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #9 on: November 01, 2011, 01:03:31 pm »
Quote
Actually, EA doesn't , in my view, provide NEARLY ENOUGH drawing tool functionality to really visualise the model effectively - but that's another story.

I agree, and until it does Visio will continue to be used as a modelling tool !
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #10 on: November 01, 2011, 07:41:07 pm »
Usage of Visio as modelling tool is completely okay. As long as you can express what you need. It's like with my example above: a poet will use a typewriter and a painter will use a brush. You can achieve similar things if both exchange their tools and it might in both cases be art. But different. And many (most) books present a mixture of poetry and painting.

q.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: How to draw a line without connecting any elem
« Reply #11 on: November 02, 2011, 06:17:55 am »
I agree the expression is highly important, the tool less so.
In this case though, 10 pictures or poems don't make a model to me, that is maintainable, extendible, and has the requisite metadata.
Bring on improvements to EA diagrams I say (perhaps the artistic amongst us can produce a poetic MDG add on, with parameter driven metre)
[size=8]
8.0 diagram enhancements
9.0 diagram enhancements[/size]
« Last Edit: November 02, 2011, 06:20:29 am by skiwi »
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.