public static IList <TextFormat> GetFormat(IVisio.Page page, IList <int> shapeids)
        {
            var charcells      = CharacterCells.GetCells(page, shapeids);
            var paracells      = ParagraphCells.GetCells(page, shapeids);
            var textblockcells = TextBlockCells.GetCells(page, shapeids);
            var page_shapes    = page.Shapes;
            var l = new List <TextFormat>(shapeids.Count);

            for (int i = 0; i < shapeids.Count; i++)
            {
                var t = new TextFormat();
                t.CharacterFormats = charcells[i];
                t.ParagraphFormats = paracells[i];
                t.TextBlock        = textblockcells[i];
                l.Add(t);

                var shape = page_shapes.ItemFromID[shapeids[i]];
                t.CharacterTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visCharPropRow, true);
                t.ParagraphTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visParaPropRow, true);

                t.TabStops = TextFormat.GetTabStops(shape);
            }

            return(l);
        }
        public static TextFormat GetFormat(IVisio.Shape shape)
        {
            var cells = new TextFormat();

            cells.CharacterFormats  = CharacterCells.GetCells(shape);
            cells.ParagraphFormats  = ParagraphCells.GetCells(shape);
            cells.TextBlock         = TextBlockCells.GetCells(shape);
            cells.CharacterTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visCharPropRow, true);
            cells.ParagraphTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visParaPropRow, true);
            cells.TabStops          = TextFormat.GetTabStops(shape);
            return(cells);
        }