Book a Demo

Author Topic: mdg profile toolbox  (Read 7034 times)

kennedy

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
mdg profile toolbox
« on: August 18, 2016, 08:00:00 pm »
Hello Everyone,
Sorry if this has already been asked, I have looked intensely and could't find a reference, and I have been searching Google Sparx for a number of days now.

I have created a series of MDG profiles for elements, toolbox and diagrams. All are working as expected.

I have tried however to have it so when I create a diagram A, it uses Toolbox A, and when creating diagram B, it uses Toolbox B.

Can anyone give me any instructions on how to do this please?

I'll tell you what I have done so far (which results in the second toolbox disappearing).

Created a profile a
created a toolbox a
created a diagram for the toolbox a.

Created a toolbox b (under profile under same model package as I want everything to be in one MDG XML)
Created a diagram for the toolbar b.

When I assign everything to toolbox a it works, when I try and split it toolbar b is lost.

For both toolbar A and toolbar b I have separate metaclasses, with stereo types, but both called ToolboxPage.

I have one toolbar called <profile>toolboxa
The other one called <profile>toolboxb.

Sorry - a long convoluted explanation that a simple file attachment or screen image would solve.

btw I have spark 9.2

Thank you.
Ian

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: mdg profile toolbox
« Reply #1 on: August 18, 2016, 08:35:06 pm »
Hello Ian,
V 9.2 is quiet antiquated, isn’t it?

Put your toolboxes in separate <<profile>> packages and set in your diagram metaclasses the “toolbox” attribute “Initial Value” to the name of the corresponding ” <<profile>> package” toolbox package.
Best regards,

Peter Heintz

kennedy

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: mdg profile toolbox
« Reply #2 on: August 19, 2016, 06:47:24 am »
What? That's fantastic. I never would have guessed in a million years that I needed to create a separate profile package.

My assumption was that you needed a profile package per MDG file,  clearlythat is not the case?

Thank you Peter!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: mdg profile toolbox
« Reply #3 on: August 19, 2016, 08:14:44 am »
I have a litte article about MDGs here. Maybe it's a bit of help.

q.

kennedy

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: mdg profile toolbox
« Reply #4 on: August 19, 2016, 04:19:11 pm »
Hi - Oops looks like I misunderstood, I thought you meant create a new root package, that didn't work for me.

This is a copy of my Diagrams profile XML and toolbox XML. To me it looks correct. I have 2 toolbox profiles to which I am accessing the different toolboxes.

Any help you can offer is greatly appreciated. Thank you qwerty for your notes, I had a read through and could not find any reference to creating a toolbox per diagram different to what I have already done, so I know it must work somehow, as all you people have covered it.

Thanks

<?xml version="1.0" encoding="WINDOWS-1252"?>
-<UMLProfile profiletype="uml2">
<Documentation notes="HCCDiagrams" alias="HCCDiagrams" version="1.0" name="HCCDiagrams" id="FCB22D44-D"/>
-<Content>
-<Stereotypes>
-<Stereotype notes="notes" alias="HCCConceptual" name="HCCConceptual1" hideicon="0" borderwidth="1" bordercolor="-1" fontcolor="-1" bgcolor="16777215" cy="70" cx="90">
-<AppliesTo>
-<Apply type="Diagram_Conceptual">
<Property name="alias" value="Diagram_Conceptual"/>
<Property name="diagramID" value="HCCConceptual"/>
<Property name="toolbox" value="HCCToolBox"/>
</Apply>
</AppliesTo>
</Stereotype>
-<Stereotype notes="Used to create a sequence diagram for the uwModel" alias="HCCSequence" name="HCCSequence1" hideicon="0" borderwidth="-1" bordercolor="-1" fontcolor="-1" bgcolor="-1" cy="70" cx="90">
-<AppliesTo>
-<Apply type="Diagram_Sequence">
<Property name="alias" value="Diagram_Sequence"/>
<Property name="diagramID" value="HCCSequence"/>
<Property name="toolbox" value="HCCSeqToolBox"/>
</Apply>
</AppliesTo>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
</Content>
</UMLProfile>

This is the the simply toobox of the second toolbox, the one that is not working (The first one has worked a number of months, and is still working).

<?xml version="1.0" encoding="WINDOWS-1252"?>
-<UMLProfile profiletype="uml2">
<Documentation notes="HCCSeqToolBox" version="1.0" name="HCCSeqToolBox" id="F8DE213F-1"/>-<Content>
-<Stereotypes>
-<Stereotype notes="" name="HCCSequence" hideicon="0" borderwidth="-1" bordercolor="-1" fontcolor="-1" bgcolor="-1" cy="70" cx="90">
-<AppliesTo>
<Apply type="ToolBoxPage"/>
</AppliesTo>
-<TaggedValues>
<Tag name="HCCProfile::HCCMessage" type="int" default="HCCMessage" values="" unit="" description=""/>
<Tag name="HCCProfile::Actor" type="int" default="Actor" values="" unit="" description=""/>
</TaggedValues>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
</Content>
« Last Edit: August 19, 2016, 04:28:44 pm by kennedy »

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: mdg profile toolbox
« Reply #5 on: August 19, 2016, 04:50:02 pm »
Hi Kennedy,
Your files look ok to me.
This information is in you mdg xml file as well, right?

Another mistake I do sometimes, is remaining something in the “stereotypes” used by the toolbox (ref by name). In this case you switch to the right toolbox but it is e.g. empty.
Best regards,

Peter Heintz

Polymorph

  • EA User
  • **
  • Posts: 136
  • Karma: +4/-0
    • View Profile
Re: mdg profile toolbox
« Reply #6 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


kennedy

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: mdg profile toolbox
« Reply #7 on: August 20, 2016, 04:57:32 pm »
Hi thanks for all the tips everyone, sorry been busy trying to crack this - I built as complete new machine and copied the profile project without changes and it worked.
Not sure what it was, but very weird.