Şekil verilerini yenile
Contents
[
Hide
]
Şeklin metnini veya diğerini değiştirirken xform ,connection ve geom dahil olmak üzere şeklin konumunu yeniler
Tarafından sunulan RefreshData yöntemiŞekil sınıf, şeklin verilerini yenilemek için kullanılabilir
Aşağıdaki kod nasıl yapılacağını gösterir:
- Bir örnek dosya yükleyin.
- Belirli bir şekle erişin.
- Şeklin verilerini yenileyin.
Shape’in verilerini yenile
Aspose.Diagram for .NET kullanarak bir şekli yenilemek için .NET uygulamanızda aşağıdaki kodu kullanın.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_Shapes(); | |
// Load a Visio diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
// Get page by name | |
Page page = diagram.Pages.GetPage("Page-3"); | |
// Get Shape | |
Shape shape = page.Shapes.GetShape(15); | |
// Refresh data | |
shape.RefreshData(); | |
// Save visio diagram | |
diagram.Save(dataDir + "RefreshData_out.vsdx", SaveFileFormat.VSDX); |