CJP
CJP

Reputation: 15

Powershell script automation Visio: How to randomly more dynamic glue to another shape?

I am trying to automate Visio by using powershell script. I have a visio shape "Start" --"x shape" pointing to "BeginX" and targeting to "PosX" (therefore having a dynamic end).

I do not manage to randomly move the dynamic.

$begin = $connect.CellsU("BeginX").GlueToPos($shape,1);
$end = $connect.CellsU("EndX").GlueToPos($rect,0);

Is there a way to randomly auto move the existing connector to the end of shape?

Please and thanks...

Upvotes: 0

Views: 543

Answers (3)

Surrogate
Surrogate

Reputation: 1734

I prepared these simple vba macro and gif animation for display behavior of dynamic connectors enter image description here

Upvotes: 1

Surrogate
Surrogate

Reputation: 1734

Dynamic connector is feature based on Visio application core, which generated this connector behavior ! If open Behavior window for dynamic connector Behavior window

You can find there a lot of settings, such as Style, Reroute and Appearance. I did some experiments with dynamic connectors, connectors route unpredictable.

Upvotes: 0

Surrogate
Surrogate

Reputation: 1734

CJP!

Please read more about GlueToPos method in MS Visio Cell.GlueToPos Method (Visio)

You need use 3 arguments (Shape, x-coordinate, y-coordinate) in this method !

Upvotes: 0

Related Questions