cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Deleting Large Amounts of Assemblies and Parts

jtruitt
1-Newbie

Deleting Large Amounts of Assemblies and Parts

I'm in a situation where a large amount of CAD documents need to be deleted (roughly 3500 assemblies, haven't even checked parts). We have Windchill 10.1 M040 currently. Is there a way to program using the Windchill Java API an algorithm to go through and gather chunks of files that are tied together and delete them? Sorry if this is a really broad question, any kind of solution to expedite this process will be greatly appreciated!

Thank you.

4 REPLIES 4
BenLoosli
23-Emerald II
(To:jtruitt)

It is very hard to delete objects from Windchill. You would need to delete any drawings first, then assemblies, and finally the component parts.

Once a relationship is established, it becomes hard to break since Windchill remembers all relationships.

The broader question is, why do you need to delete them?

Can you create a folder named Obsolete and move them all to that folder and then make the folder so only an admin can access files in it?

Is there any chance you will need any of these parts again in the future or be able to take one and modify it for a new purpose?

Thank you for the response.

What me and another admin did so far was just do searches on .drw's, promotion requests, managed packages, etc and have removed all of those top level CAD documents, we are down just the assemblies and components at this point.

These files need to be removed indefinitely, they will never be used again and management needs all these files wiped off our server (revision and version issues on family table instances have already yielded some files that we can't manage to remove but we will worry about that later). Someone has had to have dealt with scenarios like this, it seems like large scale file management like this is incredibly daunting; I figure if the API could be used to even do the repetitive actions I'm doing it could use the lists that windchill creates on each failed delete and save some real time.

BenPerry
13-Aquamarine
(To:jtruitt)

These types of questions appear from time to time.  I've never really seen a good answer though.  People generally ask if they can delete a whole Product and everything in it.

Just chipping in my 2 cents...perhaps part of the company was divested.  So those 1000s of models and drawings are no longer our intellectual property.  That is a good use case for a purge.

I'm interested to hear responses on this.  Hopefully not another one that fades away with no good answer.

bsindelar
6-Contributor
(To:jtruitt)

While it is not the "warm, fuzzy" solution, the reason that it is so difficult to delete CAD objects from Windchill is due to all of the links an object may have.  A particular EPMDocument can have links to other EPMDocs (drawings, BOMs, family tables, formats), WTParts, and Change Objects, and that is not an all-inclusive list.

The first thing I could suggest is that for the list of the assemblies, set their state to an obsolete or cancelled state, make a new context, and move them there to segment them from the rest of the data.  At this point, they are at least hidden from the rest of the user community.

Now for the "solution" part:  DB manipulation.  Objects that are linked in the DB will have a record in a specific table depending on the link type.  Setting the LC state and moving those EPMDocuments gives you some values to build a query around in your DB for each of those tables, and remove just those objects (backing up the DB accordingly first, of course).

Once all the "link" records are gone, the assemblies can be deleted en masse through the GUI (though this can be done through the DB too, it is easier to get the version history using the GUI), since in WC they will become singular entities with no links to other objects (outside of its own history).

My company has a lot of experience in working with WC DBs and have done similar types of projects.  If you're interested, send me an e-mail at robert.sindelar@eccellent.com and we can discuss further on this or other projects.

Top Tags