QueueMarkerEvent

B

Bernie

Hi

I developed a COM Addin for Visio 2003 and 2007.

In a COM Addin it is not possible to call a subroutine with RunAddon("Sub")
from a cell in a shapesheet.
Instead you have to use RunAddonWArgs ("QueueMarkerEvent" , "Sub")

The same is for menus, where you have to write
menuObj.AddOnName = "QueueMarkerEvent"
menuObj.AddOnArgs = "Sub"

Now, when a sub1 is started from the menu and inside the sub1 routine shapes
are created firing the cell
EventXFMod = RunAddonWArgs "QueueMarkerEvent" , "Sub2")
the subroutine Sub2 in not evaluated immediatly after the creation.

The QUEUEMARKEREVENT is blocked by the first call to sub1 and the events of
sub2 are queued and executed just after the first sub1 has finished.
Moving the shapes programatically, always firing the (nonexecuted)
EventXFMOD, can lead to unexspected results.

Has anybody a solution for this problem.

Bernie
 
D

David Parker

Firstly, it is good practice to follow the convention outlines in the SDK,
and to provide a signature for your addin when using QUEUEMARKEREVENT. Eg
RunAddonWArgs "QueueMarkerEvent" , "/solution=MyAddin /cmd=Sub2")

Secondly, you may want to call the cell.Trigger function in code to fire the
formula.
 
B

Bernie

David Parker said:
Firstly, it is good practice to follow the convention outlines in the SDK,
and to provide a signature for your addin when using QUEUEMARKEREVENT. Eg
RunAddonWArgs "QueueMarkerEvent" , "/solution=MyAddin /cmd=Sub2")

Secondly, you may want to call the cell.Trigger function in code to fire the
formula.
 
B

Bernie

Hi David

The trigger function is called automatically by the cell EventXFMod with the
formula
RunAddonWArgs "QueueMarkerEvent" , "Sub2")

Unfortunately we have to call the QueueMarkerEvent in the formula due to the
COM Addin and that leads to the problem I posted

Bernie
 

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