Well Tim DeepClone seems to be the GO.
Both a regen and a AddNewlyCreatedDBObject are required to make it work.
SetAt must add it to the database.
So I guess the answer is a new dictionary is requied.
[CommandMethod("TestCopyXClip")]
public void TestCopyXClip()
{
PromptEntityResult per;
ObjectId tempId;
Document Doc = acadApp.DocumentManager.MdiActiveDocument;
Database Db = Doc.Database;
Editor Ed = Doc.Editor;
using (Transaction Trans = Db.TransactionManager.StartTransaction())
{
per = Ed.GetEntity("Select xref to copy xclip to: ");
Entity ToEnt = Trans.GetObject(per.ObjectId, OpenMode.ForWrite) as Entity;
per = Ed.GetEntity("Select xref to copy xclip from: ");
Entity FromEnt = Trans.GetObject(per.ObjectId, OpenMode.ForRead) as Entity;
DBDictionary xDictFrom = Trans.GetObject(FromEnt.ExtensionDictionary, OpenMode.ForRead) as DBDictionary;
tempId = xDictFrom.GetAt("ACAD_FILTER");
DBDictionary FltDict = Trans.GetObject(tempId, OpenMode.ForRead) as DBDictionary;
ObjectId xclipId = ToEnt.ExtensionDictionary;
if(xclipId.IsNull)ToEnt.CreateExtensionDictionary();
DBDictionary xDictTo = Trans.GetObject(ToEnt.ExtensionDictionary, OpenMode.ForWrite) as DBDictionary;
IdMapping iMap = new IdMapping();
DBDictionary nFltDict = FltDict.DeepClone(xDictTo, iMap, true) as DBDictionary;
xDictTo.SetAt("ACAD_FILTER", nFltDict);
Trans.AddNewlyCreatedDBObject(nFltDict, true);
Db.ResolveXrefs(true, true);
Ed.Regen();
Trans.Commit();
}
}