Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Understanding File References 2

Status
Not open for further replies.

brrian

Mechanical
Joined
Jan 21, 2004
Messages
164
Location
US
We've recently switched from Mechanical Desktop to SolidWorks. The switch has gone reasonably well--my users enjoy modeling in SolidWorks, but some are having a difficult time understanding file references. In Mechanical Desktop parts, assemblies and drawings all live in one file, so there's nothing to manage. Now they must pay attention to the references and understand what happens when they (for example):

-move a file
-rename a file
-copy a file

Some don't understand why it's safe to rename a drawing in Windows Explorer, but not a part. Others struggle with "Save As" vs. "Save As Copy."

Is there a document, website, book, presentation or otherwise that explains file references in layman's terms--sort of a "File References for Dummies"? I'm considering writing one myself, but I'm hoping to find something that does a better job than what I can do. It doesn't even have to be for SolidWorks--Inventor (ugh) basically manages files the same way, so I could start with something written for Inventor.

Have any of you had a similar situation--users who struggle with file references? I'd also be interested in knowing how you handled it.

Thanks in advance,

Brian
 
Generically, a file reference is anything that depends on another file. Examples:
[ul][li]Components in assemblies[/li]
[li]models used in drawings[/li]
[li]Features with in-context references,including sketches[/li][/ul]

SolidWorks helps details the search location order for external references. I believe it can be found when you look up "Search folders in the help.

[bat]I could be the world's greatest underachiever, if I could just learn to apply myself.[bat]
-SolidWorks API VB programming help
 
Well, nothing references a drawing file so you can rename them all day long with no worries.

Drawings reference part and assembly files.
Assemblies reference part files and assembly files. And Parts can reference other part files. So renaming part and assy files have to be done a certain way. The best way in my opinion to see the references and change them is to use the Solidworks Explorer tool. You can easily rename and copy files (no move) and change the reference path in parent files.

There are other ways to change file references within Solidworks. In the open dialogue, when you select a file, there is a "References" button. It will show you what files are referenced and you can double click to change them. Of course, unless you save the parent file you just opened, the new reference change won't be saved. Once you have a parent file open, if you elect to "Save As" a child file, the referenced path will be changed in all parent files open that reference that file, again, only of you save those parent files.

Save as "Copy" is the same as doing a copy in Windows Explorer. Never really used it.

Jason Capriotti
Smith & Nephew, Inc.
 
This will take some study and getting used to, but I now believe it is a superior system. The down-side is that document control is somewhat complex with the various references as a trade-off with the power of references.

If you want to "start over" with a particular set of parts or assemblies, create a new directory. Open the top-most assembly from which you wish to base your updates or changes. Select File > Find References to copy all referenced files into the directory you just created. This finds all parts and assemblies referenced by the assembly you're in at the moment. (Doesn't do drawings--you'll need to copy those yourself, since drawings reference something, but are not referenced by anything as Gildashard pointed out. This is a handy tool if you are about to commit to a new revision.

"Save As Copy" is a quick way of saving out a part with a different name that will no longer be referenced in the context of the assemblies that the "parent" part is referenced in. (That sounds like gibberish.) Example: I'm in an assembly and I want to use a part (Widget) in the assembly as a basis for a similar part in a different assembly/system. So I use the "Save As Copy" option to save the part as "Widget New" (please excuse the unimaginitive name) and even decide to save it in a separate directory, just for kicks. I go back to my assembly, and instead of finding "Widget New" listed in the tree, "Widget" remains. Using "Save As" and changing the name would have changed the name of the part to the new name in my assembly tree. With "Save As Copy", it's now free, although the part still has the references built into it that it's always had--only it's no longer being referenced by any assemblies--sort of a clean start for an old part.

(Clear as mud--good luck.)


Jeff Mowry
Reality is no respecter of good intentions.
 
Brian,

