I’ve been trying to add various shapes to a diagram and have encountered a situation where shape text of a newly added shape is not visible on the diagram.
andrew.ridgeley:
Map1.vsdm contains a rectangular shape in the bottom left with the text Test Activity. This shape was added programmatically using Aspose and is correct.Map2.vsdm contains the same shape in the bottom left which was added using the same code. However, the shape text is not visible and the warning triangle is misshapen.
Hi Imran
Hi Andrew,
Hi Andrew,
<span class=“str” style=“color: rgb(0, 96, 128); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>’ remove Activity master
For Each master As Aspose.Diagram.Master In map2.Masters
If master.Name = “Activity” Then
act_master = master
End If
Next
map2.Masters.Remove(act_master)
‘<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> add Activity master from map1.vsdm <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
map2.AddMaster(“C:\Diagram\test2044\map1.vsdm”, “Activity”) <br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“color: rgb(0, 96, 128); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>’ place a new activity shape here and then save VSDM drawing<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
map2.Save(“C:\Diagram\test2044\map2_out.vsdm”, SaveFileFormat.VSDM)
The issues you have found earlier (filed as DIAGRAMNET-51234) have been fixed in Aspose.Diagram for .NET 17.5.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
@andrew.ridgeley,
In reference to the ticket ID DIAGRAMNET-51233, if you require to delete the warning triangle, please use this sample code after loading the drawing:
[C#]
Master master =map.Masters.GetMasterByName(ACTIVITY_MASTER_NAME);
master.Shapes[0].Shapes.GetShape(27).Text.Value.Clear();
master.Shapes[0].Shapes.GetShape(27).Geoms.Clear();
foreach (Page page in map.Pages)
{
Shape myActivity = new Shape();
Txt myActivityText = new Txt(ACTIVITY_TEXT);
page.AddShape(myActivity, ACTIVITY_MASTER_NAME);
}
Best Regards,
Imran Rafique