Pack and go typically opens all of the files and changes the references, so I assume creating a pack and go without opening the file would be impossible.
I would suggest you use GetDocumentDependencies2 instead of GetDocumentDependencies, since it has been superseded for a long time.
maybe you are right. if there have a other way to do it. because use the GUI windows (right click for the file),show the window for Pack and go. not need open solidworks can do the copy and rename the files.
thanks for you suggest. i will update my code.
but use GetDocumentDependencies2 can't find the drawing for all parts.