Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Wed, 6 Aug 2008 03:38:15 -0700,    group: microsoft.public.visio.developer        back       


ConnectShapes Method   
Hello Everyone,

Our application creates an organisation chart with Visio and then connects 
the parent & child shapes together using the following commands:

ActiveWindow.DeselectAll
ActiveWindow.Select <parent shape>, 2
ActiveWindow.Select <child shape>, 2
ActiveWindow.Selection.ConnectShapes

Visio 2003 with no updates or service packs installed with security set to 
medium works as expected wether the user elects to enable or disable macros.  
 This appears to be the same for service pack 2.   

However after installing service pack 3 (or an update that's been rolled 
into service pack 3), this functionality does not work when macros are 
enabled.   The child shape is moved by Visio when the 
ActiveWindow.Selection.ConnectShapes command is issued.   Electing to disable 
the macros allows the functionality to work as expected, but our custom 
toolbars do not appear.

Visio 2007 with no updates or service packs works correctly when enabling or 
disabling the macros, as does Visio 2007 with Service Pack 1.

Would anyone happen to know why Visio 2003 with Service Pack 3 would display 
different behaviour with the ConnectShapes method when service pack 3 is 
installed?

Cheers,

Dunedin397
date: Wed, 6 Aug 2008 03:38:15 -0700   author:   Dunedin397

RE: ConnectShapes Method   
Dunedin397,

Please, select more than two children, 
and please, use visSubSelect to select a child shape.

My next test code worked well.

    ActiveWindow.DeselectAll
    ActiveWindow.Select ParentShape, visSelect
    ActiveWindow.Select ParentShape.Shapes(1), visSubSelect
    ActiveWindow.Select ParentShape.Shapes(2), visSubSelect
    ActiveWindow.Select ParentShape.Shapes(3), visSubSelect
    ActiveWindow.Selection.ConnectShapes


-- 
JuneTheSecond  

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html


"Dunedin397" wrote:

> Hello Everyone,
> 
> Our application creates an organisation chart with Visio and then connects 
> the parent & child shapes together using the following commands:
> 
> ActiveWindow.DeselectAll
> ActiveWindow.Select <parent shape>, 2
> ActiveWindow.Select <child shape>, 2
> ActiveWindow.Selection.ConnectShapes
> 
> Visio 2003 with no updates or service packs installed with security set to 
> medium works as expected wether the user elects to enable or disable macros.  
>  This appears to be the same for service pack 2.   
> 
> However after installing service pack 3 (or an update that's been rolled 
> into service pack 3), this functionality does not work when macros are 
> enabled.   The child shape is moved by Visio when the 
> ActiveWindow.Selection.ConnectShapes command is issued.   Electing to disable 
> the macros allows the functionality to work as expected, but our custom 
> toolbars do not appear.
> 
> Visio 2007 with no updates or service packs works correctly when enabling or 
> disabling the macros, as does Visio 2007 with Service Pack 1.
> 
> Would anyone happen to know why Visio 2003 with Service Pack 3 would display 
> different behaviour with the ConnectShapes method when service pack 3 is 
> installed?
> 
> Cheers,
> 
> Dunedin397
>
date: Wed, 6 Aug 2008 14:10:01 -0700   author:   JuneTheSecond

RE: ConnectShapes Method   
This way connects child shapes, but 
the connectors are outside the group.
Next test code connects inside the 
group.

    ParentShape.OpenDrawWindow.Activate
    ActiveWindow.SelectAll
    ActiveWindow.Selection.ConnectShapes

-- 
Best Regrads
JuneTheSecond  

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
date: Wed, 6 Aug 2008 21:11:01 -0700   author:   JuneTheSecond

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us