text: public NameRecord CloneFilter(int filterDbNameIndex, int newSheetIndex){NameRecord origNameRecord = GetNameRecord(filterDbNameIndex);int newExtSheetIx = CheckExternSheet(newSheetIndex);Ptg[] ptgs = origNameRecord.NameDefinition;for (int i = 0; i < ptgs.Length; i++){Ptg ptg = ptgs[i];if (ptg is Area3DPtg){Area3DPtg a3p = (Area3DPtg)((OperandPtg)ptg).Copy();a3p.ExternSheetIndex = (newExtSheetIx);ptgs[i] = a3p;}else if (ptg is Ref3DPtg){Ref3DPtg r3p = (Ref3DPtg)((OperandPtg)ptg).Copy();r3p.ExternSheetIndex = (newExtSheetIx);ptgs[i] = r3p;}}NameRecord newNameRecord = CreateBuiltInName(NameRecord.BUILTIN_FILTER_DB, newSheetIndex + 1);newNameRecord.NameDefinition = ptgs;newNameRecord.IsHiddenName = true;return newNameRecord;}