Обновить, удалить поля
Обновить поле
Aspose.Diagram for .NET позволяет обновлять и удалятьполе на Microsoft Visio диаграммы из ваших собственных приложений, без автоматизации Microsoft Office.
Поле объект представляет собой текстовое поле втекст бегать. Свойство поля, представленноеФорма class поддерживает набор объектов Aspose.Diagram.Field.
Образец программирования
Следующий фрагмент кода обновляет поле в shape.
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(DetectFormatfromInputStream.class); | |
// Open the stream. Read only access to load a Visio diagram. | |
String stream = new String(dataDir + "Drawing1.vsdx"); | |
// detect file format using an input stream | |
FileFormatInfo info = FileFormatUtil.detectFileFormat(stream); | |
// get the detected file format | |
System.out.println("The spreadsheet format is: " + info.getFileFormatType()); |
Удалить поле
Следующий фрагмент кода удаляет поле в форме.
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(DetectFormatfromInputStream.class); | |
// Open the stream. Read only access to load a Visio diagram. | |
String stream = new String(dataDir + "Drawing1.vsdx"); | |
// detect file format using an input stream | |
FileFormatInfo info = FileFormatUtil.detectFileFormat(stream); | |
// get the detected file format | |
System.out.println("The spreadsheet format is: " + info.getFileFormatType()); |