public void ArrangeGraph(Visio.Selection selection) { //Sets various organisation elements) // set 'PlaceStyle' /*Visio Layout Code * 1. Flowchart = 1 * 2. Hierarchy = 17 * 3. CompactTree = 7 * 4. Circular = 6 * 5. Radial = 3 * */ var placeStyleCell = VisApp.ActivePage.PageSheet.get_CellsSRC( (short)Visio.VisSectionIndices.visSectionObject, (short)Visio.VisRowIndices.visRowPageLayout, (short)Visio.VisCellIndices.visPLOPlaceStyle).ResultIU = flowCode; //Flow layout code goes here // set 'RouteStyle' var routeStyleCell = VisApp.ActivePage.PageSheet.get_CellsSRC( (short)Visio.VisSectionIndices.visSectionObject, (short)Visio.VisRowIndices.visRowPageLayout, (short)Visio.VisCellIndices.visPLORouteStyle).ResultIU = 5; // set 'PageShapeSplit' var pageShapeSplitCell = VisApp.ActivePage.PageSheet.get_CellsSRC( (short)Visio.VisSectionIndices.visSectionObject, (short)Visio.VisRowIndices.visRowPageLayout, (short)Visio.VisCellIndices.visPLOSplit).ResultIU = 1; if (selection.Count != 0) { selection.Layout(); } }