0

I create shape and connectors with C# but I want to set Geometry of connectors (I mean lineTo, MoveTo) by code too.

I tried this code but it raise: This section type does not support named rows

short iRow = (short)(Microsoft.Office.Interop.Visio.VisRowIndices.visRowVertex);
short visTagLineTo = (short)Microsoft.Office.Interop.Visio.VisRowTags.visTagLineTo;
var aa = newShape.get_Section(1);
short sectionId = (short)(newShape.AddSection(
    (short)Microsoft.Office.Interop.Visio.VisSectionIndices.visSectionFirstComponent));
var row = newShape.AddNamedRow(sectionId, "LineTo", visTagLineTo);

Actually I don't know how to get the Geometry1 section.

DLeh
  • 23,806
  • 16
  • 84
  • 128
DaNeSh
  • 1,022
  • 1
  • 14
  • 24

1 Answers1

0

Despite the misleading user interface in the shapesheet window, geometry rows are not named rows. Try newShape.AddRow(sectionId, rowIndex, visTagLineTo) instead.

Mike Woolf
  • 1,210
  • 7
  • 11
  • when I use newShape.AddRow(sectionId, rowIndex, visTagLineTo) then I can set cell value with newShape.get_CellsSRC(sectionId, 0, 3).FormulaU but nothing changes in the result. It seems that I should change more related cells. – DaNeSh Sep 16 '14 at 15:33