Hi,
It seems that there is no such LabTalk command yet. However, you can use Origin C to implement it. Please refer to Add Curved Arrow Tool example. Here is the steps how I implement it.
1. Open the Code Builder by menu View: Code Builder.
2. Create a new C File in Code Builder by File: New, and name it MyCurvedLine for example.
3. Copy and paste the following Origin C code after the line "// Start your functions here." of the newly created C file.
#include <..\Originlab\grobj_utils.h>
void graph_object_curved_line(double x1=2.2, double x2=4.7, double x3=6.58, double x4=7.16, double y1=5.7, double y2=4.22, double y3=5.12, double y4=7.35)
{
GraphLayer gl = Project.ActiveLayer();
if(!gl)
{
out_str("please activate a graph layer");
return;
}
GraphObject go;
go = gl.CreateGraphObject(GROBJ_TN_LINE4);
go.Attach = ATTACH_TO_SCALE;
Tree tr;
//tr = go.GetFormat(FPB_DATA, FOB_ALL, true, true);
//// to take a look on default position
//vector vx0, vy0;
//vx0 = tr.Root.Data.X.dVals;
//vy0 = tr.Root.Data.Y.dVals;
// to set the proper position for four points
//vector vx = {2.2, 4.7, 6.58, 7.16};
//vector vy = {5.7, 4.22, 5.12, 7.35};
vector vx(4);
vx[0] = x1;
vx[1] = x2;
vx[2] = x3;
vx[3] = x4;
vector vy(4);
vy[0] = y1;
vy[1] = y2;
vy[2] = y3;
vy[3] = y4;
tr.Root.Data.X.dVals = vx;
tr.Root.Data.Y.dVals = vy;
tr.Root.Arrow.End.Style.nVal = 1; // add arrow to the end
int nErr = go.UpdateThemeIDs(tr.Root);
if(nErr == 0)
{
go.ApplyFormat(tr, true, true);
}
else
{
out_int("err = ", nErr);
}
}
4. Save this file, and then drag this file from the left panel (Workspace panel), drag this file from the User folder to the System folder.
5. Close Code Builder and restart Origin.
Now, you can use the function "graph_object_curved_line(double x1=2.2, double x2=4.7, double x3=6.58, double x4=7.16, double y1=5.7, double y2=4.22, double y3=5.12, double y4=7.35)" as a command to draw a curved line by passing four points. For example,
graph_object_curved_line(4, 2, 5, 4, 2, 4, 8, 8);
Penn