Exemple #1
0
        public short Render(IVisio.Shape shape)
        {
            short sec_index = GeometryHelper.AddSection(shape);
            short row_count = shape.RowCount[sec_index];

            var update = new VA.ShapeSheet.Update();

            var src_nofill = VA.ShapeSheet.SRCConstants.Geometry_NoFill.ForSectionAndRow(sec_index, 0);
            var src_noline = VA.ShapeSheet.SRCConstants.Geometry_NoLine.ForSectionAndRow(sec_index, 0);
            var src_noshow = VA.ShapeSheet.SRCConstants.Geometry_NoShow.ForSectionAndRow(sec_index, 0);
            var src_nosnap = VA.ShapeSheet.SRCConstants.Geometry_NoSnap.ForSectionAndRow(sec_index, 0);

            //var src_noquickdrag = VA.ShapeSheet.SRCConstants.Geometry_NoQuickDrag.ForSectionAndRow(sec_index, 0);

            update.SetFormulaIgnoreNull(src_nofill, this.NoFill);
            update.SetFormulaIgnoreNull(src_noline, this.NoLine);
            update.SetFormulaIgnoreNull(src_noshow, this.NoShow);
            update.SetFormulaIgnoreNull(src_nosnap, this.NoSnap);
            //update.SetFormulaIgnoreNull(src_noquickdrag, this.NoQuickDrag);

            foreach (var row in this.Rows)
            {
                row.AddTo(shape, update, row_count, sec_index);
                row_count++;
            }

            update.Execute(shape);
            return(0);
        }
Exemple #2
0
        private void Update(short section, short row_index, VA.ShapeSheet.Update update)
        {
            var x_src = VA.ShapeSheet.SRCConstants.Geometry_X.ForSectionAndRow(section, row_index);
            var y_src = VA.ShapeSheet.SRCConstants.Geometry_Y.ForSectionAndRow(section, row_index);
            var a_src = VA.ShapeSheet.SRCConstants.Geometry_A.ForSectionAndRow(section, row_index);
            var b_src = VA.ShapeSheet.SRCConstants.Geometry_B.ForSectionAndRow(section, row_index);
            var c_src = VA.ShapeSheet.SRCConstants.Geometry_C.ForSectionAndRow(section, row_index);
            var d_src = VA.ShapeSheet.SRCConstants.Geometry_D.ForSectionAndRow(section, row_index);
            var e_src = VA.ShapeSheet.SRCConstants.Geometry_E.ForSectionAndRow(section, row_index);

            update.SetFormulaIgnoreNull(x_src, this.X);
            update.SetFormulaIgnoreNull(y_src, this.Y);
            update.SetFormulaIgnoreNull(a_src, this.A);
            update.SetFormulaIgnoreNull(b_src, this.B);
            update.SetFormulaIgnoreNull(c_src, this.C);
            update.SetFormulaIgnoreNull(d_src, this.D);
            update.SetFormulaIgnoreNull(e_src, this.E);
        }
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();

            update.BlastGuards  = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var cellmap  = CellSRCDictionary.GetCellMapForShapes();
            var valuemap = new CellValueDictionary(cellmap, this.Hashtable);

            var target_shapes = this.Shapes ?? this.Client.Selection.GetShapes();

            this.DumpValues(valuemap);

            foreach (var shape in target_shapes)
            {
                var id = shape.ID16;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var    cell_src   = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(id, cell_src, cell_value);
                }
            }

            var surface = this.Client.ShapeSheet.GetShapeSheetSurface();

            this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
            this.WriteVerbose("TestCircular: {0}", this.TestCircular);
            this.WriteVerbose("Number of Shapes : {0}", target_shapes.Count);
            this.WriteVerbose("Number of Total Updates: {0}", update.Count());

            using (var undoscope = this.Client.Application.NewUndoScope("SetShapeCells"))
            {
                this.WriteVerbose("Start Update");
                update.Execute(surface);
                this.WriteVerbose("End Update");
            }
        }
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();
            update.BlastGuards = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var cellmap = CellSRCDictionary.GetCellMapForShapes();
            var valuemap = new CellValueDictionary(cellmap, this.Hashtable);

            var target_shapes = this.Shapes ?? this.client.Selection.GetShapes();

            this.DumpValues(valuemap);

            foreach (var shape in target_shapes)
            {
                var id = shape.ID16;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var cell_src = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(id,cell_src, cell_value);
                }
            }

            var surface = this.client.ShapeSheet.GetShapeSheetSurface();

            this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
            this.WriteVerbose("TestCircular: {0}", this.TestCircular);
            this.WriteVerbose("Number of Shapes : {0}", target_shapes.Count);
            this.WriteVerbose("Number of Total Updates: {0}", update.Count());

            using (var undoscope = this.client.Application.NewUndoScope( "SetShapeCells"))
            {
                this.WriteVerbose("Start Update");
                update.Execute(surface);
                this.WriteVerbose("End Update");
            }
        }
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();

            update.BlastGuards  = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var target_pages = this.Pages ?? new[] { this.client.Page.Get() };

            var cellmap  = CellSRCDictionary.GetCellMapForPages();
            var valuemap = new CellValueDictionary(cellmap, this.Hashtable);

            this.DumpValues(valuemap);

            foreach (var page in target_pages)
            {
                var pagesheet = page.PageSheet;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var    cell_src   = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(cell_src, cell_value);
                }
                this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
                this.WriteVerbose("TestCircular: {0}", this.TestCircular);
                this.WriteVerbose("Number of Shapes : {0}", 1);
                this.WriteVerbose("Number of Total Updates: {0}", update.Count());

                var application = this.client.Application.Get();
                using (var undoscope = this.client.Application.NewUndoScope("SetPageCells"))
                {
                    this.WriteVerbose("Start Update");
                    update.Execute(pagesheet);
                    this.WriteVerbose("End Update");
                }
            }
        }
