private static void DrawCube(DocCube docCube, bool withSysDims) { Visio.Shape cubeShape = adaptPage.Drop(visioCubeMaster, posX > 6 ? posX = 1.25 : posX += 1.5, posX == 1.25 ? posY += 1.5 : posY); // set font size for CubeShape cubeShape.Shapes[2].CellsSRC[(short)Visio.VisSectionIndices.visSectionCharacter, (short)Visio.VisRowIndices.visRowCharacter, (short)Visio.VisCellIndices.visCharacterSize].Formula = "=7 pt."; cubeShape.Text = docCube.name; cubeShape.Name = docCube.name; // get DimShape Visio.Shape dimShape = cubeShape.Shapes[1]; StringBuilder dims = new StringBuilder(); foreach (DocDimension docDim in docCube.dims) { if (withSysDims || !docDim.name.StartsWith("}", StringComparison.OrdinalIgnoreCase)) { dims.AppendLine(docDim.name); } } // set font size for DimShape dimShape.CellsSRC[(short)Visio.VisSectionIndices.visSectionCharacter, (short)Visio.VisRowIndices.visRowCharacter, (short)Visio.VisCellIndices.visCharacterSize].Formula = "=5 pt."; // write dims to DimShape dimShape.Text = dims.ToString(); cubeList.Add(cubeShape); }
private static void DrawLooksConnections(DocCube docCube) { Visio.Shape cubeTo = cubeList.Find(x => x.Name.Equals(docCube.name)); foreach (DocCube look_cube in docCube.look_up_cubes) { Visio.Shape cubeFrom = cubeList.Find(x => x.Name.Equals(look_cube.name)); ConnectWithDynamicGlueAndConnector("Used By", cubeFrom, cubeTo, false); } }
private static void DrawFeedsConnections(DocCube docCube) { Visio.Shape cubeFrom = cubeList.Find(x => x.Name.Equals(docCube.name)); foreach (DocCube fed_cube in docCube.fed_cubes) { Visio.Shape cubeTo = cubeList.Find(x => x.Name.Equals(fed_cube.name)); ConnectWithDynamicGlueAndConnector("Used By", cubeFrom, cubeTo, true); } }