Export VSD-template to svg-format results attribute construct error when opening the svg

Hi Philip,

I hope you are doing fine.

I have a problem when exporting a VSD-template file to a svg-file. We are using Aspose.Diagram for .NET (version 25.5.0) together C# on .NET Framework 4.8 (Windows x64 environment)

When opening the svg-file a attribute construct error is shown.
Hereby the following data:

Can you investigate this issue, please?

Kind Regards,

Thierry Knijff

@tkn1967

Summary
When a Visio (.vsd) template is saved as SVG using Aspose.Diagram for .NET v25.5.0, the produced SVG file contains malformed markup (extra “ScriptMarker” elements). Most SVG viewers report an attribute construct error and refuse to open the file.

Why it happens

  • The SVG export implementation in version 25.5.0 writes internal script‑related markers incorrectly, which results in invalid XML attributes.
  • This behavior is a defect in that specific release of Aspose.Diagram; it is not caused by missing code in your application or by incorrect use of SvgSaveOptions.

What to do next

  1. Check for a newer Aspose.Diagram release
  • Open the NuGet package manager and install the latest version of Aspose.Diagram (e.g., the most recent 25.x release).
  • Re‑run the export:
// NuGet: Install-Package Aspose.Diagram -Version <latest>
var diagram = new Aspose.Diagram.Diagram("BPMN.vsd");
diagram.Save("page_0.svg", Aspose.Diagram.SaveFileFormat.Svg);

Later releases contain numerous bug‑fixes; the SVG export issue is addressed in versions after 25.5.0 according to the product release notes.

  1. If you cannot upgrade, apply a manual clean‑up as a temporary workaround
  • Open the generated page_0.svg in a plain‑text editor.
  • Search for any <g> or <path> elements that contain the string ScriptMarker.
  • Delete those elements (or the entire <g> block) and save the file.
  • The cleaned SVG should load correctly in standard viewers.
  1. Create a minimal reproducible example for internal escalation
  • Build a tiny VSD file that contains a single shape with a script marker (or any element that triggers the problem).
  • Export it with the same code and keep both the original VSD and the resulting SVG.
  • Attach these files to an internal support ticket so the Aspose engineering team can reproduce and prioritize the fix.
  1. Collect environment details (optional but helpful for internal tracking)
  • Operating system and version.
  • .NET runtime version (e.g., .NET 6, .NET Framework 4.8).
  • Process architecture (x86 vs. x64).
  • Any custom shape data or embedded scripts present in the source VSD.
  1. Escalate internally if the problem persists after the above steps
  • Open an internal issue with the Aspose product team, providing the minimal reproducible files and the environment information gathered in step 4.
  • Request confirmation of a fix in an upcoming release or guidance on alternative export formats.

Following these actions should either resolve the SVG export problem (by upgrading) or give you a workable SVG file while the defect is being addressed.

:warning: I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.

@tkn1967
Thanks for the template file and screenshots.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.
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.

Issue ID(s): DIAGRAMNET-53842

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.