Visio 2003 Add-On (.Net)

  • Thread starter Claiton Lovato Junior
  • Start date
C

Claiton Lovato Junior

Hi everyone,

I am trying to develop a .Net Add-On for visio that simple changes a
text of the shape I clicked and save this text in a .txt file.
For that I put an action on the shape's menu (from the shapesheet using
the runaddonwargs) to call my add-on, so far so good, the menu is there,
calls my add-on with the args I passed, but the problem is that I can't get
the visio application instance, i only recive the /doc=1 /page=1
/shape=sheet.8 and my args for eg. and using only this whow can i access the
shape?
I don't wanna use the insert field to a "user-defined cell" because i
really need the user to click at me shape's menu and type the text he wants
in a textbox from my add-on.

By the way, I am using Visio 2003 with SDK, VS.Net2003 with C#, but any
language would help as well.

Is there any change this to work?? Any idea? Anything would help anyway
....

Thanks a lot,
Claiton
 
A

Al Edlund

The action of right clicking the object also selects it on the page, you
should be able to read the selected object collection for the page, verify
that only one is selected and then you should be ok.
al
 
C

Claiton Lovato Junior

Hi Al Edlund,
Yes, when i call the add-on by the shape's menu visio pass a parameter
"/shape=..." with a shape's name,but the problem i have is to get the visio
instance object to access this shape, might be an object that i could call
something like

objApplication.documents(0).shapes(strShapeNameArq)...

but in my add-on i don't have any application instance, only creating a new
one, but i need to access the current visio instance the user is using.

Thanks,
Claiton
 
A

Al Edlund

when you start the activex contol it begins a visio instance. the
application instance is gotten by doing something like

visApp = my_activex_control.window.application

there is only one application instance in the addon for multiple controls.

al
 

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