我使用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
部分。
答案 0 :(得分:0)
尽管形状表窗口中的用户界面具有误导性,但几何行不是命名行。请改为newShape.AddRow(sectionId, rowIndex, visTagLineTo)
。