Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

same name different directory???? 1

Status
Not open for further replies.

dj4244

Mechanical
Jun 2, 2003
48
"You cannot replace a component with another of the same name but a different directory" This is the message I got when I tried to replace a xyz.sldprt with a xyz.sldasm, Why?
I can think of many reasons why you would want to do this. Mine was pressed in hardware. And the message is meaningless. The parts had the same name (before the .)only if you don't count the suffix .sldprt vs .sldasm. The parts are also in the same directory????

David A. Johnson
Thunder Systems Inc.
Corona, CA
 
Replies continue below

Recommended for you

Alternative method: open the component first so that it's already in RAM, and then open the assembly.

[bat]All this machinery making modern music can still be open-hearted.[bat]
 
I don't have a real technical answer - but I've gotten the same message before.
I would say it has to do with how your part is mated in the assembly.
I bet the software - bless its heart - just don't know what to do with all those mate relations when you try to replace a part with something that ain't a part - it's just different.
I'm happy enough with deleting the part and then adding the assembly - or visa-versa.
Ohh - try this - save your assembly as a part - with the right name - and then try replacing it in the other assembly.
Let us know how that works for you.

tatej [idea] usfilter.com
 
Solidworks doesn't differentiate files (Assembly or Parts) by which directory they're saved in, but it will allow a part and an assembly of the same name to be loaded into memory at the same time. I don't know why you can't have multiple xyz.sldprt's or xyz.sldasm's (in different directories) open at the same time, and I don't like it either.

It is possible to "Replace" a component part with and assembly, but neither can have the same name. I don't know why it applies the "You cannot replace a component with another of the same name but a different directory" for an assembly to a part (or vice-versa) "Replace", but appearantly it does.

The option TheTick metioned will work for an xyz.sldprt to a different xyz.sldprt, but it won't automatically replace a xyz.sldprt with xyz.sldasm. Also doing it that way requires closing your assembly (unloading all of it's and it's components data out of memory), and doing it that way will replace all instances of that component.

If you don't want to close your assembly (to do it TheTick's way, which won't work in your case anyway), then you have to close the target file (xyz.sldasm in your case) and any assemblies that contain it (to make sure it's loaded out of memory). Then temporarily rename the target (say xyz.sldasm to abc.sldasm). Then do your "Replace" operation. Next open your abc.sldasm, and hit SaveAs "xyz.sldasm". Now your main assembly will be looking at xyz.sldasm. Don't forget to go back and delete abc.sldasm.

Not exactly automatic, but it works,
Ken
 
I was frustrated too. Here is what I would do. (SW should have remenber not only file name, but also full path.)

I assume an assembly has some sub-assemblies and you want to replace one of sub-assembly.

1. Rename the sub-assembly or part file before you open the top assembly.
2. You get an error message because SW can't find.
3. Then you have an opportunity to replace.
 
The reason is that SolidWorks (and I would HOPE all CAD systems) only considers to file name when using the file. It only looks at directories/folders, etc. (ie: location) when loading or saving files. This is quite deliberate and virtually always desirable (nay, necessary).

So when you have some files open (say an assembly and parts), you can have two files of the same name at the same time. Thus you can't replace one with another of the same name either, since they would both have to exist at the same time and it does not see them as different anyway.

What I do is close the assembly and copy the new version over the old one, then open the assembly again.

3/4 of all the Spam produced goes to Hawaii - shame that's not true of SPAM also.......
 
Dear JNR
Isn't the suffix part of the file name in fact maybe the most important part! My problem is that they ARE DIFFERENT NAMES (not the same suffix) and ARE NOT IN DIFFERENT DIRECTORIES!!!! I am trying to replace an "abc".sldprt with an "abc".sldasm. In my world a different suffix makes the file different!!??!! Plus the two items are in the SAME Directory NOT a different one. I'm simply adding hardware so the FAB Dwg can have everything the fabricator does to fabricate the part (namely press in pems, standoffs, etc).



David A. Johnson
Thunder Systems Inc.
Corona, CA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor