Tuesday, April 26, 2011

For UML sequence diagram, is there any way to query the .sequencediagram and .seqencediagram.layout files through VMSDK?

Hello folks,

When extending UML functionality, I'm able to get the ISequenceDiagram object by querying DTE of VS 2010 SDK, now, I want to know the original .sequencediagram and .sequencediagram.layout files which describes the sequence diagram, is there any way to get it for VMSDK?

// Open all the project's diagrams.
                foreach (ProjectItem item in project.ProjectItems)
                {
                    IDiagramContext modelingItem = item as IDiagramContext;
                    if (modelingItem == null)
                        continue; // not a model diagram
                    IDiagram diagram = modelingItem.CurrentDiagram;
                    if (diagram == null)
                    {
                        // Diagram is closed. Open it.
                        item.Open().Activate();
                        diagram = modelingItem.CurrentDiagram;
                    }
                    ISequenceDiagram sd = diagram as ISequenceDiagram;
                    if (sd != null)
                    {
                        if (sd.Interaction != null && sd.Interaction.Name == diagramName)
                        {
                            resolvedSequenceDiagram.Add(sd);
                        }
                        else
                            continue;
                    }
                }

Source: http://social.msdn.microsoft.com/Forums/en-US/vsarch/thread/45c8f828-edae-433f-bdac-02e2f1f44e5f

soa architecture tutorial renaissance architecture architecture schools in new york architecture degrees website architecture

No comments:

Post a Comment