×
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

Deleting Assemblies

Deleting Assemblies

Deleting Assemblies

(OP)
Is there anyway to delete an assembly and all it's components from a directory in one shot?  


I have a sub-assembly that I now longer need and I would like to delete it and all referenced parts that belong to that sub-assembly. Can I do this across the board or am I going to have to delete each individual file?


Thanks,

Dale

RE: Deleting Assemblies

I'm not aware of a way to do it across the board, but you could use SolidWorks Explorer to find out which files could safely be deleted.

RE: Deleting Assemblies

I don't know how to delete an assembly with all of the parts, but one thing you could do is open the assembly, then File > Find References, then print the list so you know what to delete.

Flores

RE: Deleting Assemblies

This can be done through the API - basically you:

-use ActiveDoc to get the active document (which you want to delete, along with it's references)
-use GetDependencies2 to get the model references
-use GetPathName to find out where those referenced files live
-use VB command "KILL" or FileSystemObject (FSO) method to delete those files

This is a little dangerous since files that are deleted might be used in other places than what you want deleted.  I suppose some type of "Where Used" search would be ideal before deleting.

RE: Deleting Assemblies

(OP)
I agree it could be a dangerous thing, but these particular files are only referenced by that one sub-assembly they just got dumped into a directory somehow.

I appreciate the response back and will update you how eveything goes with it.


Thanks,

Dale

RE: Deleting Assemblies

Create a TEMP folder. Use SolidWorks Explorer to copy your main assembly & all related files into that folder. Open the assembly & make sure all the parts & sub-assemblies are coming from your TEMP folder. Then delete everything from the original folder. Now move all the files from yout TEMP folder - back into the original folder & detete the - now empty - TEMP folder. Don't forget your drawings too.

Does it sound like I speak from experience?

SolidWorks 2005 SP01.1 / Windows 2000 Professional

RE: Deleting Assemblies

(OP)
Did not think of doing that.. it just sounds too simply. Thanks Tate I will pass the info along.

RE: Deleting Assemblies

enAlright's ideia seems to be a prety good one.

This is something that SW Explorer should do. Not just a simple and dangerous delete, but an "assisted" one. Example: for each file, a confirmation window together with a list of "where used?". Or at least a move or rename with "find children" that would allow us to segregate the files easely and test the model integrity before deleting them with Windows Explorer.

This and the ability of renaming/copying integral sets from assembly to parts drawing would be two important improvments (maybe for SW2006?).

Regards

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