Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ChB

Pages: [1] 2 3
1
General Board / Re: Drawing relationships between documents.
« on: April 22, 2016, 05:33:51 pm »
That's a handy tip.  Thanks Dermot.

2
General Board / Re: Drawing relationships between documents.
« on: April 22, 2016, 01:01:13 am »
Phil

Oh yes, thanks for that.  And in the "linked document" I put a hyperlink to a document on the WAN or LAN.

The Artifact elements are in the Project Browser so I can drop them (as links) into various diagrams as necessary.

I'll run with this solution for a while and see how it goes. It has the advantage of working out-of-the-box but if I want more bells and whistles I like Peter's ideas too.

Thank you.

3
General Board / Re: Drawing relationships between documents.
« on: April 21, 2016, 09:17:13 pm »
Helpful answer, thanks Peter.   I might duplicate your idea.  Thanks for the reply.

Alternatively, using zero customisation of EA, but taking your idea of there being some-sort-of-prompt to the user that there is a document "behind" this element,  I could simple place the hyperlink to the external document in the "linked document" (possibly the only thing in the linked document).   For free I get the little red A icon in the element prompting the user to click through to the hyperlink.

I might end up using both ideas for different purposes in my model.

4
General Board / Drawing relationships between documents.
« on: April 21, 2016, 07:31:26 pm »
Hello All

I want to capture in my model, and draw a diagram of, a hierarchy of Engineering Documents and references between documents and to other elements in the model.

There's a wide range of documents I want to depict: Company and Worldwide Standards, Test Results, Supplier Data Sheets, etc., etc.  They're pretty well always Microsoft Office format or PDF.

I want to have elements on a diagram that represent each document and I want to double-click on that element to have the document open.  And I also want the element (for each document) to appear in the Project Browser so that I can reuse that element in various other diagrams.

In my mind this sounds easy... but I can't do it!

A "hyperlink" from the "Common" toolbox gives me something in a diagram I can double-click on to open the document, good,  but hyperlinks don't appear in the Project Browser (bad).

Adding a hyperlink to the notes of a block, for example, gives me something in the Project Browser (good) but doesn't provide a quick way of getting to the linked document (I have to click through to the properties dialog, then ctrl-click the link - and that doesn't always appear to work).

I've also tried the <<artefact>> element from the Common Toolbox and that doesn't provide the double-click through to the external document either.

Is there (an obvious?) way to do this that I've overlooked?

ChB

5
General Board / Re: Mass Update of Components
« on: April 20, 2016, 11:44:19 pm »
See here for my thread on using export/import for a similar bulk change:
http://sparxsystems.com/forums/smf/index.php/topic,30458.0.html

6
General Board / Re: Export/Import to upgrade SysML elements.
« on: April 20, 2016, 11:42:58 pm »
UPDATE:
I did manage to upgrade from SysML 1.1 to 1.4.
The bulk of the work was done with careful use of these 4 steps:
(1 of 4) export to csv
(2 of 4) edit the csv
(3 of 4) import the csv
(4 of 4) Synchronise Stereotype
(5 of 4 ;) ) Some manual fiddling was required too.
(6 of 4 ;) ) Rinse and repeat.

I found it useful and reassuring to manually setup an element as I want the others to be like, then when editing the csv file I could look at that one (in the csv file) to see how the others need to be changed.


7
General Board / Re: Mass Update of Components
« on: April 20, 2016, 11:09:48 pm »
Have you considered these steps:
  • a CSV export
  • manual edit (search and replace) in the CSV file
  • a CSV import
  • finally right click on the element type in the toolbox and select "Synchronise Stereotype"

Of course make sure you've got a backup first!

I've used the above recipe for a mass update of a different type of element.  Does it work for your components?  I'm not sure if you have a Synchronise Stereotype option for Components.

