110,538
社区成员
发帖
与我相关
我的任务
分享
void ToSheet_Example(){
Visio.Shapes vsoShapes;
Visio.Shape vsoShape;
Visio.Shape vsoConnectTo;
Visio.Connects vsoConnects;
Visio.Connect vsoConnect ;
int intCurrentShapeIndex;
int intCounter;
vsoShapes = ActivePage.Shapes;
//For each shape on the page, get its connections.
for(intCurrentShapeIndex = 1;intCurrentShapeIndex <=vsoShapes.Count;intCurrentShapeIndex ++)
{
vsoShape = vsoShapes(intCurrentShapeIndex) ;
vsoConnects = vsoShape.Connects ;
//For each connection, get the shape it connects to.
for(intCounter = 1; intCounter <=vsoConnects.Count ;intCounter ++)
{
vsoConnect = vsoConnects(intCounter) ;
vsoConnectTo = vsoConnect.ToSheet ;
//Print the name of the shape the
//Connect object connects to.
Console.WriteLine(vsoConnectTo.Name);
}
}
}