GConnector

You can use ‘’GObject’’.’’’Connect’’’ to create a leader line connecting between source and target object. The leader line object has no name. It can be accessed by GConnector.

GConnector object can be used to read/control the properties of annotation leader line. For example, we can change the leader line type by GConnector.type property. For more details, you can see examples below.

Properties:

GConnector properties can be accessed using the following syntax:

GConnector.property =
Property Access Description
GConnector.line Read/write,
branch
The tether/leader line object display
GConnector.type Read/write,
numeric
The leader line connect type. Requires a window refresh when writing. Available types:
1 = Straight,
2 = Polyline-Horz
3 = Polyline-Vert
5 = Step-Horz
6 = Step-Vert
7 = Straight-Horz
8 = Straight-Vert
GConnector.threshold Read/write,
numeric
The offset threshold exceeding which the leader line will show, in percent of (Layer Height + Layer Width)/2.
GConnector.percent Read/write,
numeric
The position at which the polygon leader line turns. Available when ‘’’type’’’ = 2, 3, 5, 6. Refer to this page to see how the percentage is defined.
GConnector.gap1 Read/write,
numeric
The gap between the tether and the target object, in percentage of layer bound
GConnector.gap1 Read/write,
numeric
The gap between the tether and the source object, in percentage of layer bound

Example:

doc -s;
doc -n;
string path$ = system.path.program$+"Samples\Curve Fitting\"; 
fname$ = path$ + "Linear Fit.dat";
// import the files 
impASC;
plotxy iy:=(1,2) plot:=202; //plot a graph
label "this is a Line+Symbol plot"; //add a text to the graph
GObject aa = [Graph1]1!text; //name the object to "aa"
range rr = 1!1;
GConnector cc = aa.Connect(rr, 1, 1, 3); //connect aa to the plot
cc.type=5; //change tether to Step-Horz and turn at 70% horizontal length
cc.percent=70; 
cc.line.color=2; // set tether color to red