几何尺寸与公差论坛

 找回密码
 注册
查看: 574|回复: 0

【转帖】copydocument doesnt work correctly

[复制链接]
发表于 2009-4-13 09:55:29 | 显示全部楼层 |阅读模式
copydocument doesn't work correctly
has anyone else noticed that sldworks::copydocument doesn't actually re-reference any of the new child components references if you change the location and filename in the destination children, but if you keep the name the same but change the location it works fine?
also, the documentmanagers getexternalreferences3 function pulls in old references from a file that don't even exist anymore. for example if your original model had a reference to c:\myfile.asm and then you did a save as copy on that file and then re-referenced it to d:\myfile.asm, solidworks would pull in the correct new reference, but dm would still pull in the old reference. this happens no matter how many times you update the file, check the reference is the new one, save etc...
luke,
i have previously made a small designcopy application (never came further than beta-status). i got it to work right but it was in sw2007 and i don't know if things have changed since then.
however, i have noticed the same problems when using pack and go (sw2008) and as sw is probably using the dm functions here there could be a connection. i have been planning on diving into this subject for a while but i simply haven't had the time.
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
yes it definately has a bug i have just written the dm version using dmapplication::copydocument and it suffers from the same glitch.
there is pretty much no way i can think of getting around this as there is no reference back from the old invalid link and the one that is pulled in from sw correctly, so i cannot really do a manual replace references either... mmm. head scratcher.
i've managed to solve the issue by opening all files and saving them again in sw before running the copydocument command. but technically the search options object should pick up the new references as it is running that is the whole point of it. so for now it just means the process is quite a lot slower, but at least it works.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 02:57 , Processed in 0.035568 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表