查看单个帖子
旧 2009-05-05, 10:40 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】extra entities in the drawing 9dwgdirect 1.100

extra entities in the drawing (dwgdirect 1.10)
extra entities in the drawing (dwgdirect 1.10)
i have previously shown a bit of my code in the forum. i have a list of files to convert to dwg and i loop the files, create the dwgs.
but i find when i have a batch of drawings and convert them to dwg that i get extra entities in some of the dwg files (they are way off from the rest of the data in the file).
doing a search in the raw files being converted into dwg i track down that these extra entities are actually part of another drawing.
it is as if it has not completely wiped out from memory all the entity data or something. it uses the same database smart pointer each time.
i can show the code again if i have to.
all i know is that if i run each file indivudually, one at a time and not in batch mode, they don't create the additional entities. it is only when i am looping a set of files, using the same database smart pointer, that i get this side affect.
thoughts?
andrew
tut tut. it turns out it was a bug in my program. i was forgetting to reset a class object in my loop before it parsed each file. thus the last entity from the previous file was still in this class, and thus it got added to the current drawing.
problem now fixed.
andrew
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)