Insert a number of new matrix objects into a matrix layer.
int Insert( uint nNumObjs, int nPos = -1, int nType = -1, int nRows = 5, int nCols = 5 )
Note: Currently all matrix objects in the same matrix layer should have the same dimension, so the nRows and nCols are ignored. This is to say, the inserted matrix object would have the same number of rows and columns with the existing matrix objects, no matter what the value you assign to nRows and nCols. |
An index of the first new matrix objects or a error number less than zero.
EX1
//Insert a number of new matrix objects into a matrix layer. void MatrixLayer_Insert_Ex1() { MatrixPage mp = Project.MatrixPages(0); if(!mp) return; MatrixLayer ml(mp.GetName()); if( ml.Insert(1) < 0) printf("Fail to insert matrix object!"); else printf("Success to insert matrix object!"); }
origin.h