Firing Visio events?

Started by Nikolay, June 09, 2010, 09:05:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nikolay

Hello guys,
Please can somebody give me a good advice here?

Suppose we have a Visio add-in that renames shapes. When we run this add-in (e.g. by clicking some custom button), it renames some shape on the current page. Now suppose that we also have another "3-rd party" add-in (or a custom, user-defined, VBA code in a stencil or in the diagram) that listens to "shape renamed" (TextEdit) event. This event is not fired if shape text is changed programmatically; this means other add-ins (or user VBA code) will not get notification about shape text change. How do I fire (or, better, force Visio to fire) a "TextEdit" event so these 3-rd party add-ins or 3-rd party VBA code will be "aware" of this change?

Actually "TextChange" event is just an example here; I'm also interested in a "generic" case.
Thanks, Nikolay.

Paul Herber

Hi Nikolay,
I've had no trouble with this, I can do it right now, one addon listening to the shapeAdded event and one dropping a shape. Works.
These are both .vsl addins so may be different to your case.

P.S. shape renamed != Text edit

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Quote from: Paul Herber on June 09, 2010, 09:48:07 AM
Hi Nikolay,
I've had no trouble with this, I can do it right now, one addon listening to the shapeAdded event and one dropping a shape. Works.
These are both .vsl addins so may be different to your case.

P.S. shape renamed != Text edit

Hi Paul,

Thanks, yep, indeed it does work for "ShapeAdded" and "ShapeDeleted" events.
But still, any suggestions for the "share text edit"? ("ShapeExitedTextEdit" event, to be precise...)

P.S. Yes, I know that shape renamed != Text edit, I meant the "text edit" exactly