If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
End of my tether !
I'm pretty depressed. I've just spent three days trying to
refactor my Visio based project to totally eliminate VBA, and I'm no further forwards. I need to be able to call Addon functions from the ShapeSheet (as in VBA). My development environment is VS 2003 with C#. Good - so I use an out of process EXE - simple. After upgrading to Visio 2003 the VS options on insert now offer the opportunity to create a Visio Addon EXE. Fine, I've done this and it works OK. I can see the parameters being passed across. But none of these give the EXE Addon access to the objects deriving from the originating application (unless we can get hold of this handle/reference etc). So I can't even get the custom properties of the originating shape. So, my problem is I can't address the Visio application. I've searched the web under "Office" and tried to get hold of the application from "System.Runtime.InteropService.MArshal.GetActiveOb ject ("Visio.Application"); This doesn't throw any exceptions, but neither does it return a usable object, since, for the application class it returns, the ActiveDocument property ain't established. If anyone lives within shipping distance in the UK, I promise a crate of beer for help out of this hole. If you don't, my daughter lives in Georgia and she might be able to arrange! Thanks Brent Wherry |
#2
|
|||
|
|||
I should add that when I get into the Add On the args contain, (validly)
/doc=1,/page=3,/shape=Sheet.13,/shapeu=Sheet.13 (note no /visio=). "Brent Wherry" wrote: I'm pretty depressed. I've just spent three days trying to refactor my Visio based project to totally eliminate VBA, and I'm no further forwards. I need to be able to call Addon functions from the ShapeSheet (as in VBA). My development environment is VS 2003 with C#. Good - so I use an out of process EXE - simple. After upgrading to Visio 2003 the VS options on insert now offer the opportunity to create a Visio Addon EXE. Fine, I've done this and it works OK. I can see the parameters being passed across. But none of these give the EXE Addon access to the objects deriving from the originating application (unless we can get hold of this handle/reference etc). So I can't even get the custom properties of the originating shape. So, my problem is I can't address the Visio application. I've searched the web under "Office" and tried to get hold of the application from "System.Runtime.InteropService.MArshal.GetActiveOb ject ("Visio.Application"); This doesn't throw any exceptions, but neither does it return a usable object, since, for the application class it returns, the ActiveDocument property ain't established. If anyone lives within shipping distance in the UK, I promise a crate of beer for help out of this hole. If you don't, my daughter lives in Georgia and she might be able to arrange! Thanks Brent Wherry |
Thread Tools | |
Display Modes | |
|
|