Exemple #6
0
        public void Apply(VA.ShapeSheet.Update update, short id)
        {
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Width, Width);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Height, Height);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PinX, PinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PinY, PinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LocPinX, LocPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LocPinY, LocPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Angle, Angle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BeginArrow, BeginArrow);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BeginArrowSize, BeginArrowSize);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillBkgnd, FillBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillBkgndTrans, FillBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillForegnd, FillForegnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillForegndTrans, FillForegndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.FillPattern, FillPattern);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwObliqueAngle, ShapeShdwObliqueAngle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwOffsetX, ShapeShdwOffsetX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwOffsetY, ShapeShdwOffsetY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwScaleFactor, ShapeShdwScaleFactor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeShdwType, ShapeShdwType);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwBkgnd, ShdwBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwBkgndTrans, ShdwBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwForegnd, ShdwForegnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwForegndTrans, ShdwForegndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShdwPattern, ShdwPattern);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharCase, CharCase);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharFont, CharFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharColor, CharColor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharSize, CharSize);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharLetterspace, CharLetterspace);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharStyle, CharStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CharColorTrans, CharTransparency);

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EndArrow, EndArrow);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EndArrowSize, EndArrowSize);

            // Line
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineColor, LineColor);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineColorTrans, LineColorTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LinePattern, LinePattern);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineWeight, LineWeight);

            // Text
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BottomMargin, BottomMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.DefaultTabStop, DefaultTabstop);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LeftMargin, LeftMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.RightMargin, RightMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextBkgnd, TextBkgnd);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextBkgndTrans, TextBkgndTrans);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TextDirection, TextDirection);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TopMargin, TopMargin);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.VerticalAlign, VerticalAlign);

            // Paragraph

            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_Bullet, ParaBullet);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletFont, ParaBulletFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletFontSize, ParaBulletFontSize);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_BulletStr, ParaBulletString);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_Flags, ParaFlags);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_HorzAlign, ParaHorizontalAlign);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndFirst, ParaIndentFirst);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndLeft, ParaIndentLeft);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_IndRight, ParaIndentRight);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_LocalizeBulletFont, ParaLocBulletFont);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpAfter, ParaSpacingAfter);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpBefore, ParaSpacingBefore);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_SpLine, ParaSpacingLine);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.Para_TextPosAfterBullet, ParaTextPosAfterBullet);

            // TextXForm
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtAngle, TxtAngle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtHeight, TxtHeight);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtLocPinX, TxtLocPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtLocPinY, TxtLocPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtPinX, TxtPinX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtPinY, TxtPinY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.TxtWidth, TxtWidth);

            // ShapeLayout
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConFixedCode, ConFixedCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpCode, ConLineJumpCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpDirX, ConLineJumpDirX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpDirY, ConLineJumpDirY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineJumpStyle, ConLineJumpStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ConLineRouteExt, ConLineRouteExt);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeFixedCode, ShapeFixedCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeablePlace, ShapePermeablePlace);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeableX, ShapePermeableX);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePermeableY, ShapePermeableY);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlaceFlip, ShapePlaceFlip);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlaceStyle, ShapePlaceStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapePlowCode, ShapePlowCode);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeRouteStyle, ShapeRouteStyle);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeSplit, ShapeSplit);
            update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ShapeSplittable, ShapeSplittable);
        }
