So I am using the dynamo script that is in the sample folder AutoCAD_Python_PSet_DumpPropertySetValuesToCSV.dyn to export property set data from a specific Dwg file. The script would run fine for all Dwg file that I have except for one which I am guessing that something is wrong with the Dwg file itself and not the script.
I played around with the file, checked few things and found out that if I remove file references (these files are marked ‘Not Found’) from External Data the script would then execute fine. I am not really sure why this is causing an error with the script because there are other Dwg that would run fine even if the file references are displayed as ‘Not Found’.
Why is file references causing the script to fail? Below is the error that dynamo show for that file:
Warning: TypeError : No method matches given arguments for OnExit: (<class 'Autodesk.AutoCAD.ApplicationServices.DocumentLock'>, <class 'type'>, <class 'TypeError'>, <class 'traceback'>) [' File "<string>", line 29, in <module>\n', ' File "C:\\ProgramData\\Autodesk\\C3D 2022\\Dynamo\\samples\\Data\\AutoCAD\\pset\\pset_utils.py", line 307, in dump_ps_values_csv\n writer.writerow(temp)\n']