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 - Polymorph

Pages: 1 2 3 [4] 5 6 ... 9
General Board / Re: mdg profile toolbox
« on: August 20, 2016, 01:21:58 am »
This process may not be supported in EA 9, but in later versions you can define the toolbox by editing the toolbox field within the diagram extension

First, create the stereotype to extend your diagram (using the Add Diagram Extension profile helper - if they are supported in EA 9)

You'll end up with something like this:

Then, edit the toolbox Profile entry and set it to whatever you want. You can set it to an existing toolbox (e.g. SysML) or a custom one

I have found an alternate solution too!

The process I was using to copy the elements on a sequence diagram is:
  • Selecting all the elements on the diagram (CTRL + A).
  • Using CTRL + C to copy to clipboard
  • Creating a new sequence diagram (with my custom MDG extensions including a bespoke diagram frame tag)
  • Ctrl +V to paste the elements on the diagram

The result of this process was a complete mess - and none of the messages between lifelines were recreated in the diagram and all of the diagram fragments were all over the place  ::)

The way to do it is to follow steps 1-3, but when you have created a new diagram either
  • Right click on the diagram canvas and select Paste Elements as New
  • Use the keyboard shortcut (CTRL + SHIFT + V)

Now EA will replicate all the original features of the diagram in a new diagram perfectly.

Not the first time I've been caught out with differences between pasting as links and pasting as new elements :o


So I guess I have to ask myself the question: do I feel lucky?... Well do I? PUNK!