Exemple #7
0
 internal void ApplyFormulas(VA.ShapeSheet.Update update, short row)
 {
     update.SetFormulaIgnoreNull(SRCCON.CharColor.ForRow(row), this.Color);
     update.SetFormulaIgnoreNull(SRCCON.CharFont.ForRow(row), this.Font);
     update.SetFormulaIgnoreNull(SRCCON.CharSize.ForRow(row), this.Size);
     update.SetFormulaIgnoreNull(SRCCON.CharStyle.ForRow(row), this.Style);
     update.SetFormulaIgnoreNull(SRCCON.CharColorTrans.ForRow(row), this.Transparency);
     update.SetFormulaIgnoreNull(SRCCON.CharAsianFont.ForRow(row), this.AsianFont);
     update.SetFormulaIgnoreNull(SRCCON.CharCase.ForRow(row), this.Case);
     update.SetFormulaIgnoreNull(SRCCON.CharComplexScriptFont.ForRow(row), this.ComplexScriptFont);
     update.SetFormulaIgnoreNull(SRCCON.CharComplexScriptSize.ForRow(row), this.ComplexScriptSize);
     update.SetFormulaIgnoreNull(SRCCON.CharDblUnderline.ForRow(row), this.DoubleUnderline);
     update.SetFormulaIgnoreNull(SRCCON.CharDoubleStrikethrough.ForRow(row), this.DoubleStrikeThrough);
     update.SetFormulaIgnoreNull(SRCCON.CharLangID.ForRow(row), this.LangID);
     update.SetFormulaIgnoreNull(SRCCON.CharFontScale.ForRow(row), this.FontScale);
     update.SetFormulaIgnoreNull(SRCCON.CharLangID.ForRow(row), this.LangID);
     update.SetFormulaIgnoreNull(SRCCON.CharLetterspace.ForRow(row), this.Letterspace);
     update.SetFormulaIgnoreNull(SRCCON.CharLocale.ForRow(row), this.Locale);
     update.SetFormulaIgnoreNull(SRCCON.CharLocalizeFont.ForRow(row), this.LocalizeFont);
     update.SetFormulaIgnoreNull(SRCCON.CharOverline.ForRow(row), this.Overline);
     update.SetFormulaIgnoreNull(SRCCON.CharPerpendicular.ForRow(row), this.Perpendicular);
     update.SetFormulaIgnoreNull(SRCCON.CharPos.ForRow(row), this.Pos);
     update.SetFormulaIgnoreNull(SRCCON.CharRTLText.ForRow(row), this.RTLText);
     update.SetFormulaIgnoreNull(SRCCON.CharStrikethru.ForRow(row), this.Strikethru);
     update.SetFormulaIgnoreNull(SRCCON.CharUseVertical.ForRow(row), this.UseVertical);
 }
