Project::RemoveDataRange

Description

Remove one datarange from project with specified name or the object

Syntax

BOOL RemoveDataRange( LPCSTR lpcszName )

BOOL RemoveDataRange( DataRange & dr )

Parameters

lpcszName
[input]DataRange name

dr
[input]a DataRange object

Return

TRUE if success

Examples

void Project_RemoveDataRange_Ex1()
{
        //assume there is a worksheet with at least two columns
        Worksheet wks = Project.ActiveLayer();
        if ( !wks )
        {
                printf("Can not get active worksheet");
                return;
        }
        
        DataRange dr;
        dr.Add("X", wks, 0, 0, -1, 0);//add first column to datarange
        dr.Add("K", wks, 0, 1, -1, 1);//second column
        
        dr.SetName("XKRange");
        Project.AddDataRange(dr); //should add to Project before you can get it.
        Project.RemoveDataRange("XKRange");
        return;
}

Remark

See Also

DataRange::AddInput, Project::AddDataRange, Project::GetDataRange

header to Include

origin.h