For starters open up Solidworks explorer and open a drawing of an assembly. This will help graphically show you some details about the files and how solidworks connects them. It's a great tool for making copies, fixing references, and the only way I rename file (besides drawings). If you look into PDM works this would help most of your reference issues, but it's cost worth it's $$ especially if you have several or even two users. One note also, is that by default Solidworks files will look in the directory that the file is in for any references first, if it doesn't find them there, it will look in the stored location (last place it was referenced to). I'll stress this point, you cannot do revision control in SW without a PDM system, anyone who thinks they can is fooling themselves. If you do opt for no PDM system, keep directory sturcture super simple to avoid duplicate part names and lost references. That's all for now, anything else let us know!

John
 
brrian said:
Some don't understand why it's safe to rename a drawing in Windows Explorer, but not a part
It is not safe to rename SW files in Win Exp. Always use SW Explorer for renaming or you will lose links.

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP2.0 / PDMWorks 05
ctopher's home site
 
SolidsMaster,

In single-user environments, revision control can be had without a PDM package (software), but by using an orderly system of some other sort. I've done it for almost eight years, having never made a mistake.

As soon as you jump into any multi-user environment, however, disregarding PDM software is a big mistake, as you mentioned. (I used to help manage a document control system back in the days of ACAD when I had a Dilbert job and many people accessing drawings--doing this properly can get very touchy.)


Jeff Mowry
Reality is no respecter of good intentions.
 
Renaming a SolidWorks drawing file is not safe. The drawing still referances the old part or parts that were used to create it, so if they think they are changing the drawing for a new part while infact they are making changes to the origenal part or assembly that was used to creat the drawing.

As has been recomended use SolidWorks explorer for this if you dont have a pdm system.

 
rporter, renaming the drawing file has no affect on file references. Nothing references a drawing. It's true that the drawing still references the original part and that you have to use Swx Explorer or Solidworks to replace those references. But you won't "break" any links by moving, copying, renaming the drawing.

Jason Capriotti
Smith & Nephew, Inc.
 
IMHO, I like to train all newbies to use SW Explorer for renaming all SW files. A good habit and minimizes errors.

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP2.0 / PDMWorks 05
ctopher's home site
 
Jeff,

You say you've done it for eight years without any mistakes, so let me ask about assemblies? How do you "truly" revision control assemblies that call out multiple different parts at certain revisions, etc, etc.

I have been using CAD for 18 years now, with SW since 97.

Remember we're trying to help Brian.

John
 
John,

Good point. Brrian is in a multi-user environment, so a PDM software package is the way to go.

