|
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. |
|