예제 #1
0
        private static void AddNodesToDiagram(string parentNodeGuid, XmlNode currentNode, Dgm.PointList pointList, Dgm.ConnectionList connectionList, UInt32 connectionSourcePosition, bool clearExisting)
        {
            //recursive function to add nodes to an existing diagram
            if (clearExisting)
            {
                //remove all connections
                connectionList.RemoveAllChildren();
                //remove all nodes except where type = 'doc' ... NOTE: Didn't test what happens if you also remove the doc type node, but it seemed important.
                List <Dgm.Point> pts = pointList.OfType <Dgm.Point>().Where(x => x.Type != "doc").ToList();
                for (int i = pts.Count - 1; i >= 0; i--)
                {
                    pts[i].Remove();
                }                                                            //remove in reverse order.
            }

            string currentNodeGuid = "{" + Guid.NewGuid().ToString() + "}";//generate new guid, not sure if curly brackets are required (probably not).

            //create the new point
            Dgm.Point newPoint = new Dgm.Point(new Dgm.PropertySet())
            {
                ModelId = currentNodeGuid
            };
            Dgm.ShapeProperties newPointShapeProperties = new Dgm.ShapeProperties();

            if (currentNode.Attributes["highlight"] != null && currentNode.Attributes["highlight"].Value == "true")
            {
                //if we need to highlight this particular point, then add a solidfill to it
                newPointShapeProperties.Append(new A.SolidFill(new A.SchemeColor()
                {
                    Val = A.SchemeColorValues.Accent5
                }));
            }

            Dgm.TextBody newPointTextBody = new Dgm.TextBody(new A.BodyProperties(), new A.ListStyle());

            A.Paragraph     paragraph1                 = new A.Paragraph();
            A.Run           ComponentNameRun           = new A.Run();
            A.RunProperties ComponentNameRunProperties = new A.RunProperties()
            {
                Language = "en-AU"
            };
            A.Text ComponentNameText = new A.Text(currentNode.Attributes["componentName"].Value);
            ComponentNameRun.Append(ComponentNameRunProperties);
            ComponentNameRun.Append(ComponentNameText);
            paragraph1.Append(ComponentNameRun);

            A.Paragraph     paragraph2                = new A.Paragraph();
            A.Run           PositionNameRun           = new A.Run();
            A.RunProperties PositionNameRunProperties = new A.RunProperties()
            {
                Language = "en-AU"
            };
            A.Text PositionNameText = new A.Text(currentNode.Attributes["memberName"].Value);
            PositionNameRun.Append(PositionNameRunProperties);
            PositionNameRun.Append(PositionNameText);
            paragraph2.Append(PositionNameRun);

            newPointTextBody.Append(paragraph1);
            newPointTextBody.Append(paragraph2);

            newPoint.Append(newPointShapeProperties, newPointTextBody);//append to point

            //append the point to the point list

            pointList.Append(newPoint);

            if (!string.IsNullOrEmpty(parentNodeGuid))
            {
                //if parent specified, then create the connection where the parent is the source and the current node is the destination
                connectionList.Append(new Dgm.Connection()
                {
                    ModelId = "{" + Guid.NewGuid().ToString() + "}", SourceId = parentNodeGuid, DestinationId = currentNodeGuid, SourcePosition = (UInt32Value)connectionSourcePosition, DestinationPosition = (UInt32Value)0U
                });
            }

            foreach (XmlNode childNode in currentNode.ChildNodes)
            {
                //call this method for every child
                AddNodesToDiagram(currentNodeGuid, childNode, pointList, connectionList, connectionSourcePosition++, false);
            }
        }
        // Generates content of diagramDataPart1.
        private void GenerateDiagramDataPart1Content(DiagramDataPart diagramDataPart1)
        {
            Dgm.DataModelRoot dataModelRoot1 = new Dgm.DataModelRoot();
            dataModelRoot1.AddNamespaceDeclaration("dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram");
            dataModelRoot1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

            Dgm.PointList pointList4 = new Dgm.PointList();

            Dgm.Point point17 = new Dgm.Point() { ModelId = "{76276689-9900-42A4-A97D-05C094E9F959}", Type = Dgm.PointValues.Document };
            Dgm.PropertySet propertySet6 = new Dgm.PropertySet() { LayoutTypeId = "urn:microsoft.com/office/officeart/2005/8/layout/default", LayoutCategoryId = "list", QuickStyleTypeId = "urn:microsoft.com/office/officeart/2005/8/quickstyle/simple1", QuickStyleCategoryId = "simple", ColorType = "urn:microsoft.com/office/officeart/2005/8/colors/accent1_2", ColorCategoryId = "accent1", Placeholder = true };
            Dgm.ShapeProperties shapeProperties4 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody3 = new Dgm.TextBody();
            A.BodyProperties bodyProperties3 = new A.BodyProperties();
            A.ListStyle listStyle3 = new A.ListStyle();

            A.Paragraph paragraph3 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties2 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph3.Append(endParagraphRunProperties2);

            textBody3.Append(bodyProperties3);
            textBody3.Append(listStyle3);
            textBody3.Append(paragraph3);

            point17.Append(propertySet6);
            point17.Append(shapeProperties4);
            point17.Append(textBody3);

            Dgm.Point point18 = new Dgm.Point() { ModelId = "{24A56972-A9C2-4839-AA8F-5B6BFC85A347}" };
            Dgm.PropertySet propertySet7 = new Dgm.PropertySet() { PlaceholderText = "[Text]" };
            Dgm.ShapeProperties shapeProperties5 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody4 = new Dgm.TextBody();
            A.BodyProperties bodyProperties4 = new A.BodyProperties();
            A.ListStyle listStyle4 = new A.ListStyle();

            A.Paragraph paragraph4 = new A.Paragraph();

            A.Run run2 = new A.Run();
            A.RunProperties runProperties2 = new A.RunProperties() { Language = "en-US" };
            A.Text text2 = new A.Text();
            text2.Text = "aaa";

            run2.Append(runProperties2);
            run2.Append(text2);

            paragraph4.Append(run2);

            textBody4.Append(bodyProperties4);
            textBody4.Append(listStyle4);
            textBody4.Append(paragraph4);

            point18.Append(propertySet7);
            point18.Append(shapeProperties5);
            point18.Append(textBody4);

            Dgm.Point point19 = new Dgm.Point() { ModelId = "{73900160-B91A-4A09-B72D-828900B9ADBE}", Type = Dgm.PointValues.ParentTransition, ConnectionId = "{630264D5-870C-4FBD-A19B-4435858E7932}" };
            Dgm.PropertySet propertySet8 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties6 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody5 = new Dgm.TextBody();
            A.BodyProperties bodyProperties5 = new A.BodyProperties();
            A.ListStyle listStyle5 = new A.ListStyle();

            A.Paragraph paragraph5 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties3 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph5.Append(endParagraphRunProperties3);

            textBody5.Append(bodyProperties5);
            textBody5.Append(listStyle5);
            textBody5.Append(paragraph5);

            point19.Append(propertySet8);
            point19.Append(shapeProperties6);
            point19.Append(textBody5);

            Dgm.Point point20 = new Dgm.Point() { ModelId = "{5151A5B8-05A2-4B76-8432-CE8F03D77B23}", Type = Dgm.PointValues.SiblingTransition, ConnectionId = "{630264D5-870C-4FBD-A19B-4435858E7932}" };
            Dgm.PropertySet propertySet9 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties7 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody6 = new Dgm.TextBody();
            A.BodyProperties bodyProperties6 = new A.BodyProperties();
            A.ListStyle listStyle6 = new A.ListStyle();

            A.Paragraph paragraph6 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties4 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph6.Append(endParagraphRunProperties4);

            textBody6.Append(bodyProperties6);
            textBody6.Append(listStyle6);
            textBody6.Append(paragraph6);

            point20.Append(propertySet9);
            point20.Append(shapeProperties7);
            point20.Append(textBody6);

            Dgm.Point point21 = new Dgm.Point() { ModelId = "{AEE67C22-2EC3-42B5-B77D-F6AAD29ECA58}" };
            Dgm.PropertySet propertySet10 = new Dgm.PropertySet() { PlaceholderText = "[Text]" };
            Dgm.ShapeProperties shapeProperties8 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody7 = new Dgm.TextBody();
            A.BodyProperties bodyProperties7 = new A.BodyProperties();
            A.ListStyle listStyle7 = new A.ListStyle();

            A.Paragraph paragraph7 = new A.Paragraph();

            A.Run run3 = new A.Run();
            A.RunProperties runProperties3 = new A.RunProperties() { Language = "en-US" };
            A.Text text3 = new A.Text();
            text3.Text = "bbb";

            run3.Append(runProperties3);
            run3.Append(text3);

            paragraph7.Append(run3);

            textBody7.Append(bodyProperties7);
            textBody7.Append(listStyle7);
            textBody7.Append(paragraph7);

            point21.Append(propertySet10);
            point21.Append(shapeProperties8);
            point21.Append(textBody7);

            Dgm.Point point22 = new Dgm.Point() { ModelId = "{0313F5DA-872C-4335-AC72-CDB146044DA3}", Type = Dgm.PointValues.ParentTransition, ConnectionId = "{A39C2535-B3E1-45CB-89C6-442BE8E5C6FA}" };
            Dgm.PropertySet propertySet11 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties9 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody8 = new Dgm.TextBody();
            A.BodyProperties bodyProperties8 = new A.BodyProperties();
            A.ListStyle listStyle8 = new A.ListStyle();

            A.Paragraph paragraph8 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties5 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph8.Append(endParagraphRunProperties5);

            textBody8.Append(bodyProperties8);
            textBody8.Append(listStyle8);
            textBody8.Append(paragraph8);

            point22.Append(propertySet11);
            point22.Append(shapeProperties9);
            point22.Append(textBody8);

            Dgm.Point point23 = new Dgm.Point() { ModelId = "{6C18367E-FE2E-4ABA-BA1C-0EF67AA08FB2}", Type = Dgm.PointValues.SiblingTransition, ConnectionId = "{A39C2535-B3E1-45CB-89C6-442BE8E5C6FA}" };
            Dgm.PropertySet propertySet12 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties10 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody9 = new Dgm.TextBody();
            A.BodyProperties bodyProperties9 = new A.BodyProperties();
            A.ListStyle listStyle9 = new A.ListStyle();

            A.Paragraph paragraph9 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties6 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph9.Append(endParagraphRunProperties6);

            textBody9.Append(bodyProperties9);
            textBody9.Append(listStyle9);
            textBody9.Append(paragraph9);

            point23.Append(propertySet12);
            point23.Append(shapeProperties10);
            point23.Append(textBody9);

            Dgm.Point point24 = new Dgm.Point() { ModelId = "{51989711-6971-484B-8F00-0EDFAF5CF595}" };
            Dgm.PropertySet propertySet13 = new Dgm.PropertySet() { PlaceholderText = "[Text]" };
            Dgm.ShapeProperties shapeProperties11 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody10 = new Dgm.TextBody();
            A.BodyProperties bodyProperties10 = new A.BodyProperties();
            A.ListStyle listStyle10 = new A.ListStyle();

            A.Paragraph paragraph10 = new A.Paragraph();

            A.Run run4 = new A.Run();
            A.RunProperties runProperties4 = new A.RunProperties() { Language = "en-US" };
            A.Text text4 = new A.Text();
            text4.Text = "ccc";

            run4.Append(runProperties4);
            run4.Append(text4);

            paragraph10.Append(run4);

            textBody10.Append(bodyProperties10);
            textBody10.Append(listStyle10);
            textBody10.Append(paragraph10);

            point24.Append(propertySet13);
            point24.Append(shapeProperties11);
            point24.Append(textBody10);

            Dgm.Point point25 = new Dgm.Point() { ModelId = "{A10673CB-995A-4DF1-84C3-C36E248DF4C5}", Type = Dgm.PointValues.ParentTransition, ConnectionId = "{84A5AE2E-4F93-4316-82FB-5409D1887BC9}" };
            Dgm.PropertySet propertySet14 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties12 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody11 = new Dgm.TextBody();
            A.BodyProperties bodyProperties11 = new A.BodyProperties();
            A.ListStyle listStyle11 = new A.ListStyle();

            A.Paragraph paragraph11 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties7 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph11.Append(endParagraphRunProperties7);

            textBody11.Append(bodyProperties11);
            textBody11.Append(listStyle11);
            textBody11.Append(paragraph11);

            point25.Append(propertySet14);
            point25.Append(shapeProperties12);
            point25.Append(textBody11);

            Dgm.Point point26 = new Dgm.Point() { ModelId = "{3224F8ED-552E-4AB6-B17E-C86DD70DF1AE}", Type = Dgm.PointValues.SiblingTransition, ConnectionId = "{84A5AE2E-4F93-4316-82FB-5409D1887BC9}" };
            Dgm.PropertySet propertySet15 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties13 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody12 = new Dgm.TextBody();
            A.BodyProperties bodyProperties12 = new A.BodyProperties();
            A.ListStyle listStyle12 = new A.ListStyle();

            A.Paragraph paragraph12 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties8 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph12.Append(endParagraphRunProperties8);

            textBody12.Append(bodyProperties12);
            textBody12.Append(listStyle12);
            textBody12.Append(paragraph12);

            point26.Append(propertySet15);
            point26.Append(shapeProperties13);
            point26.Append(textBody12);

            Dgm.Point point27 = new Dgm.Point() { ModelId = "{0C2711C0-DA30-4AF1-A0EF-D7150EE0C6D2}" };
            Dgm.PropertySet propertySet16 = new Dgm.PropertySet() { PlaceholderText = "[Text]" };
            Dgm.ShapeProperties shapeProperties14 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody13 = new Dgm.TextBody();
            A.BodyProperties bodyProperties13 = new A.BodyProperties();
            A.ListStyle listStyle13 = new A.ListStyle();

            A.Paragraph paragraph13 = new A.Paragraph();

            A.Run run5 = new A.Run();
            A.RunProperties runProperties5 = new A.RunProperties() { Language = "en-US" };
            A.Text text5 = new A.Text();
            text5.Text = "ddd";

            run5.Append(runProperties5);
            run5.Append(text5);

            paragraph13.Append(run5);

            textBody13.Append(bodyProperties13);
            textBody13.Append(listStyle13);
            textBody13.Append(paragraph13);

            point27.Append(propertySet16);
            point27.Append(shapeProperties14);
            point27.Append(textBody13);

            Dgm.Point point28 = new Dgm.Point() { ModelId = "{CD16F249-3124-489E-9272-845A4AB97747}", Type = Dgm.PointValues.ParentTransition, ConnectionId = "{F8E7D8CA-5798-4D0F-95D3-2328DC70D76A}" };
            Dgm.PropertySet propertySet17 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties15 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody14 = new Dgm.TextBody();
            A.BodyProperties bodyProperties14 = new A.BodyProperties();
            A.ListStyle listStyle14 = new A.ListStyle();

            A.Paragraph paragraph14 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties9 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph14.Append(endParagraphRunProperties9);

            textBody14.Append(bodyProperties14);
            textBody14.Append(listStyle14);
            textBody14.Append(paragraph14);

            point28.Append(propertySet17);
            point28.Append(shapeProperties15);
            point28.Append(textBody14);

            Dgm.Point point29 = new Dgm.Point() { ModelId = "{093079ED-8DDC-4757-88A2-73185BE415ED}", Type = Dgm.PointValues.SiblingTransition, ConnectionId = "{F8E7D8CA-5798-4D0F-95D3-2328DC70D76A}" };
            Dgm.PropertySet propertySet18 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties16 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody15 = new Dgm.TextBody();
            A.BodyProperties bodyProperties15 = new A.BodyProperties();
            A.ListStyle listStyle15 = new A.ListStyle();

            A.Paragraph paragraph15 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties10 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph15.Append(endParagraphRunProperties10);

            textBody15.Append(bodyProperties15);
            textBody15.Append(listStyle15);
            textBody15.Append(paragraph15);

            point29.Append(propertySet18);
            point29.Append(shapeProperties16);
            point29.Append(textBody15);

            Dgm.Point point30 = new Dgm.Point() { ModelId = "{059BF96D-A4B1-47E0-87F5-0DF76D31608F}" };
            Dgm.PropertySet propertySet19 = new Dgm.PropertySet() { PlaceholderText = "[Text]" };
            Dgm.ShapeProperties shapeProperties17 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody16 = new Dgm.TextBody();
            A.BodyProperties bodyProperties16 = new A.BodyProperties();
            A.ListStyle listStyle16 = new A.ListStyle();

            A.Paragraph paragraph16 = new A.Paragraph();

            A.Run run6 = new A.Run();
            A.RunProperties runProperties6 = new A.RunProperties() { Language = "en-US" };
            A.Text text6 = new A.Text();
            text6.Text = "eee";

            run6.Append(runProperties6);
            run6.Append(text6);

            paragraph16.Append(run6);

            textBody16.Append(bodyProperties16);
            textBody16.Append(listStyle16);
            textBody16.Append(paragraph16);

            point30.Append(propertySet19);
            point30.Append(shapeProperties17);
            point30.Append(textBody16);

            Dgm.Point point31 = new Dgm.Point() { ModelId = "{1D7C5792-DE6D-408D-9762-1ADCE028AF45}", Type = Dgm.PointValues.ParentTransition, ConnectionId = "{546C2A0F-E51B-41AE-A9F1-D980CEEB6CF8}" };
            Dgm.PropertySet propertySet20 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties18 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody17 = new Dgm.TextBody();
            A.BodyProperties bodyProperties17 = new A.BodyProperties();
            A.ListStyle listStyle17 = new A.ListStyle();

            A.Paragraph paragraph17 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties11 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph17.Append(endParagraphRunProperties11);

            textBody17.Append(bodyProperties17);
            textBody17.Append(listStyle17);
            textBody17.Append(paragraph17);

            point31.Append(propertySet20);
            point31.Append(shapeProperties18);
            point31.Append(textBody17);

            Dgm.Point point32 = new Dgm.Point() { ModelId = "{2895CC02-3413-4741-AED1-284981706D82}", Type = Dgm.PointValues.SiblingTransition, ConnectionId = "{546C2A0F-E51B-41AE-A9F1-D980CEEB6CF8}" };
            Dgm.PropertySet propertySet21 = new Dgm.PropertySet();
            Dgm.ShapeProperties shapeProperties19 = new Dgm.ShapeProperties();

            Dgm.TextBody textBody18 = new Dgm.TextBody();
            A.BodyProperties bodyProperties18 = new A.BodyProperties();
            A.ListStyle listStyle18 = new A.ListStyle();

            A.Paragraph paragraph18 = new A.Paragraph();
            A.EndParagraphRunProperties endParagraphRunProperties12 = new A.EndParagraphRunProperties() { Language = "en-US" };

            paragraph18.Append(endParagraphRunProperties12);

            textBody18.Append(bodyProperties18);
            textBody18.Append(listStyle18);
            textBody18.Append(paragraph18);

            point32.Append(propertySet21);
            point32.Append(shapeProperties19);
            point32.Append(textBody18);

            Dgm.Point point33 = new Dgm.Point() { ModelId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet22 = new Dgm.PropertySet() { PresentationElementId = "{76276689-9900-42A4-A97D-05C094E9F959}", PresentationName = "diagram", PresentationStyleCount = 0 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables1 = new Dgm.PresentationLayoutVariables();
            Dgm.Direction direction2 = new Dgm.Direction();
            Dgm.ResizeHandles resizeHandles2 = new Dgm.ResizeHandles() { Val = Dgm.ResizeHandlesStringValues.Exact };

            presentationLayoutVariables1.Append(direction2);
            presentationLayoutVariables1.Append(resizeHandles2);

            propertySet22.Append(presentationLayoutVariables1);
            Dgm.ShapeProperties shapeProperties20 = new Dgm.ShapeProperties();

            point33.Append(propertySet22);
            point33.Append(shapeProperties20);

            Dgm.Point point34 = new Dgm.Point() { ModelId = "{B9B6AF63-CBEE-495A-9B14-DABB8AC30D78}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet23 = new Dgm.PropertySet() { PresentationElementId = "{24A56972-A9C2-4839-AA8F-5B6BFC85A347}", PresentationName = "node", PresentationStyleLabel = "node1", PresentationStyleIndex = 0, PresentationStyleCount = 5 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables2 = new Dgm.PresentationLayoutVariables();
            Dgm.BulletEnabled bulletEnabled2 = new Dgm.BulletEnabled() { Val = true };

            presentationLayoutVariables2.Append(bulletEnabled2);

            propertySet23.Append(presentationLayoutVariables2);
            Dgm.ShapeProperties shapeProperties21 = new Dgm.ShapeProperties();

            point34.Append(propertySet23);
            point34.Append(shapeProperties21);

            Dgm.Point point35 = new Dgm.Point() { ModelId = "{42680A7F-4A8B-4E70-8AFB-AD2745B006E5}", Type = Dgm.PointValues.Presentation };
            Dgm.PropertySet propertySet24 = new Dgm.PropertySet() { PresentationElementId = "{5151A5B8-05A2-4B76-8432-CE8F03D77B23}", PresentationName = "sibTrans", PresentationStyleCount = 0 };
            Dgm.ShapeProperties shapeProperties22 = new Dgm.ShapeProperties();

            point35.Append(propertySet24);
            point35.Append(shapeProperties22);

            Dgm.Point point36 = new Dgm.Point() { ModelId = "{74F2756F-474D-46D1-9293-5E8A451D94BC}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet25 = new Dgm.PropertySet() { PresentationElementId = "{AEE67C22-2EC3-42B5-B77D-F6AAD29ECA58}", PresentationName = "node", PresentationStyleLabel = "node1", PresentationStyleIndex = 1, PresentationStyleCount = 5 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables3 = new Dgm.PresentationLayoutVariables();
            Dgm.BulletEnabled bulletEnabled3 = new Dgm.BulletEnabled() { Val = true };

            presentationLayoutVariables3.Append(bulletEnabled3);

            propertySet25.Append(presentationLayoutVariables3);
            Dgm.ShapeProperties shapeProperties23 = new Dgm.ShapeProperties();

            point36.Append(propertySet25);
            point36.Append(shapeProperties23);

            Dgm.Point point37 = new Dgm.Point() { ModelId = "{82B33301-6F4B-4372-9CA8-27A4D1954ECC}", Type = Dgm.PointValues.Presentation };
            Dgm.PropertySet propertySet26 = new Dgm.PropertySet() { PresentationElementId = "{6C18367E-FE2E-4ABA-BA1C-0EF67AA08FB2}", PresentationName = "sibTrans", PresentationStyleCount = 0 };
            Dgm.ShapeProperties shapeProperties24 = new Dgm.ShapeProperties();

            point37.Append(propertySet26);
            point37.Append(shapeProperties24);

            Dgm.Point point38 = new Dgm.Point() { ModelId = "{0E25295C-9B60-450E-BEE9-54F1BADAE0D5}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet27 = new Dgm.PropertySet() { PresentationElementId = "{51989711-6971-484B-8F00-0EDFAF5CF595}", PresentationName = "node", PresentationStyleLabel = "node1", PresentationStyleIndex = 2, PresentationStyleCount = 5 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables4 = new Dgm.PresentationLayoutVariables();
            Dgm.BulletEnabled bulletEnabled4 = new Dgm.BulletEnabled() { Val = true };

            presentationLayoutVariables4.Append(bulletEnabled4);

            propertySet27.Append(presentationLayoutVariables4);
            Dgm.ShapeProperties shapeProperties25 = new Dgm.ShapeProperties();

            point38.Append(propertySet27);
            point38.Append(shapeProperties25);

            Dgm.Point point39 = new Dgm.Point() { ModelId = "{81348272-3E3E-44C9-A0E3-2A26CD79A21A}", Type = Dgm.PointValues.Presentation };
            Dgm.PropertySet propertySet28 = new Dgm.PropertySet() { PresentationElementId = "{3224F8ED-552E-4AB6-B17E-C86DD70DF1AE}", PresentationName = "sibTrans", PresentationStyleCount = 0 };
            Dgm.ShapeProperties shapeProperties26 = new Dgm.ShapeProperties();

            point39.Append(propertySet28);
            point39.Append(shapeProperties26);

            Dgm.Point point40 = new Dgm.Point() { ModelId = "{216E7A5E-38CD-46ED-97BD-9B59E6A10E61}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet29 = new Dgm.PropertySet() { PresentationElementId = "{0C2711C0-DA30-4AF1-A0EF-D7150EE0C6D2}", PresentationName = "node", PresentationStyleLabel = "node1", PresentationStyleIndex = 3, PresentationStyleCount = 5 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables5 = new Dgm.PresentationLayoutVariables();
            Dgm.BulletEnabled bulletEnabled5 = new Dgm.BulletEnabled() { Val = true };

            presentationLayoutVariables5.Append(bulletEnabled5);

            propertySet29.Append(presentationLayoutVariables5);
            Dgm.ShapeProperties shapeProperties27 = new Dgm.ShapeProperties();

            point40.Append(propertySet29);
            point40.Append(shapeProperties27);

            Dgm.Point point41 = new Dgm.Point() { ModelId = "{309C9358-B0AC-4D13-BBC3-A4613A1E66EA}", Type = Dgm.PointValues.Presentation };
            Dgm.PropertySet propertySet30 = new Dgm.PropertySet() { PresentationElementId = "{093079ED-8DDC-4757-88A2-73185BE415ED}", PresentationName = "sibTrans", PresentationStyleCount = 0 };
            Dgm.ShapeProperties shapeProperties28 = new Dgm.ShapeProperties();

            point41.Append(propertySet30);
            point41.Append(shapeProperties28);

            Dgm.Point point42 = new Dgm.Point() { ModelId = "{06938A85-ABE7-4259-8535-52632AD9121B}", Type = Dgm.PointValues.Presentation };

            Dgm.PropertySet propertySet31 = new Dgm.PropertySet() { PresentationElementId = "{059BF96D-A4B1-47E0-87F5-0DF76D31608F}", PresentationName = "node", PresentationStyleLabel = "node1", PresentationStyleIndex = 4, PresentationStyleCount = 5 };

            Dgm.PresentationLayoutVariables presentationLayoutVariables6 = new Dgm.PresentationLayoutVariables();
            Dgm.BulletEnabled bulletEnabled6 = new Dgm.BulletEnabled() { Val = true };

            presentationLayoutVariables6.Append(bulletEnabled6);

            propertySet31.Append(presentationLayoutVariables6);
            Dgm.ShapeProperties shapeProperties29 = new Dgm.ShapeProperties();

            point42.Append(propertySet31);
            point42.Append(shapeProperties29);

            pointList4.Append(point17);
            pointList4.Append(point18);
            pointList4.Append(point19);
            pointList4.Append(point20);
            pointList4.Append(point21);
            pointList4.Append(point22);
            pointList4.Append(point23);
            pointList4.Append(point24);
            pointList4.Append(point25);
            pointList4.Append(point26);
            pointList4.Append(point27);
            pointList4.Append(point28);
            pointList4.Append(point29);
            pointList4.Append(point30);
            pointList4.Append(point31);
            pointList4.Append(point32);
            pointList4.Append(point33);
            pointList4.Append(point34);
            pointList4.Append(point35);
            pointList4.Append(point36);
            pointList4.Append(point37);
            pointList4.Append(point38);
            pointList4.Append(point39);
            pointList4.Append(point40);
            pointList4.Append(point41);
            pointList4.Append(point42);

            Dgm.ConnectionList connectionList4 = new Dgm.ConnectionList();
            Dgm.Connection connection14 = new Dgm.Connection() { ModelId = "{630264D5-870C-4FBD-A19B-4435858E7932}", SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{24A56972-A9C2-4839-AA8F-5B6BFC85A347}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, ParentTransitionId = "{73900160-B91A-4A09-B72D-828900B9ADBE}", SiblingTransitionId = "{5151A5B8-05A2-4B76-8432-CE8F03D77B23}" };
            Dgm.Connection connection15 = new Dgm.Connection() { ModelId = "{DDA37086-27D4-4E94-8E74-5DFDE689E59E}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{24A56972-A9C2-4839-AA8F-5B6BFC85A347}", DestinationId = "{B9B6AF63-CBEE-495A-9B14-DABB8AC30D78}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection16 = new Dgm.Connection() { ModelId = "{546C2A0F-E51B-41AE-A9F1-D980CEEB6CF8}", SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{059BF96D-A4B1-47E0-87F5-0DF76D31608F}", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U, ParentTransitionId = "{1D7C5792-DE6D-408D-9762-1ADCE028AF45}", SiblingTransitionId = "{2895CC02-3413-4741-AED1-284981706D82}" };
            Dgm.Connection connection17 = new Dgm.Connection() { ModelId = "{A39C2535-B3E1-45CB-89C6-442BE8E5C6FA}", SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{AEE67C22-2EC3-42B5-B77D-F6AAD29ECA58}", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U, ParentTransitionId = "{0313F5DA-872C-4335-AC72-CDB146044DA3}", SiblingTransitionId = "{6C18367E-FE2E-4ABA-BA1C-0EF67AA08FB2}" };
            Dgm.Connection connection18 = new Dgm.Connection() { ModelId = "{7F65C362-EC51-4ED8-9998-AF15232E7787}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{AEE67C22-2EC3-42B5-B77D-F6AAD29ECA58}", DestinationId = "{74F2756F-474D-46D1-9293-5E8A451D94BC}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection19 = new Dgm.Connection() { ModelId = "{2AB0C361-FF8B-4C4C-BC68-0AEDA6A5EC71}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection20 = new Dgm.Connection() { ModelId = "{F506F795-2140-42BF-9F90-8EE28673E84A}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{51989711-6971-484B-8F00-0EDFAF5CF595}", DestinationId = "{0E25295C-9B60-450E-BEE9-54F1BADAE0D5}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection21 = new Dgm.Connection() { ModelId = "{F6BDDE80-08E0-4C46-AEF2-40E7971FB968}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{059BF96D-A4B1-47E0-87F5-0DF76D31608F}", DestinationId = "{06938A85-ABE7-4259-8535-52632AD9121B}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection22 = new Dgm.Connection() { ModelId = "{37D51693-1E05-415E-918A-C7F45D25552C}", Type = Dgm.ConnectionValues.PresentationOf, SourceId = "{0C2711C0-DA30-4AF1-A0EF-D7150EE0C6D2}", DestinationId = "{216E7A5E-38CD-46ED-97BD-9B59E6A10E61}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection23 = new Dgm.Connection() { ModelId = "{84A5AE2E-4F93-4316-82FB-5409D1887BC9}", SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{51989711-6971-484B-8F00-0EDFAF5CF595}", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U, ParentTransitionId = "{A10673CB-995A-4DF1-84C3-C36E248DF4C5}", SiblingTransitionId = "{3224F8ED-552E-4AB6-B17E-C86DD70DF1AE}" };
            Dgm.Connection connection24 = new Dgm.Connection() { ModelId = "{F8E7D8CA-5798-4D0F-95D3-2328DC70D76A}", SourceId = "{76276689-9900-42A4-A97D-05C094E9F959}", DestinationId = "{0C2711C0-DA30-4AF1-A0EF-D7150EE0C6D2}", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U, ParentTransitionId = "{CD16F249-3124-489E-9272-845A4AB97747}", SiblingTransitionId = "{093079ED-8DDC-4757-88A2-73185BE415ED}" };
            Dgm.Connection connection25 = new Dgm.Connection() { ModelId = "{4A74D137-753B-4BBB-A732-C5BFBBD7D035}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{B9B6AF63-CBEE-495A-9B14-DABB8AC30D78}", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection26 = new Dgm.Connection() { ModelId = "{DEAF4355-9B79-4AEA-A280-E81F6294558C}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{42680A7F-4A8B-4E70-8AFB-AD2745B006E5}", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection27 = new Dgm.Connection() { ModelId = "{D9D379F1-4060-4AE5-838F-6305923C14D8}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{74F2756F-474D-46D1-9293-5E8A451D94BC}", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection28 = new Dgm.Connection() { ModelId = "{3EACF65C-AE35-47EC-A243-3D5C2704388F}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{82B33301-6F4B-4372-9CA8-27A4D1954ECC}", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection29 = new Dgm.Connection() { ModelId = "{46D1E78A-99B9-44CD-A6C1-E2EED8A211E4}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{0E25295C-9B60-450E-BEE9-54F1BADAE0D5}", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection30 = new Dgm.Connection() { ModelId = "{2D258B7B-D720-4CF7-9BFC-68E3AF3B7D8E}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{81348272-3E3E-44C9-A0E3-2A26CD79A21A}", SourcePosition = (UInt32Value)5U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection31 = new Dgm.Connection() { ModelId = "{B86736BF-D450-427C-AA98-4C389307DF54}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{216E7A5E-38CD-46ED-97BD-9B59E6A10E61}", SourcePosition = (UInt32Value)6U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection32 = new Dgm.Connection() { ModelId = "{E3F09948-09B3-4482-A860-C7AB91C6D439}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{309C9358-B0AC-4D13-BBC3-A4613A1E66EA}", SourcePosition = (UInt32Value)7U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            Dgm.Connection connection33 = new Dgm.Connection() { ModelId = "{DF0B24A1-55B3-4A87-BB6C-9AD00EDC4A36}", Type = Dgm.ConnectionValues.PresentationParentOf, SourceId = "{01CC94B2-8F5E-44C3-AA4D-D3B80D755733}", DestinationId = "{06938A85-ABE7-4259-8535-52632AD9121B}", SourcePosition = (UInt32Value)8U, DestinationPosition = (UInt32Value)0U, PresentationId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };

            connectionList4.Append(connection14);
            connectionList4.Append(connection15);
            connectionList4.Append(connection16);
            connectionList4.Append(connection17);
            connectionList4.Append(connection18);
            connectionList4.Append(connection19);
            connectionList4.Append(connection20);
            connectionList4.Append(connection21);
            connectionList4.Append(connection22);
            connectionList4.Append(connection23);
            connectionList4.Append(connection24);
            connectionList4.Append(connection25);
            connectionList4.Append(connection26);
            connectionList4.Append(connection27);
            connectionList4.Append(connection28);
            connectionList4.Append(connection29);
            connectionList4.Append(connection30);
            connectionList4.Append(connection31);
            connectionList4.Append(connection32);
            connectionList4.Append(connection33);
            Dgm.Background background4 = new Dgm.Background();
            Dgm.Whole whole4 = new Dgm.Whole();

            Dgm.DataModelExtensionList dataModelExtensionList1 = new Dgm.DataModelExtensionList();

            A.DataModelExtension dataModelExtension1 = new A.DataModelExtension() { Uri = "http://schemas.microsoft.com/office/drawing/2008/diagram" };

            Dsp.DataModelExtensionBlock dataModelExtensionBlock1 = new Dsp.DataModelExtensionBlock() { RelId = "rId5", MinVer = "http://schemas.openxmlformats.org/drawingml/2006/diagram" };
            dataModelExtensionBlock1.AddNamespaceDeclaration("dsp", "http://schemas.microsoft.com/office/drawing/2008/diagram");

            dataModelExtension1.Append(dataModelExtensionBlock1);

            dataModelExtensionList1.Append(dataModelExtension1);

            dataModelRoot1.Append(pointList4);
            dataModelRoot1.Append(connectionList4);
            dataModelRoot1.Append(background4);
            dataModelRoot1.Append(whole4);
            dataModelRoot1.Append(dataModelExtensionList1);

            diagramDataPart1.DataModelRoot = dataModelRoot1;
        }