Diagram stencil = new Diagram(stencilFile, LoadFileFormat.VSX);
foreach (Master master in stencil.Masters)
{
diagram.AddMaster(stencilFile, master.Name);
}
Add Shape
long shapeID = page.AddShape(compositeShape.Bounds.X, compositeShape.Bounds.Y, compositeShape.Bounds.Width, compositeShape.Bounds.Height, info.ShapeName);
compositeShape is a Nevron NCompositeShape which our UI uses. I am coding a Visio Export.
Problem
Text in the “Legend” Master Shape is not visible or formatted correctly. Biggest problem is the Character Scale is getting set to 0% and the font is not being set correctly.
I enclosed the Stencil in question along with Screenshots of the File I create along with the Legend shape as it looks in Visio when you open the Stencil File.
Other Information
The Stencil shape I am using uses the “HP Simplified” font which I don’t currently have installed on my machine but Visio doesn’t have a problem with this.
Thank you for contacting support. We have tested your sample code against the latest build of Aspose.Diagram for .NET 5.0.0 and managed to replicate the problem of incorrect font. We have logged this issue under ticket id DIAGRAMNET-50379 in our issue tracking system. Your post has been linked to this issue. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.
Furthermore, we’re able to read Legend shape text. It is not so as we can notice in your word document. Please provide us real parameter values which you are passing to AddShape method and also please confirm that in which format you are saving Visio diagram. It’ll help us to be more specific.
We’ve attached resultant a Visio diagram to this reply. The sample code is as follows:
[.NET, C#]
// initialize diagram object
Diagram diagram = new Diagram();
// Add Stencil masters from temp stencil file
Diagram stencil = new Diagram(@“C:\temp\IPAAStencil.vsx”, LoadFileFormat.VSX);
foreach (Master master in stencil.Masters)
{
diagram.AddMaster(@“C:\AD\test351\IPAAStencil.vsx”, master.Name);
}
long shapeID = diagram.Pages[0].AddShape(2.5, 4.0536, 5, 5, “Legend”);
Thank you for the sample code. We could now replicate the same output VDX by using your sample code. We have logged this resultant VDX file against the ticket id DIAGRAMNET-50379. The confusion was due to the first screenshot of the word document, because the shape text was not clear. We’ll let you know once we have any update. We appreciate your cooperation.
Thank you for the clarification. We have logged it in our issue tracking system under ticket id DIAGRAMNET-50382. We’ll let you know once a significant progress has been made in this regard. We’re sorry for the inconvenience caused.
Thank you for asking about the resolution. We're sorry to share with you that the linked issue ids are pending for the analysis and not resolved yet. We have asked the responsible developer to take a look at your issues shortly. We'll let you know once an update is available from him.
Thank you for being patient. We have a good news for you that the issue id DIAGRAMNET-50382 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for .NET 5.8.0. We’ll inform you via this forum thread as soon as the new release is published.
Thank you for being patient. We have a good news for you that the issue id DIAGRAMNET-50379 has now been resolved. If there is no issue in the QA (quality assurance) phase, then this fix will be included in the next version of Aspose.Diagram for .NET 5.8.0. We’ll inform you via this forum thread as soon as the new release is published.