Editing the properties of connectors programatically

D

Dewi Bygrave

I would like to be able to add a directional arrow to a connection between
two shapes programatically.

Equivalent behaviour in the GUI is to right click on a connecting line and
select Format->Line and then editing the Line Ends properties.

I can get the Connects object from a shape but from that I can only get the
FromSheet or the ToSheet how do I get hold of the sheet for the connecting
line so that I can change the lines properties?
 
P

Paul Herber

I would like to be able to add a directional arrow to a connection between
two shapes programatically.

Equivalent behaviour in the GUI is to right click on a connecting line and
select Format->Line and then editing the Line Ends properties.

I can get the Connects object from a shape but from that I can only get the
FromSheet or the ToSheet how do I get hold of the sheet for the connecting
line so that I can change the lines properties?

lineObject.cellsSRC[visSectionObject, visRowLine,
visLineEndArrow].FormulaU := '1';

(or similar for whatever language you are using)
 
D

Dewi Bygrave

I am using C++,

I think I may have missed something here but I don't really follow your
response, I know what cell value I need to change on the lines shape sheet I
just don't know how given a shape on the page to get hold of the line
connected to it.

I have had a rethink though and am wondering if in a connection object the
ToSheet and FromSheet members represent the shape and the line connected to
it respectively.

i.e The line is a shape on the page and the connection is not representing
the line as I thought but actually a connection point on the shape.

Paul Herber said:
I would like to be able to add a directional arrow to a connection between
two shapes programatically.

Equivalent behaviour in the GUI is to right click on a connecting line and
select Format->Line and then editing the Line Ends properties.

I can get the Connects object from a shape but from that I can only get the
FromSheet or the ToSheet how do I get hold of the sheet for the connecting
line so that I can change the lines properties?

lineObject.cellsSRC[visSectionObject, visRowLine,
visLineEndArrow].FormulaU := '1';

(or similar for whatever language you are using)
 
J

John Goldsmith

Hello Dewi,

You're right, ToSheet and FromSheet properties do return shape objects.
Have a look at this link, which discusses the Connect object:

http://msdn2.microsoft.com/en-us/library/aa201774(office.10).aspx

Best regards

John

John Goldsmith
www.visualSignals.co.uk

Dewi Bygrave said:
I am using C++,

I think I may have missed something here but I don't really follow your
response, I know what cell value I need to change on the lines shape sheet
I
just don't know how given a shape on the page to get hold of the line
connected to it.

I have had a rethink though and am wondering if in a connection object the
ToSheet and FromSheet members represent the shape and the line connected
to
it respectively.

i.e The line is a shape on the page and the connection is not representing
the line as I thought but actually a connection point on the shape.

Paul Herber said:
I would like to be able to add a directional arrow to a connection
between
two shapes programatically.

Equivalent behaviour in the GUI is to right click on a connecting line
and
select Format->Line and then editing the Line Ends properties.

I can get the Connects object from a shape but from that I can only get
the
FromSheet or the ToSheet how do I get hold of the sheet for the
connecting
line so that I can change the lines properties?

lineObject.cellsSRC[visSectionObject, visRowLine,
visLineEndArrow].FormulaU := '1';

(or similar for whatever language you are using)
 
P

Paul Herber

Sorry, Dewi, I took more notice of your first two paragraphs than the
third!


I am using C++,

I think I may have missed something here but I don't really follow your
response, I know what cell value I need to change on the lines shape sheet I
just don't know how given a shape on the page to get hold of the line
connected to it.

I have had a rethink though and am wondering if in a connection object the
ToSheet and FromSheet members represent the shape and the line connected to
it respectively.

i.e The line is a shape on the page and the connection is not representing
the line as I thought but actually a connection point on the shape.

Paul Herber said:
I would like to be able to add a directional arrow to a connection between
two shapes programatically.

Equivalent behaviour in the GUI is to right click on a connecting line and
select Format->Line and then editing the Line Ends properties.

I can get the Connects object from a shape but from that I can only get the
FromSheet or the ToSheet how do I get hold of the sheet for the connecting
line so that I can change the lines properties?

lineObject.cellsSRC[visSectionObject, visRowLine,
visLineEndArrow].FormulaU := '1';

(or similar for whatever language you are using)
 

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