VisioStencilConvert.Convert() fails with XML exception

Hello,

I'm having trouble getting VisioStencilConvert.Convert() to succeed in either DiagramBuilder_NET70 or my sample attached below.  The following is exception is thrown on the call to converter.Convert();:

System.Xml.XmlException
  HResult=0x80131940
  Message=Invalid character in the given encoding. Line 1, position 1.
  Source=System.Private.Xml
  StackTrace:
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
   at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)
   at System.Xml.XmlTextReaderImpl.ReadData()
   at System.Xml.XmlTextReaderImpl.SwitchEncoding(Encoding newEncoding)
   at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(Boolean isTextDecl)
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Syncfusion.Windows.Forms.Diagram.VisioStencilConvert.ProcessXmlDocument()
   at Syncfusion.Windows.Forms.Diagram.VisioStencilConvert.InternalConvert()
   at Syncfusion.Windows.Forms.Diagram.VisioStencilConvert.Convert()
   at Syncfusion.Windows.Forms.Diagram.VisioStencilConverter.Conv()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)


Thanks for your help,

Blaise


Attachment: VisioStencilConverter_7838591c.zip

6 Replies 1 reply marked as answer

KR Karkuvel Rajan Shanmugavel Syncfusion Team August 17, 2023 10:31 AM UTC

Hi Blaise,


We are able to reproduce the reported issue with the provided details. We will validate it and update you with more details on August 21, 2023.


Regards,

Karkuvel Rajan S



KR Karkuvel Rajan Shanmugavel Syncfusion Team August 22, 2023 12:47 PM UTC

Hi Blaise,


We are still validating the reported issue on our end. We will update you with more details on August 23,2022.


Regards, 

Karkuvel Rajan S



BT Blaise Taylor August 22, 2023 01:16 PM UTC

Ok - thanks Karkuvel.



KR Karkuvel Rajan Shanmugavel Syncfusion Team August 23, 2023 01:17 PM UTC

Hi Blaise,


Reported Issue: Exception occurs when we try to convert Visio stencil.


From our analysis, we have found that the saved file(.vssx) is from latest version of Visio. But we have only provided support for the lower versions only. So, we have considered this as a feature request and added it to our feature request list. But we don’t have any immediate plans to implement this feature. We review all open features at the planning stage for every release cycle. We will let you know when this feature is implemented. The status of implementation can be tracked through the following link.


Feedback Portal: Convert latest Visio Stencil(.VSSX) into Symbol Palette in WinForms | Feedback Portal (syncfusion.com)


We are closing this incident now. You can also communicate with us regarding the open features at any time using the “Contact” option.


Regards,

Karkuvel Rajan S



BT Blaise Taylor August 24, 2023 12:51 PM UTC

Hi Karkuvel,


Given the following scenario:

  • Stencil has been saved using an old (supported) version of Visio.
  • I'm running Visio 2019 on my machine


Does this scenario work or do I need to install an old version of Visio for the converter to work?


Thanks,

Blaise



KR Karkuvel Rajan Shanmugavel Syncfusion Team August 25, 2023 06:57 AM UTC

Hi Blaise,


You need to install a lower version of Visio (2013 version or below) to work on this conversion feature.


Regards,

Karkuvel Rajan S


Marked as answer
Loader.
Up arrow icon