Adding an arrow to a line-curve connector :s

K

Kristof Thys

Hello,


I'm relatively new to working with the Visio SDK, and although
everything is working out quite well, I can't manage to add arrows to my
line-curve connectors...
I've tried to get the EndArrow and EndArrowSize cells, and adjusting
their resultIU, but this didn't give any result.

[code sample c#]
directedLine =
Utility.GetMaster(this.drawingControl,AppDomain.CurrentDomain.BaseDirectory
+ "test_stencil.vss","Line-curve connector");
navigatorShape = targetPage.Drop(directedLine, 1.5, 1.5);
Navigator

Cell endArrow =
navigatorShape.get_CellsSRC((short)Microsoft.Office.Interop.Visio.VisSectionIndices.visSectionObject,
(short)Microsoft.Office.Interop.Visio.VisRowIndices.visRowLine,
(short)Microsoft.Office.Interop.Visio.VisCellIndices.visLineEndArrow);


Cell endArrowSize =
navigatorShape.get_CellsSRC((short)Microsoft.Office.Interop.Visio.VisSectionIndices.visSectionObject,
(short)Microsoft.Office.Interop.Visio.VisRowIndices.visRowLine,

(short)Microsoft.Office.Interop.Visio.VisCellIndices.visLineEndArrowSize);

endArrowSize.ResultIU = 5.0;
[/code]

Am I forgetting anything?

Thanks for any help!


Kristof
 
L

LarryF

Here's how I do it in C#:

using Visio = Microsoft.Office.Interop.Visio;

....

// I define a bunch of consts because I can't read code with zillions
of casts.
public const short VisNumber = (short)Visio.VisUnitCodes.visNumber;

....

Visio.Shape shape = targetPage.Drop(directedLine, 1.5, 1.5);

shape.get_Cells("EndArrow").set_Result(VisNumber, 5);

Maybe this isn't as fast as using shape.get_CellsSRC(), but I think
it's easier to read.

HTH,

Larry


Kristof said:
Hello,


I'm relatively new to working with the Visio SDK, and although
everything is working out quite well, I can't manage to add arrows to my
line-curve connectors...
I've tried to get the EndArrow and EndArrowSize cells, and adjusting
their resultIU, but this didn't give any result.

[code sample c#]
[/code]

Am I forgetting anything?

Thanks for any help!


Kristof
 

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

Similar Threads


Top