Question

Is there a way to disable auto-recovery of DWG files?


Badge

Using the 'Autodesk AutoCAD DWG/DXF Reader/Writer' we're reading DWG files. Normally this works as expected, but sometimes the DWGs are corrupt. Instead of FME automatically recovering these DWGs, it would be better to fail immediately, as the recovered DWG might miss data, in our experience.

 

I could not find any relevant options in the docs at https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/acad/acad.htm or a related question on these forums. Hopefully somebody can shed some light on this. Thank you in advance.

 


6 replies

Badge

Hi @stevenl​ thank you for your question. Do the corrupt DWGs appear any different in the folder to non-corrputed DWGs? Do they still open in AutoCAD?

Badge

Hi @daraghatsafe​, thank you for your reply. Most DWGs differ in size, a bit smaller. They do open in AutoCAD, also requiring recovery, but are also missing data.

Badge

To add some information. Up until the DWG is read/converted by FME (Server), we have no idea that the DWG is corrupt. Once the result leaves FME, we also have no idea that the DWG was corrupt, except for the logging. The logging, however, is not something that we (can) read in our processes.

So, it would be better if FME simply rejects the input and fails.

Badge

Hi @stevenl​ thanks for the extra info. We do have this article that goes into logging and using Python shutdown scripts, I have not done this myself but it may be a useful resource with a bit of tweaking for your process. https://community.safe.com/s/article/how-to-extract-and-use-log-information-in-workbenc

Badge

Thank you for this link @daraghatsafe​! This sentence from the article makes it very promising to me:

> A customer found that some of his Microstation DGN files had been truncated.

Badge

I was able to detect the recovery through the use of python scripts. Using the LogMessageStreamer transformer did not work for me, as it did not give the log entry stating it is recovering the DWG.

 

Thank you @daraghatsafe​!

Reply