Topic
6 replies Latest Post - ‏2013-04-24T12:35:17Z by MarcioAB
MarcioAB
MarcioAB
5 Posts
ACCEPTED ANSWER

Pinned topic How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

‏2013-04-22T18:09:14Z |

I can not find an option to display the content of the package description in the package symbol in an Object Model diagram.

Can someone help me with instructions ?

Thank you

Marcio

  • shanz9903
    shanz9903
    234 Posts
    ACCEPTED ANSWER

    Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

    ‏2013-04-23T14:53:11Z  in response to MarcioAB

    I don't think it's possible.

    The nearest equivalent might be to use a comment and a hyperlink to the comment in the Description.

    On the OMD you can drag the comment into the package.  You can try different Display Options on the comment, eg: Form: Plain.

    • MarcioAB
      MarcioAB
      5 Posts
      ACCEPTED ANSWER

      Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

      ‏2013-04-23T15:45:13Z  in response to shanz9903

      I see ... but ... for example, if you create a new project type SysML, in the Profiles part of the model structure you will see the several Packages created for this profile (like Diagrams, Activities, Bocks, Requirements, etc ... ). Each Package has a Description. To make it easier for the user of this profile, the creator of this profile kindly added a diagram to give us an overview of these Packages and it was used an OMD named as "ProfileStructure" (as one can see in the SysML profile). You can open this read-only diagram and see the symbols for the Packages. In the middle of each symbol you will see the Description of each Package ( that was taken directly from the corresponding model element, as expected ). That is very nice (and very basic also).

      So, why a nice feature like that can only be available for the creator of the SysML profile ?

      Thank you.

      Updated on 2013-04-23T15:48:01Z at 2013-04-23T15:48:01Z by MarcioAB
      • MarcioAB
        MarcioAB
        5 Posts
        ACCEPTED ANSWER

        Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

        ‏2013-04-23T15:59:40Z  in response to MarcioAB

        (complementing) ... I can, for example, copy this read-only OMD named "ProfileStructure" and past it into my model, so now I have a read-write copy of this OMD in my model. So, I can drag and drop the standard "Default" Package into this copied OMD (or create new ones). And now I can see (and change) the Description of the Default Package directly in the diagram.

        • MarcioAB
          MarcioAB
          5 Posts
          ACCEPTED ANSWER

          Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

          ‏2013-04-23T16:41:58Z  in response to MarcioAB

          Just discovered that I need to add the property "Compartments" in ObjectModelGe::Package and this "Compartment" property must have the value "Description".

          To add such property I need first to add it at the end of the value for Dialog::ObjectModelDiagram::CommonProperties .. something as ,ObjectModelGe::Package::Compartments.

          But it seems to be missing something, because after doing all these, I still can not see the "Compartments" property in ObjectModelGe::Package. I can only see the 2 basic ones ( ShowName and ShowStereotype ).

          Any suggestion ?

           

          • shanz9903
            shanz9903
            234 Posts
            ACCEPTED ANSWER

            Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

            ‏2013-04-24T10:05:55Z  in response to MarcioAB

            I've just had a look at the Profile Structure OMD in SysML.

            The actual OMD has ObjectModelGe::Package::Compartments overridden to Description

            I agree with you in that a normal model has ShowName and ShowStereotype.

            CommonProperties just says what is displayed when you select the Common Properties.  Is it really relevant?

            Try adding the bottom line below to your prp file. Then close and reopen Rhapsody and try again.

            Subject ObjectModelGe
                Metaclass Package
                    Property ShowName Enum  "Full_path,Relative,Name_only,Label" "Name_only"
                    Property ShowStereotype Enum "Label,Bitmap,None" "Label"
                    Property Compartments MultiLine ""

            Right-click on the OMD and find the new ObjectModelGe::Package::Compartments property.

            Type in Description.

            Right-click on your package on the OMD and select Display Options - Advanced - Image Layout = Compartment and the Description should appear.

             

            • MarcioAB
              MarcioAB
              5 Posts
              ACCEPTED ANSWER

              Re: How to display the content of Description attribute of a Package in its symbol in an Object Model diagram ?

              ‏2013-04-24T12:35:17Z  in response to shanz9903

              Thank you Duncan.

              That is exactly what I was looking for.

              So now I can choose when I need a diagram that shows:  (1) The Description of the Packages ... OR ... (2) the Packages that are inside a Package. Not sure if I could have both at the same time, but ... this is already fair enough

              Regards, Marcio