Redefine Cells of simplex mesh

Hi,

In my simplex mesh, I want to Redefine some cells with different points and save them. Lets say , one cell has 6 points,(1,2,3,4,5,6). I want to eliminate one point from the cell and redefine with (1,2,3,4,5).
I am using VTKSmartPointerPolyData. I tried
void vtkPolyData::ReplaceLinkedCell(VTKIDtype cellid, int npts, CTKIdType *pnts).
But it does not work.

Is there a minimal example?