Essentially the way I manage things with assemblies is to create a directory for each revision "notch" of the assembly. If I know I'll be making changes to either a part (or many parts) or an assembly, I'll perform a Find References from the latest revision and put them in a new directory. To keep things in order, each directory starts off with the date in chronological form (050524, for today's example--YYMMDD), followed by a one or two word comment. The new stuff is always in the "bottom" directory, since the directories are always in order when viewed in Explorer. The older stuff gets archived optically, and each project and revision is tracked in a database (have over 80 full CDs of SW parts so far) for quick recollection, just in case we need to review/revert to an older revision. This method is orderly, but only for single users. I don't see any way this could be coordinated--insuring no mistakes--among multiple users.


Jeff Mowry
Reality is no respecter of good intentions.
 
Thanks for all of the responses.

What's dangerous about using Windows Explorer to rename files? Assume I know exactly what I'm doing & I fix all references--is there something else going on behind the scenes that I can't fix or don't know about? Something that corrupts the file?

I'll be honest--I don't like SolidWorks Explorer. It needs a makeover. I use Windows Explorer quite a bit for file management tasks. However, I do not teach my users to do that. Other than drawings, I instruct them to use SolidWorks Explorer.

Just curious,

Brian
 
Suppose you have an assembly that refers to parts with their existing names. If you change the names of the parts within MS Explorer, your assembly has no way of finding the part file anymore--so you would be hosed and have to rename the part files to what they were before so your assembly would be able to find the part files again. (This applies to subassembly names as well.)


Jeff Mowry
Reality is no respecter of good intentions.
 
brrian

Imagine that you create a part and save it. All the necessary data is in this file.

Now imagine that you create a drawing for that part. SW will open the part file for you to draw. After finishing the drawing, you save the drawing file. This file will have some information related to your drawing but not all the necessary data. The geometric data is still in the part file.

When you open the drawing, SW will open the drawing file and the part file to read the geometry (this last task is invisible to you) and rebuild the drawing. That's why, when you change the part, the drawing will update accordingly.

So the drawing internaly create a link to the part file. When opening the drawing, SW look at this link and open the referenced part file.

If you rename the part file using MS Explorer, SW will not "see" this change. When opening the drawing it will look for the previous part filename and will fail to find it.

Using SW Explorer, if you choose to update references when remaming the part file, the drawing file will be also opened and the link updated accordingly. That's why you must use SW Explorer (there is another way to do it, but this is the safest).

This problem is not a SW problem.

If you write a Word document with a link to an Excel file, if you change the Excel filename afterwards the text will fail to link. You will need to open the text and update the link. SW Explorer do this task for you, with SW files.

Regards
 
If I:

1. Create a part and save
2. Create a drawing of that part; save and close
3. Rename the part in Windows Explorer
4. File... Open drawing, then "Find References"
5. Fix reference (relink) then open drawing

The drawing and part are correctly linked, right?

Or, if I:

1. Create a part and save
2. Insert that part into an assembly; save and close
3. Rename the part in Windows Explorer
4. File... Open assembly, then "Find References"
5. Fix reference (relink) then open assembly

The part and assembly are correctly linked?

I understand the references and their importance, and the danger of Windows Explorer vs. SolidWorks Explorer. Is there something beyond just the references that gets messed up if you don't use SolidWorks Explorer?

Brian
 
If you have in-contexted or TOp down designs in your assembly, then those are lost if you rename the file outside of SW explorer. This is why you use SW Explorer to rename your files.

Regards,

Scott Baugh, CSWP [pc2]
3DVision Technologies

faq731-376
faq559-716 - SW Fora Users
 
Unless there's a 3rd party software that I don't know, SW Explorer it's the only tool to do it right.

Just note that your examples in your last post are correct. But if you change the filename of a part that is used in several documents (assemblies and/or drawings), then you will do nothing else then relink documents. In my case, where I try to have the maximum of standard components in different products it would be painful to do. The way to do it is using SW Explorer, find where used, and update the filename in all documents that refereces the part.

I don't realy understand your difficulties with SWexplorer. There are only two things annoying me:
1 - not being able to make the integral copy/move of projects (including drawings)
2 - have to discard the file in SW before working with SWExplorer

Regards
 
I like its functionality, but not its interface. It opens slowly, it opens minimized, and you have to close your file if it's the one you need to modify. It feels like an afterthought.

We're an engineer-to-order company. Most projects are unique--we don't reuse many parts at all. Those that we do are typically hardware and are put in the library. So, we have very little cross referencing between projects.

I'm big on having my users understand what's happening behind the scenes with file references... how they work. They need to know that no matter what they use to manage references--if something gets screwed up, they should know why and how to fix it. That goes back to my original post--a 'friendly' explanation of file references. I even considered making a little mobile with drawings hanging from parts hanging from assemblies, with the strings that connect them being the references--a visual aid. It sounds silly, but that stuff is extremely helpful to some.

Thanks,

Brian
 
SW Explorer is a great tool but it needs a makeover. I'd like to see it integrated with Windows Explorer, I've seen other programs do it. Right click a file in Windows Explorer and get a Solidworks flyout with options to rename, copy, move ,etc. Then a popup window comes to handle the rest. This would be so much more visible to users as most of them don't even realize that there is a tool (SW Explorer) to change references.

Jason Capriotti
Smith & Nephew, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top