Running the python script from your latest .dyn file, I’m finding the line:
ids = ExternalFileUtils.GetAllExternalFileReferences(doc);
is selecting “KeynoteTable” and “AssemblyCodeTable” id’s, not the Import Instances that are present in several views, nor the one I selected in the Active View. Since it’s not selecting any Imports, it stops at the first IF. This causes the script to return an “Empty Dictionary” which is causing others’ issues.
It appears this only works with Linked DWG’s, not Imported DWG’s, this is a distinct difference. Additionally, the line above only returns linked DWG’s in 2019 and above, not previous version.
Finally, there is another issue specific to Revit 2019:
'string' does not contain a definition for 'Key'
This is because pre-2.3 versions of Dynamo cannot handle Dictionaries properly. I’m still digging how to remedy this.