Select to view content in your preferred language

ExportCAD Memory Leak

987
2
07-12-2011 11:45 AM
DrewThompson1
Emerging Contributor
Anyone have ideas on how to manage memory leaks from the ExportCAD_conversion tool? I am currently using the Delete_management tool to clear "in_memory" and also using del to delete the variable reference. I am looping through feature classes and appending them to a DWG with a seed file, I have overwriteoutput set to true as well.  Each iteration of the loop increases the memory by about .7GB until my script crashes at around 3.5GB. Its not an input format issue because i standardize everything before it get passed to the tool and doesn't crash on a certain fc consistently.  I have tried it in the ArcMap python window, pythonwin and pyscripter.

After looking at the results tab when running the tool in the ArcMap python window, I notice that 2 export messages are listed stating; "Exporting *feature_class* to CAD" and "exporting to *CAD*.dwg" My thoughts are that the tool first exports the fc to "CAD" somehow in memory and I just not have been able to figure out how to clear it. 

Any ideas/help would be appreciated.
Tags (2)
0 Kudos
2 Replies
RobertEhrman
Occasional Contributor
Did you figure this out?
0 Kudos
DrewThompson1
Emerging Contributor
This bug has been logged by ESRI, search for the ID NIM071017.

A work around we came up with was to create a temp dataset and create CAD formatted feature classes there. Once all the feature classes we need are in the temp dataset, we would set the workspace to that dataset, get a list of the feature classes, and use that list as the first input to the ExportCAD tool. Its still not ideal and I hate creating and saving intermediate data but it works. Hopefully that helps.
0 Kudos