8
Bugs and Issues / Re: Nested Ports behaviour when copying to clipboard
« on: April 20, 2016, 08:15:55 pm »
I think I have reproduced the symptoms you describe (or similar symptoms) and it might be related to this thread regarding the width/height of ports containing other items (e.g. other ports or interfaces): http://sparxsystems.com/forums/smf/index.php/topic,30558.msg222464.html#msg222464

If you resize your blocks and parent ports to be "plenty big enough" in width and height, and move the ports away from the corners of their parent does the symptom go away?

What I've reproduced just now is nested ports moving from a side edge (in the original diagram that I'm copying from) to the bottom edge (when pasted into a new diagram). Are yours moving in the original diagram as you do the copy copy (not when doing the paste)?

9
Thanks Geert for the encouragement and your useful example.

Following further experiments my feelings are:

1) It's not possible to replicate the native shape's resize behaviour via a shape script.  For example, if the name of an element wraps over several lines, native shapes resize correctly whereas homemade shapes don't.  By incorrect I mean that the text from one compartment can overlap with another.

2) The documentation for the shape script language is lacking.  For instance I notice (from Geert's example) that AddSubShape() can take 5 parameters whereas the user guide and tooltip indicate it can take 1 or 3 parameters only.

Tip for other learners: watch out for x,y parameters being either absolute or percentage - that tripped me up at one point!

I've decided (at the moment) to keep things simple and to use the native shape with the tags I always want to see squeezed-in in the top left corner:

shape main
{
   DrawNativeShape();
   addsubshape("tagscompartment",100,20);

   shape tagscompartment
   {
      println("#TAG:MyTag_1#");
      println("#TAG:MyTag_2#");
   }
}


Or even more simply:

shape main
{
   DrawNativeShape();
   println("#TAG:MyTag_1#");
   println("#TAG:MyTag_2#");
}


That's not "big or clever" but I think it serves my need.  The first line (first tag) is shared with the <<stereotype>> label, the second line (second tag) is shared with the element's alias label (because I have "show alias" switched on).

Do people want to refute my (1) above and demonstrate otherwise?

Cheers,
ChB

10
Okay, thanks qwerty.

I've been trying these help topics and can't get the sizing (and resizing) right.

http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/example_scripts.html
and
http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/add_custom_compartments_to_ele.html


The help on adding compartments appears to be in the context of child-elements, not for "this" element.

Here's the best I've got so far:
shape main
{
   rectangle(0,0,100,100);
   
   AddSubShape("namecompartment", 100, 20);
   addsubshape("tagscompartment", 100, 10);
   addsubshape("notescompartment", 100,30);
   
   shape namecompartment
   {
      h_align = "center";
      println("<<#stereotype#>>");
      println("#name#");
   }
   
   shape tagscompartment
   {
      rectangle(0,0,100,100);
      println("MyTag_1: #TAG:MyTag_1#");
      println("MyTag_2: #TAG:MyTag_2#");
   }
   
   shape notescompartment
   {
      h_align = "center";
      println("notes");
      println("#notes#");
   }

}


The above script is "not bad" but it doesn't resize correctly as (say) the notes field is longer/short or the user resizes the element in a diagram.

Here's another attempt, using DrawNativeShape() to start with the existing shape.  Here my two tags are drawn top-left of the shape over the top of the shape's stereotype label and title text.
shape main
{
   DrawNativeShape();
   addsubshape("tagscompartment", 100, 100);
   
   shape tagscompartment
   {
      println("MyTag_1: #TAG:MyTag_1#");
      println("MyTag_2: #TAG:MyTag_2#");

   }
}



I might have to give-up with this and find a better strategy: I was attempting to have a specialised "requirement stereotype" for all requirements to do with a set of messages.  The system I'm modelling will have about 100 messages each with a Message_ID and a Message_Name.  I want one requirement for each message and that requirement to have a fields for the message ID and message name.  I could embedded the message ID and Name in the requirement title.... but I was hoping to have a more "concrete", less free-text, method.

11
Bother, I've not managed to display tags with a shape script.  I like the sound of qwerty's suggestion but I can't work out how to write the shape script.

Ideally I'd like the element to be drawn "as normal" but with the addition of a new compartment for the tags I want to always show.

This help topic looks like exactly what I want:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/add_custom_compartments_to_ele.html
However that appears to be for "child elements" whereas I'm working with this-element's tags.   I've read all(?) the other related help topics and examples, searched the forum and looked at the ebook: https://leanpub.com/shapescript

I've tried building the shape "from scratch".  Like this:
shape main
{
   rectangle(0,0,100,100);
   
   addsubshape("namecompartment", 100, 30);
   addsubshape("tagscompartment", 100, 30);
   addsubshape("notescompartment", 100,40);
   
   
   shape namecompartment
   {
      h_align = "center";
      //rectangle(0,0,100,30);
      println("<<#stereotype#>>");
      println("#name#");
   }
   
   shape tagscompartment
   {
      //rectangle(0,0,100,30);
      println("MyTag_1: #TAG:MyTag_1#");
      println("MyTag_2: #TAG:MyTag_2#");
   }
   
   shape notescompartment
   {
      //rectangle(0,0,100,40);
      SetCompartmentName("notes");
      println("#notes#");
   }

}


This looks close but I've a couple of issues I need help with:

1) How do I get the stereotype and name (in the namecompartment) to be drawn in bold font?
2) How do I draw the notes in gray color, italic font?
3) How do I position the compartments correctly (vertically) and have horizontal lines between them? (Note I've commented out calls to rectangle in the script above... I don't know how/where to position them).




