How to "label" my source file by xrecord and find the xrecord in the new file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
.NET C# AC2017
1) I attached a xrecord to NamedObjectsDictionary of file a.dwg. Works fine
...
DBDictionary nod = (DBDictionary)trans.GetObject(database.NamedObjectsDictionaryId, OpenMode.ForWrite);
...
Xrecord myXrecord = new Xrecord();
....
nod.SetAt("MyData", myXrecord);
trans.AddNewlyCreatedDBObject(myXrecord, true);
...
trans.commit();
2) Insert file a.dwg to other file b.dwg and want to use my xrecord data. Using insert command, drag and drop, etc. produce the same result.
I use mgdDbg but cant find the Xrecord.
I think xrecord of NamedObjectsDictionary should become xrecord of inserted block - but that seems to be wrong.
How can I "label" my source file by xrecord and find the xrecord in the new file after I inserted the source file without using a block at the source file?