Exemple #8
0
 public void Apply(VA.ShapeSheet.Update update, short id)
 {
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.AvenueSizeX, AvenueSizeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.AvenueSizeY, AvenueSizeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BlockSizeX, BlockSizeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.BlockSizeY, BlockSizeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.CtrlAsInput, CtrlAsInput);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.DynamicsOff, DynamicsOff);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.EnableGrid, EnableGrid);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineAdjustFrom, LineAdjustFrom);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineAdjustTo, LineAdjustTo);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpCode, LineJumpCode);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpFactorX, LineJumpFactorX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpFactorY, LineJumpFactorY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineJumpStyle, LineJumpStyle);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineRouteExt, LineRouteExt);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToLineX, LineToLineX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToLineY, LineToLineY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToNodeX, LineToNodeX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.LineToNodeY, LineToNodeY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageLineJumpDirX, PageLineJumpDirX);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageLineJumpDirY, PageLineJumpDirY);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PageShapeSplit, PageShapeSplit);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceDepth, PlaceDepth);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceFlip, PlaceFlip);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlaceStyle, PlaceStyle);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.PlowCode, PlowCode);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.ResizePage, ResizePage);
     update.SetFormulaIgnoreNull(id, ShapeSheet.SRCConstants.RouteStyle, RouteStyle);
 }
Exemple #9
0
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();

            update.BlastGuards  = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var valuemap = new CellValueMap(Get_VisioShapeCell.GetShapeCellDictionary());

            valuemap.UpdateValueMap(this.Hashtable);
            valuemap.SetIf("Angle", this.Angle);
            valuemap.SetIf("BeginArrow", this.BeginArrow);
            valuemap.SetIf("BeginArrowSize", this.BeginArrowSize);
            valuemap.SetIf("BeginX", this.BeginX);
            valuemap.SetIf("BeginY", this.BeginY);
            valuemap.SetIf("CharCase", this.CharCase);
            valuemap.SetIf("CharColor", this.CharColor);
            valuemap.SetIf("CharColorTransparency", this.CharColorTransparency);
            valuemap.SetIf("CharFont", this.CharFont);
            valuemap.SetIf("CharFontScale", this.CharFontScale);
            valuemap.SetIf("CharLetterspace", this.CharLetterspace);
            valuemap.SetIf("CharSize", this.CharSize);
            valuemap.SetIf("CharStyle", this.CharStyle);
            valuemap.SetIf("EndArrow", this.EndArrow);
            valuemap.SetIf("EndArrowSize", this.EndArrowSize);
            valuemap.SetIf("EndX", this.EndX);
            valuemap.SetIf("EndY", this.EndY);
            valuemap.SetIf("FillBkgnd", this.FillBkgnd);
            valuemap.SetIf("FillBkgndTrans", this.FillBkgndTrans);
            valuemap.SetIf("FillForegnd", this.FillForegnd);
            valuemap.SetIf("FillForegndTrans", this.FillForegndTrans);
            valuemap.SetIf("FillPattern", this.FillPattern);
            valuemap.SetIf("Height", this.Height);
            valuemap.SetIf("HideText", this.HideText);
            valuemap.SetIf("LineCap", this.LineCap);
            valuemap.SetIf("LineColor", this.LineColor);
            valuemap.SetIf("LinePattern", this.LinePattern);
            valuemap.SetIf("LineWeight", this.LineWeight);
            valuemap.SetIf("LockAspect", this.LockAspect);
            valuemap.SetIf("LockBegin", this.LockBegin);
            valuemap.SetIf("LockCalcWH", this.LockCalcWH);
            valuemap.SetIf("LockCrop", this.LockCrop);
            valuemap.SetIf("LockCustProp", this.LockCustProp);
            valuemap.SetIf("LockDelete", this.LockDelete);
            valuemap.SetIf("LockEnd", this.LockEnd);
            valuemap.SetIf("LockFormat", this.LockFormat);
            valuemap.SetIf("LockFromGroupFormat", this.LockFromGroupFormat);
            valuemap.SetIf("LockGroup", this.LockGroup);
            valuemap.SetIf("LockHeight", this.LockHeight);
            valuemap.SetIf("LockMoveX", this.LockMoveX);
            valuemap.SetIf("LockMoveY", this.LockMoveY);
            valuemap.SetIf("LockRotate", this.LockRotate);
            valuemap.SetIf("LockSelect", this.LockSelect);
            valuemap.SetIf("LockTextEdit", this.LockTextEdit);
            valuemap.SetIf("LockThemeColors", this.LockThemeColors);
            valuemap.SetIf("LockThemeEffects", this.LockThemeEffects);
            valuemap.SetIf("LockVtxEdit", this.LockVtxEdit);
            valuemap.SetIf("LockWidth", this.LockWidth);
            valuemap.SetIf("LocPinX", this.LocPinX);
            valuemap.SetIf("LocPinY", this.LocPinY);
            valuemap.SetIf("PinX", this.PinX);
            valuemap.SetIf("PinY", this.PinY);
            valuemap.SetIf("Rounding", this.Rounding);
            valuemap.SetIf("SelectMode", this.SelectMode);
            valuemap.SetIf("ShdwBkgnd", this.ShdwBkgnd);
            valuemap.SetIf("ShdwBkgndTrans", this.ShdwBkgndTrans);
            valuemap.SetIf("ShdwForegnd", this.ShdwForegnd);
            valuemap.SetIf("ShdwForegndTrans", this.ShdwForegndTrans);
            valuemap.SetIf("ShdwObliqueAngle", this.ShdwObliqueAngle);
            valuemap.SetIf("ShdwOffsetX", this.ShdwOffsetX);
            valuemap.SetIf("ShdwOffsetY", this.ShdwOffsetY);
            valuemap.SetIf("ShdwPattern", this.ShdwPattern);
            valuemap.SetIf("ShdwScalefactor", this.ShdwScalefactor);
            valuemap.SetIf("ShdwType", this.ShdwType);
            valuemap.SetIf("TxtAngle", this.TxtAngle);
            valuemap.SetIf("TxtHeight", this.TxtHeight);
            valuemap.SetIf("TxtHeight", this.TxtHeight);
            valuemap.SetIf("TxtLocPinY", this.TxtLocPinY);
            valuemap.SetIf("TxtPinX", this.TxtPinX);
            valuemap.SetIf("TxtPinY", this.TxtPinY);
            valuemap.SetIf("TxtWidth", this.TxtWidth);
            valuemap.SetIf("Width", this.Width);

            var target_shapes = this.Shapes ?? this.client.Selection.GetShapes();

            foreach (var shape in target_shapes)
            {
                var id = shape.ID16;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var    cell_src   = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(id, cell_src, cell_value);
                }
            }

            var surface = this.client.Draw.GetDrawingSurfaceSafe();

            this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
            this.WriteVerbose("TestCircular: {0}", this.TestCircular);
            this.WriteVerbose("Number of Shapes : {0}", target_shapes.Count);
            this.WriteVerbose("Number of Total Updates: {0}", update.Count());

            using (var undoscope = new VA.Application.UndoScope(this.client.VisioApplication, "SetShapeCells"))
            {
                this.WriteVerbose("Start Update");
                update.Execute(surface);
                this.WriteVerbose("End Update");
            }
        }
