private bool WriteHistory(Rhino.DocObjects.HistoryRecord history, Rhino.DocObjects.ObjRef objref, int segmentCount, int pointCount)
    {
      if (!history.SetObjRef(0, objref))
        return false;

      if (!history.SetInt(1, segmentCount))
        return false;

      if (!history.SetInt(2, pointCount))
        return false;

      return true;
    }