Reporting Usage in Diagrams

Uploaded report templates and discussions about reports.

Moderators: sarawut_w, Moderators

Reporting Usage in Diagrams

Postby eugene.nicholson@noaa.gov » Fri Dec 04, 2015 1:08 pm

I would like to create a report that lists Operational Exchanges and, for each OE, identifies the diagram(s) in which they are realized. I am able to list the OEs, but I don't know how to report the "Diagram" column identified in the table presented in specification's "Usage In" attribute group.

Can anyone suggest an approach?

I'm using MD 18.1, the UPDM plugin and the "DoDAF 2.0 Architect" perspective.
eugene.nicholson@noaa.gov
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:1
Joined: Mon Sep 14, 2015 8:42 am

Re: Reporting Usage in Diagrams

Postby paudzi » Mon Dec 07, 2015 2:12 am

Hello,

Operational Exchange can be realized in the model, but not in diagram. Diagram just represents relations which Operational Exchange realizes. The code which collects diagrams:

Code: Select all
Collection<Element> realizations = new HashSet<>();
realizations.addAll(operationalExchange.getRealization());
realizations.addAll(operationalExchange.getRealizingActivityEdge());
realizations.addAll(operationalExchange.getRealizingConnector());
realizations.addAll(operationalExchange.getRealizingMessage());
      
//Check if OperationalExchange is realized
if(!realizations.isEmpty())
{
   Collection<Diagram> diagramsInWhichOEIsRealized = new ArrayList<>();
   //Get all diagramsInWhichOEIsRealized
   for (DiagramPresentationElement diagram : project.getDiagrams())
   {
      Collection<Element> elements = diagram.getUsedModelElements(true);
      for (Element realization : realizations)
      {
         //Check if diagram represents one of the OperationalExchange realization
         if (elements.contains(realization))
         {
            diagramsInWhichOEIsRealized.add(diagram.getDiagram());
            break;
         }
      }
   }
}

With best regards,
No Magic Customer Support.
paudzi
Customer Support
Customer Support
 
Posts: 70
Posts Rating:5
Joined: Thu Oct 20, 2011 5:50 am

Re: Reporting Usage in Diagrams

Postby eugene.nicholson@noaa.gov » Tue Dec 08, 2015 8:13 am

Thank you for your response. I appreciate very much your taking the time to help me. However I'm new to MagicDraw and am using the report wizard and VTL to create a report in Excel. While I understand the logic of the code you provided, I am uncertain how to apply it. Perhaps you could provide a bit of context as to how the code can be applied?
eugene.nicholson@noaa.gov
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:1
Joined: Mon Sep 14, 2015 8:42 am

Re: Reporting Usage in Diagrams

Postby praktikant-e-mobility-sys-haus-entw-4.scw@zf.com » Wed Nov 14, 2018 4:51 am

Hello :-)

I have the same question.
Is there a solution by now?

greeting Christian
praktikant-e-mobility-sys-haus-entw-4.scw@zf.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Wed Nov 14, 2018 4:25 am


Return to Report Engine

Who is online

Users browsing this forum: No registered users and 0 guests