@wxpid1
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
你好,使用aspose-diagram 26.7版本从svg转换到vsdx没问题,但是从vsdx转换到svg有不行了,之前的26.6版本是可以的。
Hello, there is no problem converting from SVG to VSX using the aspose-diagram 26.7 version, but the conversion from VSX to SVG doesn’t work. However, the 26.6 version was able to do it.
下面是我的代码:
Here is my code: @Test
public void testVsdxSvg() throws Exception {
String sourcePath = “D:\test\aspose\diagram\医学谱图.vsdx”;
String targetPath = “D:\test\aspose\diagram\医学谱图-vsdx.svg”;
Diagram diagram = null;
try {
// 创建Diagram类的实例
diagram = new Diagram(sourcePath);
// create an instance SVG save options class
SVGSaveOptions options = new SVGSaveOptions();
ShapeCollection shapes = options.getShapes();
// get shapes by page index and shape ID, and then add in the shape collection object
for (Object pageObj : diagram.getPages()) {
com.aspose.diagram.Page page = (com.aspose.diagram.Page) pageObj;
ShapeCollection pageShapes = page.getShapes();
for (Object shapeObj : pageShapes) {
Shape shape = (Shape) shapeObj;
shapes.add(shape);
}
}
// save Visio drawing
diagram.save(targetPath, options);
} finally {
if (diagram != null) {
diagram.dispose();
}
}
}