2009-12-08 4 views
0

Я использую в моем проекте cio project visio activex для импорта чертежей чертежей Visio. и мне нужно получить вершины фигур в этом чертеже, и я не могу найти для него какой-либо метод или свойство. если у кого-то есть идеи, пожалуйста, помогите.Как получить вершины формы visio

ответ

0

спасибо, ваш код привел меня открыть путь. , если вы хотите, чтобы вершины формы s: s.pathes [1] .point (double tolarence, out array a); resuly будет на одномерном массиве a.

0

This is something это может быть полезно для вас.

Вот некоторые фрагменты кода, чтобы вы начали:

public void DrawSampleShapeConnection() 
{ 
// get the current draw page 
Visio.Page currentPage = axDrawingControl1.Document.Pages[1]; 

// Load the stencil we want 
Visio.Document currentStencil = axDrawingControl1.Document.Application.Documents.OpenEx("Basic_U.vss", (short)Visio.VisOpenSaveArgs.visOpenDocked); 

// show the stencil window 
Visio.Window stencilWindow = currentPage.Document.OpenStencilWindow(); 

// this gives a count of all the stencils on the status bar 
int countStencils = currentStencil.Masters.Count; 

toolStripStatusLabel1.Text = string.Format("Number of Stencils in {0} = {1}", currentStencil.Title, countStencils); 
statusStrip1.Refresh(); 

// create a triangle shape from the stencil master collection 
Visio.Shape shape1 = currentPage.Drop(currentStencil.Masters["Triangle"], 1.50, 1.50); 

// create a square shape from the stencil master collection 
Visio.Shape shape2 = currentPage.Drop(currentStencil.Masters["Square"], 10, 7.50); 

// create a dynamic connector from the stencil master collection 
Visio.Shape connector = currentPage.Drop(currentStencil.Masters["Dynamic connector"], 4.50, 4.50); 

// currentPage.Layout(); 

// connect the shapes together through the dynamic connector 
ConnectShapes(shape1, shape2, connector); 

} 
Смежные вопросы