Converting Stencil to SVG

I am attempting to convert a VSS file to SVG. I am doing this by reading the masters from the VSS file and then attempting to place each shape from each master into a new diagram. However, I cannot seem to be able to add a shape to a page. I receive the following:

java.lang.NumberFormatException: Infinite or NaN
at java.math.BigDecimal.(Unknown Source)
at java.math.BigDecimal.(Unknown Source)
at com.aspose.diagram.b.a.m.b(Unknown Source)
at com.aspose.diagram.b.a.q.a(Unknown Source)
at com.aspose.diagram.OperatorsKeeper.getMaxPriority(Unknown Source)
at com.aspose.diagram.hs.a(Unknown Source)
at com.aspose.diagram.hs.c(Unknown Source)
at com.aspose.diagram.hs.a(Unknown Source)
at com.aspose.diagram.ic.c(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.a(Unknown Source)
at com.aspose.diagram.Page.addShape(Unknown Source)
at com.aspose.diagram.Diagram.addShape(Unknown Source)

The code I am using is:
diagram.addShape(master.getShapes().get(0), master.getName(), 1);
I know master is good, I know there is a shape, I know there is a name, and I know there is a page 1, since I added it and confirmed it existed in my debugger. I receive the same error no matter which page, 0 or 1, I specific on that line.

Hi Keith,


Thank you for contacting support. Please provide us the complete code snippet and stencil file. We’ll look into the matter and guide you accordingly.

Thanks, I figured it out.

Hi Keith,

Thank you for updating us. It is nice to hear from you that the problem has been solved. Please feel free to reply us if you have any question regarding Aspose APIs, we will be happy to help you.