更新、删除字段

更新字段

Aspose.Diagram for .NET 让你更新和删除场地从您自己的应用程序到 Microsoft Visio 图表,没有 Microsoft Office 自动化。

场地object 表示 a 中的文本字段文本跑。字段属性,由形状类支持 Aspose.Diagram.Field 对象的集合。

编程范例

下面这段代码更新字段的形状。

// 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());