从Visio C#中的连接器起点和终点提取文本

时间:2019-03-20 14:19:42

标签: c# com interop visio flowchart

我们如何在Visio中提取两个形状之间的连接器的起点和终点细节。

using Visio = Microsoft.Office.Interop.Visio

class Program
{
   Application visApp = new Application();
   Document visDoc = visApp.Documents.Open(filePath);

   // Get the first page in the sample drawing.
     page = visDoc.Pages[1];

    // Look at each shape in the collection.
            foreach (Shape shape in page.shapes)
            { 
                if (shp.OneD == -1)
                {
                  //Need clues- How to proceed ?
                }

            }
}

在下图中,我想提取“ XYZ”和“ PQR”。

enter image description here

0 个答案:

没有答案