MarkerEvents

W

WPfeffer

I have a shape sheet cell that calls QueueMarkerEvent("<some text>"), after a
user right clicks selects an Action from the context menu.

I am using 'AddAdvise' so I am listening via the EventSink. Now, when the
user selects the action from the context menu, Visio fires the MarkerEvent
event and passes information into the EventSink, but I seem to be missing the
"<some text>" that I sent with the QueueMarkerEvent(). the 'moreInfo' object
is null, 'subject' and 'source' are both the Visio instance that sent the
event and the other 3 parameters that passed into IVisEventProc.VisEventProc
are all numeric.

So, where is the context information stored that I put in the
QueueMarkerEvent() method call???

Wayne
 
J

JuneTheSecond

I don't know how didi you llist, but when I tested with the sample in the
help, the results were somehow different.
I modified the example as followis.
Private Sub vsoApplication_ShapeAdded(ByVal Shape As Visio.IVShape)
vsoApplication.QueueMarkerEvent "I am starting..."
Debug.Print " ShapeAdded: " & Shape.Name
vsoApplication.QueueMarkerEvent "I am finished..."
End Sub

Public Sub UseMarker()
Set vsoApplication = ThisDocument.Application
End Sub

In the results all events are listed, but the order of the events is not
correct.

ShapeAdded: Sheet.5
Marker: I am starting...
Marker: I am finished...
 
W

WPfeffer

I found the way to do it (in C#):

string a =
((Microsoft.Office.Interop.Visio.Application)source).get_EventInfo(0)

'a' is then the text that was passed into QueueMarkerEvent("[some text]").

You can then parse 'a' like you would normally.

I'm actually calling QueueMarkerEvent() from inside a shape sheet cell in
the 'Action' section.
 

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