// 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; }
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 diagramLayoutDefinitionPart1. private void GenerateDiagramLayoutDefinitionPart1Content(DiagramLayoutDefinitionPart diagramLayoutDefinitionPart1) { Dgm.LayoutDefinition layoutDefinition1 = new Dgm.LayoutDefinition() { UniqueId = "urn:microsoft.com/office/officeart/2005/8/layout/default" }; layoutDefinition1.AddNamespaceDeclaration("dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram"); layoutDefinition1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); Dgm.Title title1 = new Dgm.Title() { Val = "" }; Dgm.Description description1 = new Dgm.Description() { Val = "" }; Dgm.CategoryList categoryList1 = new Dgm.CategoryList(); Dgm.Category category1 = new Dgm.Category() { Type = "list", Priority = (UInt32Value)400U }; categoryList1.Append(category1); Dgm.SampleData sampleData1 = new Dgm.SampleData(); Dgm.DataModel dataModel1 = new Dgm.DataModel(); Dgm.PointList pointList1 = new Dgm.PointList(); Dgm.Point point1 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document }; Dgm.Point point2 = new Dgm.Point() { ModelId = "1" }; Dgm.PropertySet propertySet1 = new Dgm.PropertySet() { Placeholder = true }; point2.Append(propertySet1); Dgm.Point point3 = new Dgm.Point() { ModelId = "2" }; Dgm.PropertySet propertySet2 = new Dgm.PropertySet() { Placeholder = true }; point3.Append(propertySet2); Dgm.Point point4 = new Dgm.Point() { ModelId = "3" }; Dgm.PropertySet propertySet3 = new Dgm.PropertySet() { Placeholder = true }; point4.Append(propertySet3); Dgm.Point point5 = new Dgm.Point() { ModelId = "4" }; Dgm.PropertySet propertySet4 = new Dgm.PropertySet() { Placeholder = true }; point5.Append(propertySet4); Dgm.Point point6 = new Dgm.Point() { ModelId = "5" }; Dgm.PropertySet propertySet5 = new Dgm.PropertySet() { Placeholder = true }; point6.Append(propertySet5); pointList1.Append(point1); pointList1.Append(point2); pointList1.Append(point3); pointList1.Append(point4); pointList1.Append(point5); pointList1.Append(point6); Dgm.ConnectionList connectionList1 = new Dgm.ConnectionList(); Dgm.Connection connection1 = new Dgm.Connection() { ModelId = "6", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection2 = new Dgm.Connection() { ModelId = "7", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection3 = new Dgm.Connection() { ModelId = "8", SourceId = "0", DestinationId = "3", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection4 = new Dgm.Connection() { ModelId = "9", SourceId = "0", DestinationId = "4", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection5 = new Dgm.Connection() { ModelId = "10", SourceId = "0", DestinationId = "5", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U }; connectionList1.Append(connection1); connectionList1.Append(connection2); connectionList1.Append(connection3); connectionList1.Append(connection4); connectionList1.Append(connection5); Dgm.Background background1 = new Dgm.Background(); Dgm.Whole whole1 = new Dgm.Whole(); dataModel1.Append(pointList1); dataModel1.Append(connectionList1); dataModel1.Append(background1); dataModel1.Append(whole1); sampleData1.Append(dataModel1); Dgm.StyleData styleData1 = new Dgm.StyleData(); Dgm.DataModel dataModel2 = new Dgm.DataModel(); Dgm.PointList pointList2 = new Dgm.PointList(); Dgm.Point point7 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document }; Dgm.Point point8 = new Dgm.Point() { ModelId = "1" }; Dgm.Point point9 = new Dgm.Point() { ModelId = "2" }; pointList2.Append(point7); pointList2.Append(point8); pointList2.Append(point9); Dgm.ConnectionList connectionList2 = new Dgm.ConnectionList(); Dgm.Connection connection6 = new Dgm.Connection() { ModelId = "3", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection7 = new Dgm.Connection() { ModelId = "4", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U }; connectionList2.Append(connection6); connectionList2.Append(connection7); Dgm.Background background2 = new Dgm.Background(); Dgm.Whole whole2 = new Dgm.Whole(); dataModel2.Append(pointList2); dataModel2.Append(connectionList2); dataModel2.Append(background2); dataModel2.Append(whole2); styleData1.Append(dataModel2); Dgm.ColorData colorData1 = new Dgm.ColorData(); Dgm.DataModel dataModel3 = new Dgm.DataModel(); Dgm.PointList pointList3 = new Dgm.PointList(); Dgm.Point point10 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document }; Dgm.Point point11 = new Dgm.Point() { ModelId = "1" }; Dgm.Point point12 = new Dgm.Point() { ModelId = "2" }; Dgm.Point point13 = new Dgm.Point() { ModelId = "3" }; Dgm.Point point14 = new Dgm.Point() { ModelId = "4" }; Dgm.Point point15 = new Dgm.Point() { ModelId = "5" }; Dgm.Point point16 = new Dgm.Point() { ModelId = "6" }; pointList3.Append(point10); pointList3.Append(point11); pointList3.Append(point12); pointList3.Append(point13); pointList3.Append(point14); pointList3.Append(point15); pointList3.Append(point16); Dgm.ConnectionList connectionList3 = new Dgm.ConnectionList(); Dgm.Connection connection8 = new Dgm.Connection() { ModelId = "7", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection9 = new Dgm.Connection() { ModelId = "8", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection10 = new Dgm.Connection() { ModelId = "9", SourceId = "0", DestinationId = "3", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection11 = new Dgm.Connection() { ModelId = "10", SourceId = "0", DestinationId = "4", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection12 = new Dgm.Connection() { ModelId = "11", SourceId = "0", DestinationId = "5", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U }; Dgm.Connection connection13 = new Dgm.Connection() { ModelId = "12", SourceId = "0", DestinationId = "6", SourcePosition = (UInt32Value)5U, DestinationPosition = (UInt32Value)0U }; connectionList3.Append(connection8); connectionList3.Append(connection9); connectionList3.Append(connection10); connectionList3.Append(connection11); connectionList3.Append(connection12); connectionList3.Append(connection13); Dgm.Background background3 = new Dgm.Background(); Dgm.Whole whole3 = new Dgm.Whole(); dataModel3.Append(pointList3); dataModel3.Append(connectionList3); dataModel3.Append(background3); dataModel3.Append(whole3); colorData1.Append(dataModel3); Dgm.LayoutNode layoutNode1 = new Dgm.LayoutNode() { Name = "diagram" }; Dgm.VariableList variableList1 = new Dgm.VariableList(); Dgm.Direction direction1 = new Dgm.Direction(); Dgm.ResizeHandles resizeHandles1 = new Dgm.ResizeHandles() { Val = Dgm.ResizeHandlesStringValues.Exact }; variableList1.Append(direction1); variableList1.Append(resizeHandles1); Dgm.Choose choose1 = new Dgm.Choose() { Name = "Name0" }; Dgm.DiagramChooseIf diagramChooseIf1 = new Dgm.DiagramChooseIf() { Name = "Name1", Function = Dgm.FunctionValues.Variable, Argument = "dir", Operator = Dgm.FunctionOperatorValues.Equal, Val = "norm" }; Dgm.Algorithm algorithm1 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Snake }; Dgm.Parameter parameter1 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.GrowDirection, Val = "tL" }; Dgm.Parameter parameter2 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.FlowDirection, Val = "row" }; Dgm.Parameter parameter3 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.ContinueDirection, Val = "sameDir" }; Dgm.Parameter parameter4 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.Offset, Val = "ctr" }; algorithm1.Append(parameter1); algorithm1.Append(parameter2); algorithm1.Append(parameter3); algorithm1.Append(parameter4); diagramChooseIf1.Append(algorithm1); Dgm.DiagramChooseElse diagramChooseElse1 = new Dgm.DiagramChooseElse() { Name = "Name2" }; Dgm.Algorithm algorithm2 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Snake }; Dgm.Parameter parameter5 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.GrowDirection, Val = "tR" }; Dgm.Parameter parameter6 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.FlowDirection, Val = "row" }; Dgm.Parameter parameter7 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.ContinueDirection, Val = "sameDir" }; Dgm.Parameter parameter8 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.Offset, Val = "ctr" }; algorithm2.Append(parameter5); algorithm2.Append(parameter6); algorithm2.Append(parameter7); algorithm2.Append(parameter8); diagramChooseElse1.Append(algorithm2); choose1.Append(diagramChooseIf1); choose1.Append(diagramChooseElse1); Dgm.Shape shape3 = new Dgm.Shape() { Blip = "" }; shape3.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); Dgm.AdjustList adjustList1 = new Dgm.AdjustList(); shape3.Append(adjustList1); Dgm.PresentationOf presentationOf1 = new Dgm.PresentationOf(); Dgm.Constraints constraints1 = new Dgm.Constraints(); Dgm.Constraint constraint1 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Width, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", ReferenceType = Dgm.ConstraintValues.Width }; Dgm.Constraint constraint2 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Height, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "node", Fact = 0.6D }; Dgm.Constraint constraint3 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Width, For = Dgm.ConstraintRelationshipValues.Child, ForName = "sibTrans", ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "node", Fact = 0.1D }; Dgm.Constraint constraint4 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Spacing, ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "sibTrans" }; Dgm.Constraint constraint5 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.PrimaryFontSize, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", Operator = Dgm.BoolOperatorValues.Equal, Val = 65D }; constraints1.Append(constraint1); constraints1.Append(constraint2); constraints1.Append(constraint3); constraints1.Append(constraint4); constraints1.Append(constraint5); Dgm.RuleList ruleList1 = new Dgm.RuleList(); Dgm.ForEach forEach1 = new Dgm.ForEach() { Name = "Name3", Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "ch" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "node" } }; Dgm.LayoutNode layoutNode2 = new Dgm.LayoutNode() { Name = "node" }; Dgm.VariableList variableList2 = new Dgm.VariableList(); Dgm.BulletEnabled bulletEnabled1 = new Dgm.BulletEnabled() { Val = true }; variableList2.Append(bulletEnabled1); Dgm.Algorithm algorithm3 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Text }; Dgm.Shape shape4 = new Dgm.Shape() { Type = "rect", Blip = "" }; shape4.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); Dgm.AdjustList adjustList2 = new Dgm.AdjustList(); shape4.Append(adjustList2); Dgm.PresentationOf presentationOf2 = new Dgm.PresentationOf() { Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "desOrSelf" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "node" } }; Dgm.Constraints constraints2 = new Dgm.Constraints(); Dgm.Constraint constraint6 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.LeftMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D }; Dgm.Constraint constraint7 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.RightMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D }; Dgm.Constraint constraint8 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.TopMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D }; Dgm.Constraint constraint9 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.BottomMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D }; constraints2.Append(constraint6); constraints2.Append(constraint7); constraints2.Append(constraint8); constraints2.Append(constraint9); Dgm.RuleList ruleList2 = new Dgm.RuleList(); Dgm.Rule rule1 = new Dgm.Rule() { Type = Dgm.ConstraintValues.PrimaryFontSize, Val = 5D, Fact = new DoubleValue() { InnerText = "NaN" }, Max = new DoubleValue() { InnerText = "NaN" } }; ruleList2.Append(rule1); layoutNode2.Append(variableList2); layoutNode2.Append(algorithm3); layoutNode2.Append(shape4); layoutNode2.Append(presentationOf2); layoutNode2.Append(constraints2); layoutNode2.Append(ruleList2); Dgm.ForEach forEach2 = new Dgm.ForEach() { Name = "Name4", Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "followSib" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "sibTrans" }, Count = new ListValue<UInt32Value>() { InnerText = "1" } }; Dgm.LayoutNode layoutNode3 = new Dgm.LayoutNode() { Name = "sibTrans" }; Dgm.Algorithm algorithm4 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Space }; Dgm.Shape shape5 = new Dgm.Shape() { Blip = "" }; shape5.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); Dgm.AdjustList adjustList3 = new Dgm.AdjustList(); shape5.Append(adjustList3); Dgm.PresentationOf presentationOf3 = new Dgm.PresentationOf(); Dgm.Constraints constraints3 = new Dgm.Constraints(); Dgm.RuleList ruleList3 = new Dgm.RuleList(); layoutNode3.Append(algorithm4); layoutNode3.Append(shape5); layoutNode3.Append(presentationOf3); layoutNode3.Append(constraints3); layoutNode3.Append(ruleList3); forEach2.Append(layoutNode3); forEach1.Append(layoutNode2); forEach1.Append(forEach2); layoutNode1.Append(variableList1); layoutNode1.Append(choose1); layoutNode1.Append(shape3); layoutNode1.Append(presentationOf1); layoutNode1.Append(constraints1); layoutNode1.Append(ruleList1); layoutNode1.Append(forEach1); layoutDefinition1.Append(title1); layoutDefinition1.Append(description1); layoutDefinition1.Append(categoryList1); layoutDefinition1.Append(sampleData1); layoutDefinition1.Append(styleData1); layoutDefinition1.Append(colorData1); layoutDefinition1.Append(layoutNode1); diagramLayoutDefinitionPart1.LayoutDefinition = layoutDefinition1; }