We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Shape not updating as per Visio/Interop after text added


We’re currently evaluating Aspose.Diagram for .NET as an alternative to an existing solution that uses Visio via interop and, while we’ve largely been able to make things work as we require, we have run into one significant issue for us, which I’m hoping you could review.

In our use case, we’re working with a lot of text in shapes and we’ve previously been using a formula in the Height cell of the ShapeSheet to dynamically resize the shape to fit its contents (the resulting change is then used to determine when we need to overflow contents to further pages). However, when setting the text on a shape through Aspose, we aren’t seeing the same behaviour reflected that we’re used to with Visio - specifically, the formula is not applied following the change of text content.

As per the sample project (including embedded VSDX file) I’m uploading, the formula on the “Comments” shape at the bottom of the only page of the document is as follows:

Height = MAX(1.1 in,TEXTHEIGHT(TheText,TxtWidth))

Which should have the effect of setting the height of the shape to either 1.1 inches or the measured height of the text (constrained by the existing width), whichever is greater. When performing a text edit in the Visio application directly, or via Interop, the height is transformed accordingly, but when doing the same from Aspose, the height remains at 1.1 inches after the edit and, while the inserted text is reflected on the outputs (PDF & VSDX), the lack of change to the shape size is still evident so, in the case of the example, the border does not expand around the encapsulated text.

I’ve attempted a few different things to trigger a refresh, but to no avail thus far. Would appreciate your thoughts on whether this is a bug or there’s something else we need to be doing with your API to make it work.

It’s possibly related to the following issue, albeit that’s the Java API:

TextHeightTest.zip (30.4 KB)

Thanks in advance,


Thanks for contacting support and using our API.

We have logged an investigation ticket as DIAGRAMNET-51744 in our issue tracking system. We will surely look into details of the issue and keep you posted with the status of ticket resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.

Much appreciated, thank you.

The issues you have found earlier (filed as DIAGRAMNET-51744) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou