We are testing aspose.diagram for python via Java to convert VSD to VSDX files. It works correctly in most of the cases, but we are having issues with Visio objects (normally VSD) embedded inside the main VSD file. In the converted VSDX file the embedded object appears as a white rectangle with a cross (main diagonals). I added a sample of the original .vsd file and the converted .vsdx
main.zip (30.6 KB)
Is it possible to have the embedded VSD objects converted to VSDX also, or if not possible, at least copy the object as it is? Thanks!
@german.rincon
It seems that you are encountering issues with Visio objects embedded within a VSD file when converting it to VSDX format using Aspose.Diagram. The problem you’re facing, where the embedded objects appear as white rectangles with crosses, indicates that the conversion process may not fully support those embedded elements.
Currently, Aspose.Diagram does not guarantee that all embedded Visio objects will be converted correctly to VSDX format. If the embedded objects are not being converted properly, there are a few approaches you can consider:
-
Check for Updates: Ensure that you are using the latest version of Aspose.Diagram, as updates may include improvements and bug fixes related to file conversions.
-
Manual Handling: If the automatic conversion does not work as expected, you might need to manually handle the embedded objects. This could involve extracting the embedded VSD objects and saving them separately or converting them using a different method before re-embedding them in the VSDX file.
-
Contact Support: If the issue persists, consider reaching out to Aspose support for assistance. They may provide insights or workarounds specific to your scenario.
For more detailed information and resources, you can refer to the official Aspose.Diagram documentation and support forums, which can provide additional guidance on handling specific conversion issues.
If you have further questions or need assistance with specific code examples, feel free to ask!
Sources:
[1]: Aspose.Diagram for Python via Java Home - Aspose Documentation
The issue is we have too many files with same situation to use some manual handling. We are evaluating the tool in order to do the process via automation.
For these cases, is it possible to just copy the Visio object from the original .vsd to the new .vsdx without any modification? Thanks.
@german.rincon
Thanks for the template file and output file.
I have tested your scenario/case using our latest version : Aspose.Diagram for Python via java v25.5 and Aspose.Diagram for java v25.5 and v25.6 . It works fine and as expected.
As you can see it works fine with latest version and we could not find any issue, so kindly use latest version.
Please refer to the following output file,Thanks.
output.zip (22.3 KB)
Hi Philip, thanks for the answer. I am checking and I am using 25.5:
(venv) (base) bash-4.4$ pip list
Package Version
-------------- -------
aspose-diagram 25.5.0
I tried again with the code I have and got the same result, so it could be my code is not correct. This is the code I am using:
import jpype
import asposediagram
jpype.startJVM()
from asposediagram.api import *
file = "main.vsd"
# Load the VSD file
diagram = Diagram(file)
# Save the diagram as VSDX
diagram.save(file+"x", SaveFileFormat.VSDX)
One thing I noticed is the resulting .VSDX file you provided has a file “OleObject1.vsd” inside the folder “visio/embeddings”, which is the original embedded object, while the file I generated is missing that file.
Thanks!
@german.rincon
Thanks for giving the sample code and it’s correct.
It is strange as it works fine on my end with aspose-diagram 25.5.0 .
Could you please share your working environment e.g. operating system, Java version, Python version that you are using?
We will evaluate your issue further.
Thanks.