Exemple #10
0
 internal void ApplyFormulas(VA.ShapeSheet.Update update, short row)
 {
     update.SetFormulaIgnoreNull(SRCCON.Para_IndLeft.ForRow(row), this.IndentLeft);
     update.SetFormulaIgnoreNull(SRCCON.Para_IndFirst.ForRow(row), this.IndentFirst);
     update.SetFormulaIgnoreNull(SRCCON.Para_IndRight.ForRow(row), this.IndentRight);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpAfter.ForRow(row), this.SpacingAfter);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpBefore.ForRow(row), this.SpacingBefore);
     update.SetFormulaIgnoreNull(SRCCON.Para_SpLine.ForRow(row), this.SpacingLine);
     update.SetFormulaIgnoreNull(SRCCON.Para_HorzAlign.ForRow(row), this.HorizontalAlign);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletFont.ForRow(row), this.BulletFont);
     update.SetFormulaIgnoreNull(SRCCON.Para_Bullet.ForRow(row), this.Bullet);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletFontSize.ForRow(row), this.BulletFontSize);
     update.SetFormulaIgnoreNull(SRCCON.Para_LocalizeBulletFont.ForRow(row), this.LocBulletFont);
     update.SetFormulaIgnoreNull(SRCCON.Para_TextPosAfterBullet.ForRow(row), this.TextPosAfterBullet);
     update.SetFormulaIgnoreNull(SRCCON.Para_Flags.ForRow(row), this.Flags);
     update.SetFormulaIgnoreNull(SRCCON.Para_BulletStr.ForRow(row), this.BulletString);
 }
