News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 184 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1040KB.
Tokens: post-login.
Cache hits: 13: 0.00151s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]