Hello All:
I'm getting a little bit confused with the way that SW is changing and maintaining file references and I'm wondering if there are any best practices that people can share.
Two things that I am dealing with:
1) storing files to a network location that is shared by users (ie a "dropbox")
2) files that have external references in subassemblies to others where upper level assemblies get renamed
First Problem:
When I open the main assembly, I can do a "References" and see that files are coming from two locations: A and B. I would want everything to open in B, but it grabs things from both and maintains links to both.
Easiest Solution:
Is there a way to force SolidWorks to take files from the local directory, ignoring whatever path it has stored?
(I tried renaming the network location - ie breaking the reference - which helped, but is unsuitable for day to day work.)
When doing a File > Open > References, I'm unsuccessful using the "Select Column 'In Folder' -> Replace" to replace text (say d:\dropbox with d:\cad\project\...) for all files referenced by the assembly. The buttons are there, it doesn't see to do Find Next>Replace or Replace All. I can do it one reference at a time. However it will only address the references at the top level, not the references down in the subassemblies. That becomes obvious when you do a File > List References after you open the main assembly.
So instead I have to open each subassembly in "B", and assign all its references to point to B locations, then open the main assembly in "B", and point all its subassemblies to "B" locations. (Note: this is not a flat hierachy in "B" or "A").
I tried to open the assembly from the network folder (A), and do a File > Save As. It fails if any files already exist in "B". I delete all files from "B" and do a Pack and Go, and manage to get the files into the right places in location "B" (unclick "flat hierachy"), all now with apparently the correct references.
Is this the best way of doing it?
Second Problem:
Once I open the main assembly and do a File > Find References there is one file that is not found. That file is the main assembly. The main assembly was renamed. How do I find which part has the reference and just replace "Old Name" with "New Name"?
I'm assuming the reference is to "M-021". If I open that file, I see the same Grayed Out reference, but none of the external references in the File Manager point to the assembly. Well, sort of. I can show a RMB > List External References on the feature "Boss Location" and see the reference is to a part in the assembly "upper housing" that is now out of context. That part has also been renamed.
I can File > Open the "M-021" part with "References" and point to the renamed top level assembly, which works, but back inside the Feature Manager > List External References it now lists the new assembly at the top, but still points to the parts with the old names. That will address the "File Not Found" issue above, but not the references.
At this point I am not sure how best to fix this, besides editing the sketches with the references, finding all the referenced entities, deleting them, opening it up in the new assembly and reselecting "collinear" "coincident" etc to references in the renamed parts in the renamed assembly, That gets a little gnarly, but works.
Is that the best way (the only way?) to do that?
Anyways there are solutions around both - none of them particularly pleasant - but I'm wondering if there are best practices that people can share for managing references when transfering files between locations and dealing with references to renamed components in renamed assemblies. Are there certain fixes that work better than the above? Are there certain things you do to stay out of this kind of trouble in the first place?
Thank You,
Mike
For reference: this is done in SW2011.
Nice little essay you got going there For your first question, you can do this one of two ways, you can replace each component individually like you're doing now or you can remove out the files from the currently referenced location and replace a single file to the new location and they should all update.
So for example if my old files were in folder A and the new ones are in folder B then I would have to delete the referenced files from folder A or move folder A to somewhere SolidWorks wouldn't immediately look, and then use the replace command to replace a single reference to folder B. If SolidWorks can find folder A or the files in folder A, this won't work. Once SolidWorks sees that the referenced files are missing, it will look in the currently referenced folders for the files. I believe it will also look in folders that are below in the hierarchy and sometimes parallel.
For both of these issues, this is easier to manage from the SolidWorks Explorer. Start>Programs>SolidWorks>SolidWorks Explorer. The replace command will allow you to replace the thunder assembly that is missing with whatever it was renamed to.
"Are there certain things you do to stay out of this kind of trouble in the first place?" Try to work locally with the files instead of from a network whenever possible for both speed and ability to maintain organization. I'm not sure to what extent you're working out of a shared Dropbox folder, but that generally has trouble written all over it. You may want to look into a PDM system such as PDM Workgroup or Enterprise which will alleviate these issues.