GetLowerBound
Get the lower index of the Dataset display range.
int GetLowerBound( )
The lower display index of the vector (0 based offset).
EX1
void vectorbase_GetLowerBound_ex1() { // Call this function with a worksheet active, which contains some data // Declare a vector object of size 99 vector vec(99); // Get and report lower bound printf("Lower bound/index of vector is: %d\n", vec.GetLowerBound()); // Point to active worksheet Worksheet wks = Project.ActiveLayer(); if( wks ) { // Declare a dataset object that is attached to 1st col of wks Dataset dsData(wks, 0); if( dsData ) { // Get lower bound/index of dataset and report printf("Lower bound/index of dataset/1st col is: %d\n", dsData.GetLowerBound()); // Try changing the "Set as Begin" property of the worksheet // to a different row using the Worksheet menu command, // and run this function again. // Changing "Set as Begin" from the GUI is same as // programmatically setting the SetLowerBound property } else out_str("Failed to attach dataset object to 1st col of wks"); } else out_str("Active layer is not a worksheet"); }
Get the lower index of the vectorbase object. Index values returned are 0 based offsets. GetLowerIndex is a synonym for GetLowerBound. GetLowerBound is supported for all vectorbase objects whereas SetLowerBound is supported only for Datasets and not for vectors. Thus the lower bound can be read but not written to, for vectors. This allows for creation of more general purpose functions that can accept vectorbase objects as arguments in place of Dataset objects.
Dataset::SetLowerBound, vectorbase::GetSize, vectorbase::SetSize, vectorbase::GetUpperBound, Dataset::SetUpperBound
origin.h