Glue property in visio

K

kala swetha

For a port, if we add connection points section and try to connect
cable, that port glues automatically with a red color. How to avoi
that gluing without modifying the connection points section.
Please help me out in this
 
L

LarryF

You can use dynamic glue without mentioning a specific connection
point. Here's some C# code that might help:

using Visio = Microsoft.Office.Interop.Visio;

/// <summary> I glue a 1-D connector shape to two other shapes.
</summary>
/// <param name="connector"> The connector shape </param>
/// <param name="target"> The shape the connector will connect from.
</param>
/// <param name="source"> The shape the connector will connect to.
</param>
public static void GlueConnector(Shape connector, Shape target, Shape
source) {
GlueConnector(connector, target);
connector.get_Cells("BeginX").GlueTo(source.get_Cells("PinX"));
}
public static void GlueConnector(Shape connector, Shape target) {
connector.SetCellNumber("GlueType",
(short)Visio.VisCellVals.visGlueTypeWalking);
connector.VisioShape.get_Cells("EndX").GlueTo(target.VisioShape.get_Cells("PinX"));
}
public void SetCellNumber(string cellName, double number) {
this.get_Cells(cellName).set_Result(VisNumber, number);
}
public const short VisNumber = (short)Visio.VisUnitCodes.visNumber;

HTH,

Larry
 

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