Controlling Shapes in Multiple Instances of Visio

B

BabyHuey

How can I control shapes in a second instance of Visio in a different .vsd
drawing file? I've tried the GetObject("C:\.......") statement with the
directory path to the second Visio drawing without success.
Thanks in advance to anyone who can help.
BabyHuey
 
J

JuneTheSecond

I usually use documents.add method or open or openex method to add another
drawing.
and use drop method to add shapes.
 
B

BabyHuey

June,

Thanks, the 'Openex' method opened the second file and I was able to address
the objects in that file. However, the second file was still opened in the
first instance of visio rather than a second instance of Visio. My initial
idea was to work with two instances of Visio because I need to display the
two drawings on seperate displays (AMLCD's). To accomplish this with the
'Openex' method I need to drag the single Visio application across two
displays.

I can use this method for demo purposes, but in the final program, I think I
will need two instances of Visio to get a clean functional break when
assigning the drawings to seperate screens.

Can this actually be accomplished with Visio VBA, that is, opening two Visio
instances and using one VBA program to modify drawings in both applications?
 
A

Al Edlund

visio will only allow a single instance to be open under the covers. If the
two images on separate displays is absolutely critical you might need to
consider doing your application with the visio drawing controls.

al
 
N

Nikolay Belyh

visio will only allow a single instance to be open under the covers. If the
two images on separate displays is absolutely critical you might need to
consider doing your application with the visio drawing controls.

Al, please, can you explain what you mean under "single instance under
the covers"?

I mean, what would happen if I do:

Set app1 = CreateObject("Visio.Application")
Set app2 = CreateObject("Visio.Application")

- or -

Set app1 = CreateObject("Visio.InvisibleApp")
Set app2 = CreateObject("Visio.InvisibleApp")

then I see 2 normal VISIO.EXE processes in the task manager... Where
is the catch?
Kind regards, Nikolay.
 
S

Sonali Parthasarathy

So i'm trying to do something similar. I need to be able to open multiple instances each with diff stencils, create drawings in each and save them. This i'm able to do, but i'm stuck when i try to say copy a drawing from one instance to another. I'm not sure how the program(c#) senses the presence of other open instances. Any thoughts?



Nikolay Belyh wrote:

Re: Controlling Shapes in Multiple Instances of Visio
31-Aug-07

On Aug 30, 5:44 pm, Al Edlund <[email protected]>
wrote:

Al, please, can you explain what you mean under "single instance under
the covers"?

I mean, what would happen if I do:

Set app1 = CreateObject("Visio.Application")
Set app2 = CreateObject("Visio.Application")

- or -

Set app1 = CreateObject("Visio.InvisibleApp")
Set app2 = CreateObject("Visio.InvisibleApp")

then I see 2 normal VISIO.EXE processes in the task manager... Where
is the catch?
Kind regards, Nikolay.

Previous Posts In This Thread:

Controlling Shapes in Multiple Instances of Visio
How can I control shapes in a second instance of Visio in a different .vsd
drawing file? I've tried the GetObject("C:\.......") statement with the
directory path to the second Visio drawing without success.
Thanks in advance to anyone who can help.
BabyHuey

I usually use documents.
I usually use documents.add method or open or openex method to add another
drawing.
and use drop method to add shapes.
--
JuneTheSecond

June,Thanks, the 'Openex' method opened the second file and I was able to
June,

Thanks, the 'Openex' method opened the second file and I was able to address
the objects in that file. However, the second file was still opened in the
first instance of visio rather than a second instance of Visio. My initial
idea was to work with two instances of Visio because I need to display the
two drawings on seperate displays (AMLCD's). To accomplish this with the
'Openex' method I need to drag the single Visio application across two
displays.

I can use this method for demo purposes, but in the final program, I think I
will need two instances of Visio to get a clean functional break when
assigning the drawings to seperate screens.

Can this actually be accomplished with Visio VBA, that is, opening two Visio
instances and using one VBA program to modify drawings in both applications?
--
BabyHuey


:

visio will only allow a single instance to be open under the covers.
visio will only allow a single instance to be open under the covers. If the
two images on separate displays is absolutely critical you might need to
consider doing your application with the visio drawing controls.

al


:

Re: Controlling Shapes in Multiple Instances of Visio
On Aug 30, 5:44 pm, Al Edlund <[email protected]>
wrote:

Al, please, can you explain what you mean under "single instance under
the covers"?

I mean, what would happen if I do:

Set app1 = CreateObject("Visio.Application")
Set app2 = CreateObject("Visio.Application")

- or -

Set app1 = CreateObject("Visio.InvisibleApp")
Set app2 = CreateObject("Visio.InvisibleApp")

then I see 2 normal VISIO.EXE processes in the task manager... Where
is the catch?
Kind regards, Nikolay.

EggHeadCafe - Software Developer Portal of Choice
HTML Entities Class
http://www.eggheadcafe.com/tutorial...74-9130-3210625e675c/html-entities-class.aspx
 
A

AlEdlund

The point is that where the Visio instantiations are unaware of each other,
you can open multiple instances of documents simultaneously and save them
individually within a single application (stencils are just another form of
document). The significantly eases the issue of copying between them.
al



in message
 

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