Exemple #11
0
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();

            update.BlastGuards  = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var target_pages = this.Pages ?? new[] { this.client.Page.Get() };

            var valuemap = new CellValueMap(Get_VisioPageCell.GetPageCellDictionary());

            valuemap.UpdateValueMap(this.Hashtable);

            valuemap.SetIf("PageBottomMargin", this.PageBottomMargin);
            valuemap.SetIf("PageHeight", this.PageHeight);
            valuemap.SetIf("PageLeftMargin", this.PageLeftMargin);
            valuemap.SetIf("PageLineJumpDirX", this.PageLineJumpDirX);
            valuemap.SetIf("PageLineJumpDirY", this.PageLineJumpDirY);
            valuemap.SetIf("PageRightMargin", this.PageRightMargin);
            valuemap.SetIf("PageScale", this.PageScale);
            valuemap.SetIf("PageShapeSplit", this.PageShapeSplit);
            valuemap.SetIf("PageTopMargin", this.PageTopMargin);
            valuemap.SetIf("PageWidth", this.PageWidth);
            valuemap.SetIf("CenterX", this.CenterX);
            valuemap.SetIf("CenterY", this.CenterY);
            valuemap.SetIf("PaperKind", this.PaperKind);
            valuemap.SetIf("PrintGrid", this.PrintGrid);
            valuemap.SetIf("PrintPageOrientation", this.PrintPageOrientation);
            valuemap.SetIf("ScaleX", this.ScaleX);
            valuemap.SetIf("ScaleY", this.ScaleY);
            valuemap.SetIf("PaperSource", this.PaperSource);
            valuemap.SetIf("DrawingScale", this.DrawingScale);
            valuemap.SetIf("DrawingScaleType", this.DrawingScaleType);
            valuemap.SetIf("DrawingSizeType", this.DrawingSizeType);
            valuemap.SetIf("InhibitSnap", this.InhibitSnap);
            valuemap.SetIf("ShdwObliqueAngle", this.ShdwObliqueAngle);
            valuemap.SetIf("ShdwOffsetX", this.ShdwOffsetX);
            valuemap.SetIf("ShdwOffsetY", this.ShdwOffsetY);
            valuemap.SetIf("ShdwScaleFactor", this.ShdwScaleFactor);
            valuemap.SetIf("ShdwType", this.ShdwType);
            valuemap.SetIf("UIVisibility", this.UIVisibility);
            valuemap.SetIf("XGridDensity", this.XGridDensity);
            valuemap.SetIf("XGridOrigin", this.XGridOrigin);
            valuemap.SetIf("XGridSpacing", this.XGridSpacing);
            valuemap.SetIf("XRulerDensity", this.XRulerDensity);
            valuemap.SetIf("XRulerOrigin", this.XRulerOrigin);
            valuemap.SetIf("YGridDensity", this.YGridDensity);
            valuemap.SetIf("YGridOrigin", this.YGridOrigin);
            valuemap.SetIf("YGridSpacing", this.YGridSpacing);
            valuemap.SetIf("YRulerDensity", this.YRulerDensity);
            valuemap.SetIf("YRulerOrigin", this.YRulerOrigin);
            valuemap.SetIf("AvenueSizeX", this.AvenueSizeX);
            valuemap.SetIf("AvenueSizeY", this.AvenueSizeY);
            valuemap.SetIf("BlockSizeX", this.BlockSizeX);
            valuemap.SetIf("BlockSizeY", this.BlockSizeY);
            valuemap.SetIf("CtrlAsInput", this.CtrlAsInput);
            valuemap.SetIf("DynamicsOff", this.DynamicsOff);
            valuemap.SetIf("EnableGrid", this.EnableGrid);
            valuemap.SetIf("LineAdjustFrom", this.LineAdjustFrom);
            valuemap.SetIf("LineAdjustTo", this.LineAdjustTo);
            valuemap.SetIf("LineJumpCode", this.LineJumpCode);
            valuemap.SetIf("LineJumpFactorX", this.LineJumpFactorX);
            valuemap.SetIf("LineJumpFactorY", this.LineJumpFactorY);
            valuemap.SetIf("LineJumpStyle", this.LineJumpStyle);
            valuemap.SetIf("LineRouteExt", this.LineRouteExt);
            valuemap.SetIf("LineToLineX", this.LineToLineX);
            valuemap.SetIf("LineToLineY", this.LineToLineY);
            valuemap.SetIf("LineToNodeX", this.LineToNodeX);
            valuemap.SetIf("LineToNodeY", this.LineToNodeY);
            valuemap.SetIf("PageLineJumpDirX", this.PageLineJumpDirX);
            valuemap.SetIf("PageLineJumpDirY", this.PageLineJumpDirY);
            valuemap.SetIf("PageShapeSplit", this.PageShapeSplit);
            valuemap.SetIf("PlaceDepth", this.PlaceDepth);
            valuemap.SetIf("PlaceFlip", this.PlaceFlip);
            valuemap.SetIf("PlaceStyle", this.PlaceStyle);
            valuemap.SetIf("PlowCode", this.PlowCode);
            valuemap.SetIf("ResizePage", this.ResizePage);
            valuemap.SetIf("RouteStyle", this.RouteStyle);
            valuemap.SetIf("AvoidPageBreaks", this.AvoidPageBreaks);
            valuemap.SetIf("DrawingResizeType", this.DrawingResizeType);


            foreach (var page in target_pages)
            {
                var pagesheet = page.PageSheet;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var    cell_src   = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(cell_src, cell_value);
                }
                this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
                this.WriteVerbose("TestCircular: {0}", this.TestCircular);
                this.WriteVerbose("Number of Shapes : {0}", 1);
                this.WriteVerbose("Number of Total Updates: {0}", update.Count());
                this.WriteVerbose("Number of Updates per Shape: {0}", update.Count() / 1);

                using (var undoscope = new VA.Application.UndoScope(this.client.VisioApplication, "SetPageCells"))
                {
                    this.WriteVerbose("Start Update");
                    update.Execute(pagesheet);
                    this.WriteVerbose("End Update");
                }
            }
        }
        protected override void ProcessRecord()
        {
            var update = new VisioAutomation.ShapeSheet.Update();
            update.BlastGuards = this.BlastGuards;
            update.TestCircular = this.TestCircular;

            var valuemap = new CellValueMap(Get_VisioShapeCell.GetShapeCellDictionary());
            valuemap.UpdateValueMap(this.Hashtable);
            valuemap.SetIf("Angle", this.Angle);
            valuemap.SetIf("BeginArrow", this.BeginArrow);
            valuemap.SetIf("BeginArrowSize", this.BeginArrowSize);
            valuemap.SetIf("BeginX", this.BeginX);
            valuemap.SetIf("BeginY", this.BeginY);
            valuemap.SetIf("CharCase", this.CharCase);
            valuemap.SetIf("CharColor", this.CharColor);
            valuemap.SetIf("CharColorTransparency", this.CharColorTransparency);
            valuemap.SetIf("CharFont", this.CharFont);
            valuemap.SetIf("CharFontScale", this.CharFontScale);
            valuemap.SetIf("CharLetterspace", this.CharLetterspace);
            valuemap.SetIf("CharSize", this.CharSize);
            valuemap.SetIf("CharStyle", this.CharStyle);
            valuemap.SetIf("EndArrow", this.EndArrow);
            valuemap.SetIf("EndArrowSize", this.EndArrowSize);
            valuemap.SetIf("EndX", this.EndX);
            valuemap.SetIf("EndY", this.EndY);
            valuemap.SetIf("FillBkgnd", this.FillBkgnd);
            valuemap.SetIf("FillBkgndTrans", this.FillBkgndTrans);
            valuemap.SetIf("FillForegnd", this.FillForegnd);
            valuemap.SetIf("FillForegndTrans", this.FillForegndTrans);
            valuemap.SetIf("FillPattern", this.FillPattern);
            valuemap.SetIf("Height", this.Height);
            valuemap.SetIf("HideText", this.HideText);
            valuemap.SetIf("LineCap", this.LineCap);
            valuemap.SetIf("LineColor", this.LineColor);
            valuemap.SetIf("LinePattern", this.LinePattern);
            valuemap.SetIf("LineWeight", this.LineWeight);
            valuemap.SetIf("LockAspect", this.LockAspect);
            valuemap.SetIf("LockBegin", this.LockBegin);
            valuemap.SetIf("LockCalcWH", this.LockCalcWH);
            valuemap.SetIf("LockCrop", this.LockCrop);
            valuemap.SetIf("LockCustProp", this.LockCustProp);
            valuemap.SetIf("LockDelete", this.LockDelete);
            valuemap.SetIf("LockEnd", this.LockEnd);
            valuemap.SetIf("LockFormat", this.LockFormat);
            valuemap.SetIf("LockFromGroupFormat", this.LockFromGroupFormat);
            valuemap.SetIf("LockGroup", this.LockGroup);
            valuemap.SetIf("LockHeight", this.LockHeight);
            valuemap.SetIf("LockMoveX", this.LockMoveX);
            valuemap.SetIf("LockMoveY", this.LockMoveY);
            valuemap.SetIf("LockRotate", this.LockRotate);
            valuemap.SetIf("LockSelect", this.LockSelect);
            valuemap.SetIf("LockTextEdit", this.LockTextEdit);
            valuemap.SetIf("LockThemeColors", this.LockThemeColors);
            valuemap.SetIf("LockThemeEffects", this.LockThemeEffects);
            valuemap.SetIf("LockVtxEdit", this.LockVtxEdit);
            valuemap.SetIf("LockWidth", this.LockWidth);
            valuemap.SetIf("LocPinX", this.LocPinX);
            valuemap.SetIf("LocPinY", this.LocPinY);
            valuemap.SetIf("PinX", this.PinX);
            valuemap.SetIf("PinY", this.PinY);
            valuemap.SetIf("Rounding", this.Rounding);
            valuemap.SetIf("SelectMode", this.SelectMode);
            valuemap.SetIf("ShdwBkgnd", this.ShdwBkgnd);
            valuemap.SetIf("ShdwBkgndTrans", this.ShdwBkgndTrans);
            valuemap.SetIf("ShdwForegnd", this.ShdwForegnd);
            valuemap.SetIf("ShdwForegndTrans", this.ShdwForegndTrans);
            valuemap.SetIf("ShdwObliqueAngle", this.ShdwObliqueAngle);
            valuemap.SetIf("ShdwOffsetX", this.ShdwOffsetX);
            valuemap.SetIf("ShdwOffsetY", this.ShdwOffsetY);
            valuemap.SetIf("ShdwPattern", this.ShdwPattern);
            valuemap.SetIf("ShdwScalefactor", this.ShdwScalefactor);
            valuemap.SetIf("ShdwType", this.ShdwType);
            valuemap.SetIf("TxtAngle", this.TxtAngle);
            valuemap.SetIf("TxtHeight", this.TxtHeight);
            valuemap.SetIf("TxtHeight", this.TxtHeight);
            valuemap.SetIf("TxtLocPinY", this.TxtLocPinY);
            valuemap.SetIf("TxtPinX", this.TxtPinX);
            valuemap.SetIf("TxtPinY", this.TxtPinY);
            valuemap.SetIf("TxtWidth", this.TxtWidth);
            valuemap.SetIf("Width", this.Width);

            var target_shapes = this.Shapes ?? this.client.Selection.GetShapes();

            foreach (var shape in target_shapes)
            {
                var id = shape.ID16;

                foreach (var cellname in valuemap.CellNames)
                {
                    string cell_value = valuemap[cellname];
                    var cell_src = valuemap.GetSRC(cellname);
                    update.SetFormulaIgnoreNull(id,cell_src, cell_value);
                }
            }

            var surface = this.client.Draw.GetDrawingSurfaceSafe();

            this.WriteVerbose("BlastGuards: {0}", this.BlastGuards);
            this.WriteVerbose("TestCircular: {0}", this.TestCircular);
            this.WriteVerbose("Number of Shapes : {0}", target_shapes.Count);
            this.WriteVerbose("Number of Total Updates: {0}", update.Count());

            using (var undoscope = new VA.Application.UndoScope(this.client.VisioApplication, "SetShapeCells"))
            {
                this.WriteVerbose("Start Update");
                update.Execute(surface);
                this.WriteVerbose("End Update");
            }
        }