Misformatted Text on Master from Imported Stencil

Running latest version 5 with a Temp License


Import vsx

Diagram diagram = new Diagram();

// Add Stencil masters from temp stencil file
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.

Hi Mike,


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”);

diagram.Save(@“C:\temp\Output.vdx”, SaveFileFormat.VDX);

We're looking forward to assist you.

Your repro is the same as mine:


const string stencilFile = “IPAAStencil.vsx”;

License asposeLicense = new License();
asposeLicense.SetLicense(“Aspose.License.xml”);

Diagram diagram = new Diagram();

Diagram stencil = new Diagram(stencilFile, LoadFileFormat.VSX);

foreach(Master master in stencil.Masters)
{
diagram.AddMaster(stencilFile, master.Name);
}

diagram.AddShape(4.0, 4.0, “Legend”, 0);
diagram.Save(“LegendRepo.vdx”, SaveFileFormat.VDX);

I have attached the resulting Visio File that I created with the above code.

I am not clear what you mean by this: Furthermore, we’re able to read Legend shape text. It is not so as we can notice in your word document

Do you need any more information from me?

Any guidance on what I need to do to fix up the Text?

Hi Mike,


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.

Some more information:


Viewing the file w/ Visio 2010 the Text shows up correctly.

Viewing the file w/ Visio 2013 the Text does not show up correctly.

Also if I open the file w/ Visio 2010 and save it with the same format then open it up w/ Visio 2013 then the Text shows up correctly.

Hi Mike,


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.

Any status on this?

Hi Mike,

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.

Hi Mike,


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.

Hi Mike,


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.

The issues you have found earlier (filed as DIAGRAMNET-50379;DIAGRAMNET-50382) have been fixed in Aspose.Diagram for .NET 5.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.