(No I don't feel lucky - not given my lack of experience with VB script writing)

And no one knows a way of copying the contents of a Sequence Diagram into clipboard and then pasting those elements including messages between lifelines-lines onto a new diagram?

And there's no other way to change it?!?  :-\

I have tried creating a new Sequence diagram (using our MDG technology) and then copy-pasting elements between the current diagram and the new one but that only copies the lifelines and any diagram fragments - the message lines are not duplicated.

I don't really care how I do it - I just need a way to take the contents of a standard Sequence diagram and then produce a version that conforms to our company standard

So that's the only thing I need to do to change a diagram type? Really??? I'm not complaining if that's right but I'm frankly amazed (given my lack of experience with VB scripts) that I hit on the right idea straight away! Beginner's luck perhaps?

I have created an MDG that extends the SysML sequence diagram and need to change some of my sequence diagrams to this new type. Unfortunately, EA won't let me change a sequence diagram to any other type of diagram (that option is greyed out in the menu).

I am guessing that it must be possible somehow but that it might need to be done using a script...

From digging around in the SQL database it seems that the following field in the t_diagram.StyleEx table makes reference to the type of diagram. For example, on my standard SysML Sequence diagram this field reads:
ExcludeRTF=0;DocAll=0;HideQuals=0;AttPkg=1;ShowTests=0;ShowMaint=0;SuppressFOC=0;INT_ARGS=;INT_RET=;INT_ATT=;SeqTopMargin=30;MatrixActive=0;SwimlanesActive=1;KanbanActive=0;MatrixLineWidth=1;MatrixLineClr=0;MatrixLocked=0;TConnectorNotation=UML 2.1;TExplicitNavigability=0;AdvancedElementProps=1;AdvancedFeatureProps=1;AdvancedConnectorProps=1;ProfileData=;MDGDgm=SysML1.3::Sequence;STBLDgm=;ShowNotes=0;VisibleAttributeDetail=0;ShowOpRetType=0;SuppressBrackets=0;SuppConnectorLabels=0;PrintPageHeadFoot=0;ShowAsList=0;Whiteboard=1;SuppressedCompartments=;SaveTag=4B2FDBD8;

So, I was thinking that it might be possible to write a script to change this value

I am very new to EA scripting and have very little VB experience, but have managed to get a script to to a find-and-replace within this field using the following code:

Code: [Select]
sub OnDiagramScript()

' Get a reference to the current diagram
dim currentDiagram as EA.Diagram
set currentDiagram = Repository.GetCurrentDiagram()


'declare variable to store style string
dim DiagramStyleString
'store style string
DiagramStyleString = currentDiagram.StyleEx
'do a find a replace
DiagramStyleString=replace(DiagramStyleString,"MDGDgm=SysML1.3::Sequence;","MDGDgm=Protean Architecture Framework::System Interaction View;")

end sub

But that didn't work - not that I'm surprised!

Uml Process / Launching Package Browser
« on: August 13, 2016, 01:46:09 am »
Is there any way to launch the package browser automatically by double clicking on a that has been placed on a diagram?


Uml Process / Re: Custom Toolbox Creation
« on: August 11, 2016, 05:45:16 pm »
The new element dialog doesn't list packages.

So the only way I can create packages using my toolbox is by creating a package diagram and then dropping my custom element onto it?

Uml Process / Custom Toolbox Creation
« on: August 11, 2016, 01:34:52 am »
I am defining a custom toolbox by creating a MDG Technology.

I have successfully created a toolbox using the Profile Helper (see and have managed to drop elements from it onto a diagram  :D

However, if I try to add an element directly to the browser (Right click | Add Element), although I can find my MDG toolbox, there are no elements listed in it  ???

I've clearly missed a step somewhere but I have no idea where!

Any help would be appreciated (thanks for your continuing support - I seem to be monopolising this forum at the moment!!!)

Uml Process / Re: Extending non-UML diagram types
« on: August 10, 2016, 12:21:56 am »
Some diagram types have different behaviours depending on whether they are the (native) UML or (MDG-based) SysML. For example, if you create a SysML activity diagram, you can right-click on the background of the diagram and choose to either Show or Hide the diagram background:

This is very useful because it allows you to show things like SysML Activity Parameters on the boundary of the diagram. Therefore, when I create a customised diagram based on the native UML Activity diagram I can't turn the frame on/off...

Does anyone know how to make it do this (I fear it is not possible  :()

Uml Process / Re: SysML Viewpoints
« on: August 09, 2016, 06:26:35 pm »
EA seems to have (at least) 4 otherthings that it calls views
    • Top level package in a model (created by right clicking on the root of the package in the browser and adding a Model View)
    • Model Views, accessed by the Model View browser - which can be used to launch SQL searches and find specific model elements
    • ModelView artefacts which can be used to hold SQL queries and display them within a diagram itself
    • SysML View and Viewpoint elements (accessible from the Package diagram toolbox).

    My question was related to the last of these: SysML View and Viewpoint elements

    SysML Views and Viewpoints can be used in other tools (such as Rhapsody) to provide a filtered subset of the project browser however I have just had confirmation from Sparx that this is not something that EA supports.

    So, in answer to my own question: the only way SysML View and Viewpoint elements can be used is to show (both visually and via the traceability view) the parts of the model are included in a particular view. If you perform a package import between a View element and target packages, the elements within are not actually imported into the view element itself. Some (pretty complex) SQL queries are needed to actually list the elements imported but I've concluded that this isn't worth the bother![/list]

    Uml Process / Re: Extending non-UML diagram types
    « on: August 09, 2016, 06:12:52 pm »
    Excellent! Thanks very much. How do you find the name of the toolbox? (Obviously I could guess the name as I assume they follow a pretty standard pattern - but MDG technology development involves more than enough guess-work already!)

    Uml Process / Extending non-UML diagram types
    « on: August 09, 2016, 01:48:55 am »
    I am creating an MDG Technology following and as guides

    I have read that it is only possible to extend EA's basic built-in diagram types (see,30151.msg220401.html#msg220401) - so, if I want to extend SysML Block Definition Diagram (BDD), I must start with a class diagram and modify it as necessary

    Having defined a new diagram type, I want to specify a toolbox to use with it.

    The help describes how you can include elements from other MDG technologies:

    (Optional) Define a Toolbox item that will create an item from an external MDG Technology. For example, adding a Toolbox item that creates a SysML1.3 Block element.
    Click on the down-arrow on the right of the Add button.
    Select the 'Add New Item' option.
    The 'Create new Toolbox Item' dialog displays.
    In the 'Alias' field, type the label to appear on the Toolbox item, and click on the OK button.
    The Toolbox item will be added to the 'Toolbox Items' list.
    In the 'Stereotype' field for this Toolbox item, type:
         -  Profile is the name of the Profile that the Stereotype is defined in
         -  Stereotype is the name of the Stereotype/Metatype that this toolbox item will create
         -  BaseUMLType is the base UML type of the non-UML object
    For example, to include a SysML Block in a Toolbox you would type:
    To identify the Profile::Stereotype string, create an element of the type to include in your Toolbox (for example; a SysML 1.3 Block), then select the element and display the Tagged Values window.
    Any predefined tags for this element will be grouped under the Profile::Stereotype heading; for example, a SysML 1.3 Block's tags are grouped under SysML1.3::Block.
    All non-UML objects in Enterprise Architect are an extension of a UML Type. You can reveal an element's base UML type by deleting its Stereotypes. For example, create a SysML1.3 Block and then, using the Properties Window, delete the Block element's Stereotype. The element type will change from Block to Class.

    Does anyone know if you can re-use an entire toolbox from another MDG, rather than individually listing the elements to include within it? For example, can I re-use the SysML Block Definition Diagram toolbox in my custom toolbox?

    Uml Process / Re: Object flow from ObjectNode to Action
    « on: August 03, 2016, 10:51:30 pm »
    If you have a copy, take a look at SysML Distilled by Lenny Delligatti, pp 96-97, 2014

    Pins mean exactly what object nodes mean; pins are simply alternative notations that you can choose case-by-case to meet the specific needs of your target audience. Each has strengths and weaknesses

    The object node notation lets you display compartments to convey the internal properties of the object tokens it holds. However, it takes up more real estate on an activity diagram than the pin notation. The pin notation does not allow you to display the compartments but it's a more space-efficient notation. As a rule, I recommend that you adopt the pin notation as your default option and switch to the object node notation only on those rare occasions when you need to show the internal properties of an object token.

    Based on this advice, there's nothing to stop you showing an activity pin connecting to an object node, but to do so is to introduce redundant information... so it is best avoided.

    EA is rather inconsistent in when it adds action pins to actions and when it does not. I'm not sure the behaviour is based on either the SysML or UML specs.

    Pages: 1 2 3 [4] 5 6 ... 9