12
Sorry, no, not using them... but your post has made me read about them a little bit.  I think they might be of use to me for modelling "specific configurations" from a "generic model" (that makes sense to me at least!  ;) ).

Are you stuck with how to use them in EA or more generally what they're used for?

The book, "A Practical Guide to SysML", 3rd Edition, Friedenthal, Moore and Steiner discusses them around section 7.  Have you got that book, does it help?

Do you need to use a "binding connector"? 

I'd like to experiment but I'm battling with something else at the moment.   Hopefully you or someone else will be able post more here and teach us something new.

13
That's a clear response, thanks qwerty.  I'll roll-up my sleeves and learn about shape scripts :-)
Many thanks.

14
Hello all

I'd like to show some element tags, but not others, in the tags compartment of elements on a diagram.

I'm using EA 12.1 Sys Eng and SysML 1.4.   I've extended some SysML types via a profile by adding tags (as described here: http://sparxsystems.com/forums/smf/index.php/topic,30606.msg222941.html#msg222941)

I'd like to display my new tags in the element's compartment but not other tags that I don't use (e.g. id, risk, source).   Is that possible?
I guess it could either be done at "display time" when I add the element to a diagram, or more likely at the time I create the new element type in a profile - I don't know how to though.
Any hints?



15
Bugs and Issues / Re: Handling of enumeration Tagged Vlaues
« on: April 18, 2016, 11:13:01 pm »
Earlier in this thread Geert suggested:
Quote
... I'm only using tagged values in combination with UML Profiles (like they should be used in fact  ;D).
So I never need to add a tagged value myself, they are already there.

I though that was a useful hint and I such I've learned a bit more about creating and using profiles.... and specifically using tags in profiles to help-with (not actually solve) the problem described in the Original Post.

Posting here in case it helps others:
The following white paper explains how to add default tags to a profiled element: http://sparxsystems.com/downloads/whitepapers/Requirements_Management_in_Enterprise_Architect.pdf (see last section before the glossary).  It was not obvious to me that I'd need to  use Attributes to create Tags when creating the extended element in a profile.  The example given in the white paper uses enumerations and as such adds the enumerations to the Profile Diagram.  I just needed tags with text and number values so I created some attributes to my profiled elements using the normal built in types.

So much more to learn!
ChB

Pages: [1] 2 3