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

Free Support Forum - aspose.com

Shape.getXForm().getWidth() return wrong value if width is set to use formula

It seems that when a shape is set to use formula for its width, the method Shape.getXForm().getWidth() returns wrong value. In our project we use the formula (TEXTWIDTH(TheText)) to set auto fit the text inside a shape but when we check the width, it always returns the master’s width instead of this shape’s width.

I have attached a sample project that generates a diagram with a single shape using this formula as text.
ShapeWidth.zip (71.6 KB)

When checking the shape’s width in visio, the real value is show 1.57 instead of 1.44 being returned by Shape.getXForm().getWidth()
actualWidth.PNG (24.1 KB)

I think this is similar to How to programmatically resize shape as per text?

@tbui

We have logged an investigation ticket as DIAGRAMJAVA-50955 in our issue tracking system to further analyze this case. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

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