Prop.Del and Prop.NameU values are not saved correctly

To reproduce this problem, the following needs to be done.

  1. Open file
  2. Modify Prop.Del and Prop.NameU for a shape
  3. Save file as VSDM
The changes made are not kept when the file is re-opened.

This is very similar to defect ticket ID DIAGRAMNET-51237 and can be reproduced in the same way.

Regards,
Andrew


Hi Andrew,


Thank you for contacting support. We have run a test case for the input VSDM which is attached to the ticket ID DIAGRAMNET-51237. We can modify prop.Del and prop.NameU values, and then also retrieve from the output VSDM. Kindly share complete details of the use case, including Visio drawing and code. Your response is awaited.

Hi


As requested I’ve attached a sample Visio file and added some code fragments below to illustrate what we’re doing. Please let me know if you need further information.

Thanks,
Andrew

SetLicence()
Dim objDirInfo As DirectoryInfo = New DirectoryInfo(txtVisioFile.Text)
TestSRCCell(objDirInfo)
VerifySRCCell(objDirInfo)

Private Sub TestSRCCell(ByVal objDirInfo As DirectoryInfo)
For Each objFileIO As FileInfo In objDirInfo.GetFiles("" & fileExtension) 'loop through all files with the relevant extension
currentFilename = objFileIO.FullName
Dim map As New Aspose.Diagram.Diagram(objFileIO.FullName)

For Each page As Aspose.Diagram.Page In map.Pages
For Each shape As Aspose.Diagram.Shape In page.Shapes
'add prop
Dim prop As New Aspose.Diagram.Prop
prop.Del = Aspose.Diagram.BOOL.True
prop.ID = PROP_ID
prop.NameU = PROP_NAMEU_VALUE
prop.Name = PROP_NAME_VALUE
shape.Props.Add(prop)
Next
Next

map.Save(objFileIO.FullName, Aspose.Diagram.SaveFileFormat.VSDM)
Next
End Sub

Private Sub VerifySRCCell(ByVal objDirInfo As DirectoryInfo)
For Each objFileIO As FileInfo In objDirInfo.GetFiles("" & fileExtension) 'loop through all files with the relevant extension
currentFilename = objFileIO.FullName
Dim map As New Aspose.Diagram.Diagram(objFileIO.FullName)

For Each page As Aspose.Diagram.Page In map.Pages
For Each shape As Aspose.Diagram.Shape In page.Shapes
'check props
Dim prop As New Aspose.Diagram.Prop
prop = shape.Props.GetProp(PROP_NAME_VALUE)
If prop.Del <> Aspose.Diagram.BOOL.True Then
WriteToLog(“Test Fail (PROP del mismatch). Shape name=” & shape.Name & " Map name=" & objFileIO.FullName)
End If
If prop.ID <> PROP_ID Then
WriteToLog(“Test Fail (PROP ID mismatch). Shape name=” & shape.Name & " Map name=" & objFileIO.FullName)
End If
If prop.NameU <> PROP_NAMEU_VALUE Then
WriteToLog(“Test Fail (PROP NameU mismatch). Shape name=” & shape.Name & " Map name=" & objFileIO.FullName)
End If
Next
Next
Next
End Sub

Hi Andrew,

Thank you for sending source VSDM and code. We managed to replicate the problem of not being able to add shape data. It has been logged under ticket ID DIAGRAMNET-51242 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.

Hi Andrew,


Thank you for being patient. We have resolved the ticket ID DIAGRAMNET-51242. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.5 of Aspose.Diagram for .NET API. We will notify you in this thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMNET-51242) have been fixed in Aspose.Diagram for .NET 17.5.


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