Autocad文件错误关闭/写入文件 [英] Autocad File error Closing/writing file

查看:195
本文介绍了Autocad文件错误关闭/写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开autocad绘图文件模板进行更改或创建内存时。我填写文件中的信息,之后我保存为该文件或保存然后一段时间错误写入/关闭文件错误发生。请帮助我。

Amol

When I open autocad drawing file template for change or create which is in memory. I fill the information in file and after that i save as that file or save then some time Error writing/closing file error occures. Pls help me.
Amol

推荐答案

问题(令人惊讶)可能在文件中打开代码,而不是保存。 />
我假设您正在使用某种类型的Stream对象?使用块将流封装在中,或者在完成后手动调用Dispose。如果在再次写入文件时未处理该对象,则打开的对象可以锁定该文件,从而阻止您编写该文件。如果垃圾收集器同时运行,它可能会为您调用Dispose,但是如果您手动执行,则应始终释放锁。
The problem (surprisingly) is probably in the file open code, rather than the save.
I assume that you are using a Stream object of some type? Enclose the Stream in a using block, or manually call Dispose when you are finished with it. If the object is not disposed when you come to write to the file again, the open object can hold a lock on the file, preventing you from writing it. If the Garbage Collector runs in the mean time, it may call the Dispose for you, but if you do it manually the lock should always be released.


这篇关于Autocad文件错误关闭/写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