Toolbar clarification

J

Jonathan Spane

First of all thanks for the responses to my previous posts.

Just to recap the add-on I am writing is in C++ and now I wokring with
toolbars. I have toolbar being made with buttons in it. Now I am trying to
attach the run commad stuff. Unfortuanately , the help is using Visual Basic
a sample and I am just not porting it right. How should I do it in C++? I
have putAddonName and putAddonArgs methods, but I can't seem to get the
correct format in the putAddOnName for it to work. The button stays
disabled. If I take it out the button becomes enabled but it doesn't do
anything useful.

Thanks
JP
 
C

Chris Roth [MVP]

Hi JP,

Are you able to make a successful call to your add-on via any other methods?

Ie: RUNADDON function in the ShapeSheet, or perhaps from the VBA command
line? Ie:

in ShapeSheet:

EventDblClick = RUNADDON("JPAddOn")

or in VBA command line:

visio.Application.Addons("JPAddOn").Run("args")

That would help to determine if your add-on's function is working in the
first place.

If the functions are accessible from Visio, then I'm not sure what is wrong.
Enclosing quotes? Proper C++ string type (I don't know anything about this,
but I used to overhear people complaining about "bstr" and other
obscurities. But I think the SDK has wrappers for all this these days, no?)

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 
J

Jonathan Spane

It is working now. Using the name for the addon name which what I was doing
and then just passing the argument without any /arg# = modifier.
 

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