usmanazizgroupdocs
5/9/2017 - 3:14 PM

RemoveShapeVisio.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As DiagramDocument = Document.Load(Of DiagramDocument)(Utilities.MapSourceFilePath(FilePath))
    ' Remove shape by index
    doc.Pages(0).Shapes.RemoveAt(0)

    ' Remove shape by reference
    doc.Pages(0).Shapes.Remove(doc.Pages(0).Shapes(0))

    doc.Save()
End Using