Visio 2007 TEXTWIDTH

A

Andy

I have a shape, with a user defined cell that contains a string. The
shape is set to display this in its text field and the width of the
shape is controlled using the TEXTWIDTH of the string. The first time
the string in the user defined cell is changed, the width of the shape
is not changed and the text displays vertically with the width
remaining unchanged. Subsequent changes to the string cause the
TEXTWIDTH to behave as expected.

This works fine with Visio 2003.

This happens if a new shape is placed on a diagram or if being updated
by automation.

Any suggestions as I am replacing shapes via automation that have the
text strings copied across. However, all the text widths are then
wrong.
 
K

Kari Yli-Kuha

Andy said:
I have a shape, with a user defined cell that contains a string. The
shape is set to display this in its text field and the width of the
shape is controlled using the TEXTWIDTH of the string. The first time
the string in the user defined cell is changed, the width of the shape
is not changed and the text displays vertically with the width
remaining unchanged. Subsequent changes to the string cause the
TEXTWIDTH to behave as expected.

This works fine with Visio 2003.

This happens if a new shape is placed on a diagram or if being updated
by automation.

Any suggestions as I am replacing shapes via automation that have the
text strings copied across. However, all the text widths are then
wrong.

I had a similar problem trying to fit text. In Visio 2003 Cell.Trigger() did the trick
but in Visio 2007 I had to run DoEvents() as well.

regards,
 
A

Andy

I had a similar problem trying to fit text. In Visio 2003 Cell.Trigger() did the trick
but in Visio 2007 I had to run DoEvents() as well.

regards,

The conclusion from others seems to be TEXTWIDTH and TEXTHEIGHT only
work with 'TheText' and not other cells, certainly seems to be true of
2007.

Thanks all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top