rocheey
Industrial
- Jan 21, 2001
- 230
Ive got a strange problem that started appearing when the speed of my connection to a remote site slowed down.
Ive got a macro/application that opens up assemblies, recurses out the part references, counts the parts, etc, and if the child part is a new part, opens the part file and exports the part configuration(s).
In the remote site, the users there made several assemblies, each in its own directory, each with the same file name as each other, and each using the same internal config name. Each assembly has child parts, and each child part has the same file name as each other, and each child part uses config names that are the same as each other.
In addition, all these parts were made on another drive/path that I have no access to, and were dragged over using windows explorer, so naturally, the internal references are not exact.
Suprisingly, I have (or Solidworks has) no problem resolving the references to the correct part files, UNTIL I have to open a model to export it. After export, I ensure the model is closed, the model is set to NOTHING, the assembly is closed, and the assembly is set to NOTHING.
But when I then open up the next assembly with the same name/config name/child part names, etc, the assembly opens up with the wrong parts in it. I do nothing to the assembly; it is opened read-only, and the code is passive; there is no code to modify any parts/assemblies.
This morning, I also added code to set the SW working directory to the assembly directory, as well as setting the windows currentDirectory to this same directory. Both calls worked successfully, but the problem persists...
WTF? Is the lock file not completely closing on the part file? Anyone?
Ive got a macro/application that opens up assemblies, recurses out the part references, counts the parts, etc, and if the child part is a new part, opens the part file and exports the part configuration(s).
In the remote site, the users there made several assemblies, each in its own directory, each with the same file name as each other, and each using the same internal config name. Each assembly has child parts, and each child part has the same file name as each other, and each child part uses config names that are the same as each other.
In addition, all these parts were made on another drive/path that I have no access to, and were dragged over using windows explorer, so naturally, the internal references are not exact.
Suprisingly, I have (or Solidworks has) no problem resolving the references to the correct part files, UNTIL I have to open a model to export it. After export, I ensure the model is closed, the model is set to NOTHING, the assembly is closed, and the assembly is set to NOTHING.
But when I then open up the next assembly with the same name/config name/child part names, etc, the assembly opens up with the wrong parts in it. I do nothing to the assembly; it is opened read-only, and the code is passive; there is no code to modify any parts/assemblies.
This morning, I also added code to set the SW working directory to the assembly directory, as well as setting the windows currentDirectory to this same directory. Both calls worked successfully, but the problem persists...
WTF? Is the lock file not completely closing on the part file? Anyone?