| 2.2.3.8.18 Matrix::SetXMinSetXMin
 DescriptionSet the X coordinate associated with the left most column of the matrix.
 SyntaxBOOL SetXMin( double dXMin ) Parameters dXMin[input] Input X coordinate of left most column
 ReturnReturns TRUE on success and FALSE on failure.
 ExamplesEX1
 // Set and get the X coordinate of the first column of a matrix
void Matrix_SetXMin_ex1()
{
// This sample code will print a message like below:
// Target matrix is Matrix1.
// Setting X min value succeeded.
// Obtained X min value is -1.23457e+008
// Check X min value by Matrix:Set Dimensions menu command if it is -1.234570e+008.
//
    BOOL rc;
    
    double dXMin;
    matrix<double> mat1 = {
        {1,  2},
        {3,  4},
        {5,  6}
    };
    MatrixPage MatPg1;
    MatPg1.Create("Origin");
    MatrixLayer MatLy1 = MatPg1.Layers(0);
    Matrix Mat1(MatLy1);
    Mat1 = mat1;
    printf("  Target matrix is %s.\n",Mat1.GetName());
    rc=Mat1.SetXMin(-123.4567E6);  // Use SetXMin to set the X coordinate of last column
    if(!rc) {
        printf("  Error: SetXMin failed.\n");
        return;
    }
    else printf("  Setting X min value succeeded.\n");
    dXMin = Mat1.GetXMin();   // Use GetYMin to get the X coordinate of last column
    printf("  Obtained X min value is %g\n", dXMin); // Print out coordinate
    printf("  Check X min value by Matrix:Set Dimensions menu command if it is %e.\n",dXMin);
}RemarkIn addition to the values displayed in the cells of an internal Origin matrix (nominally Z values), Origin matrices map X coordinate values to the columns and Y coordinate values to the rows of the matrix. The SetXMin function sets the X coordinate associated with the leftmost column of the matrix.
 See AlsoMatrix::SetYMin, Matrix::SetXMax, Matrix::SetYMax, Matrix::GetXMin, Matrix::GetXMax, Matrix::GetYMin, Matrix::GetYMax, Matrix::GetXValue, Matrix::GetYValue
 Header to Includeorigin.h
 |