×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

same name different directory????

same name different directory????

same name different directory????

(OP)
"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

RE: same name different directory????

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

All this machinery making modern music can still be open-hearted.

RE: same name different directory????

I think there is a KBA on this at the SW website. Go the Knowledge base and Type this in the search "Reference Document Search Routine"

Regards,

Scott Baugh, CSWP
3DVision Technologies
http://www.3dvisiontech.com
http://www.scottjbaugh.com
FAQ731-376
When in doubt, always check the help

RE: same name different directory????

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 usfilter.com

RE: same name different directory????

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

RE: same name different directory????

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.

RE: same name different directory????

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.......

RE: same name different directory????

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources