如何使用VB.net在VISIO中删除形状内部形状

时间:2011-03-23 05:52:54

标签: c# .net vb.net visio

我使用机架式设备(美国单位).VSS作为模板。我需要在Rack上连接服务器。请给出答案......!

1 个答案:

答案 0 :(得分:0)

Friend WithEvents AxDC As AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl

currentPage = AxDC.Document.Pages(1) currentStencil = AxDC.Document.Application.Documents.OpenEx(File_name,VisOpenSaveArgs.visOpenDocked)

Dim shapeRack As Microsoft.Office.Interop.Visio.Shape = currentPage.Drop(currentStencil.Masters(“Rack”),1,6)

Dim shapeSrver As Microsoft.Office.Interop.Visio.Shape = .Drop(currentStencil.Masters(“Server”),0,0)

''这是代码......!

shapeSrver.Cells(“BeginX”)。GlueTo(shapeRack.CellsSRC(7,0,0))

shapeSrver.Cells(“EndX”)。GlueTo(shapeRack.CellsSRC(7,1,0))