OC: OC to provide access to LabTalk LT properties on OriginObject


Version: 2018

Type: Features

Category: Programming

Subcategory: Origin C

Jira: ORG-16946


2018 will have general OC access to all the LT properties, this will include GraphObject, Column, Worksheet, etc

cc()
{
    vector<double> vPos;
    vector<int> vColor;
    int n=0;
    GraphLayer gly = Project.ActiveLayer();
    if( gly.IsValid() )
    {
        vector<double> xx;
        foreach (GraphObject go in gly.GraphObjects)
        {
            if(go.GetName().Left(4)=="Line")
            {
                vColor.Add(go.GetProp("color"));//color is integeter, can directly return
                double xPos=0;
                go.GetProp("x1",&xPos);
                vPos.Add(xPos);
                n++;
            }
        }
    }
    return n;
}