Aspose.Diagram.Shape.Text.Value.Text vs Visio.Shape.Text

Hello,

Is Aspose.Diagram.Shape.Text.Value.Text meant to be equivalent to Visio.Shape.Text ?

  • Aspose returns a superfluous trailing Carriage Return and Line Feed
  • Visio expresses line breaks as Line Feed while Aspose is Carriage Return and Line Feed
  • Aspose always returns a group’s text, while Visio will return the first sub shape’s text where Protection LockTextEdit = 0 when group’s Group Properties IsTextEditTarget=False

Hi Andrew,

Thank you for contacting support. Please note, Aspose.Diagram.Shape.Text.Value.Text property does not only include the raw text. It has multiple character rows (also known as: Char) to format the text. It is equivalent to the text element as you can see a tag inside the page XML. For the details, please refer to this helping link: [Working with the text of a Shape]. Kindly let us know how you are finding this difference and elaborate with complete steps to replicate it.

Is there are property to return an unformatted string for a shapes text similar to the Visio API?

Hi Andrew,

Thank you for the inquiry. You can remove formatting tags using a regular expression as we are doing so in this help topic (GetShapeText Method): Extract Plain Text from the Visio Diagram Page