Control after .SRC property set

Control after .SRC property set

Post by Gary Shel » Mon, 15 Aug 2005 14:49:15


I use the following code to open a Cross-functional Flowchart stencil. This
immediately pops up a dialog box asking the user to indicate orientation and
number of swimlanes. My VB.NET app does not receive control back until AFTER
the user has clicked the OK box on the dialog box. I wanted to automate
that, but can't figure out how to get control back in my app right after
executing the Me.AxDrawingControl1.SRC property set.

Can any one suggest a way to accomplish this?

Gary

AppVisio = Me.AxDrawingControl1.Document.Application

'tell Visio to click OK to the dialog box

AppVisio.AlertResponse = 1

Me.AxDrawingControl1.Src = "Cross-functional Flowchart.vst"
 
 
 

Control after .SRC property set

Post by Gary Shel » Mon, 15 Aug 2005 15:11:58

Actually, I have to execute an "Application.DoEvents" before the stencil
actually opens and the dialog box appears, but as soon as I execute the
DoEvents my VB.NET app does NOT get control back until the user clicks the
OK button in the dialog box.

Gary

 
 
 

Control after .SRC property set

Post by SnVuZVRoZV » Tue, 16 Aug 2005 20:33:07

I have tested "AppVisio.AlertResponse = 1" in VBA, directly on the Visio2003
drawing scope, but I could not found any effect to the behaviour of the
dialog for Cross-functional Flowchart. I think it is because the dialog is
not a Visio's native alarming dialog, but of an addon for Cross-functional
Flowchart. It seems the dialog is controlled by the addon that is not opened
to the users, so I do not think a user can change its behaviour.
 
 
 

Control after .SRC property set

Post by Gary Shel » Wed, 17 Aug 2005 00:35:43

Your assessment is spot on. I'd determined the exact same thing. But, I
wonder if there is any event within VISIO that my VB.net app can subscribe
to that MIGHT give me control once the add-on has begun it's execution???

I am pursuing that angle and will report back.

Gary