0

我使用 C# 创建形状和连接器,但我也想通过代码设置连接器的几何形状(我的意思是 lineTo、MoveTo)。

我尝试了这段代码,但它引发了: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);

其实我不知道如何获得该Geometry1部分。

4

1 回答 1

0

尽管 shapesheet 窗口中的用户界面具有误导性,但几何行并未命名为行。试试newShape.AddRow(sectionId, rowIndex, visTagLineTo)吧。

于 2014-09-14T06:32:44.263 回答