Purge Files Delete/ Remove Unused Parts

Purge Files Delete/ Remove Unused Parts

Anonymous
Not applicable
824 Views
1 Reply
Message 1 of 2

Purge Files Delete/ Remove Unused Parts

Anonymous
Not applicable
Hi,

I want to know if its worth my time looking at API which deletes parts which are redundent.

I don't think there should be any wasted parts as all new occurrences I program in the API are only repeated/copies of existing parts.

However I am using Frame Generator which creates folders with a lot of parts in them which don't all seem to be needed. Is there a quick way of checking if a part is used in an assembly (I know this function exists in the Vault) in Inventor?

I want to clean these folders (not sure if Purging does this) of uneeded components.

Thanks for viewing

Pete Sandhu
Mechatherm UK
0 Likes
825 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I don't know a lot about Frame Generator so there may be some issues I'm
aware of. Assuming that you can open a top-level assembly and it contains
all of the parts needed, you know which directory(s) are being used for the
files, and no files from other projects are in those same directory(s) then
it should be possible to clean up the folders.

The general logic would be to open the assembly in Inventor. The
Application.Documents collection will contain every document that was opened
as a result of opening the assembly. You can go through this list of
documents and build up a list of the filenames. Then, using file related
functions in whatever language you're using you can iterate through all of
the files in the directory(s). If you find a file that's not in your list
then it's not needed and can be deleted.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5542399@discussion.autodesk.com...
Hi,

I want to know if its worth my time looking at API which deletes parts which
are redundent.

I don't think there should be any wasted parts as all new occurrences I
program in the API are only repeated/copies of existing parts.

However I am using Frame Generator which creates folders with a lot of parts
in them which don't all seem to be needed. Is there a quick way of checking
if a part is used in an assembly (I know this function exists in the Vault)
in Inventor?

I want to clean these folders (not sure if Purging does this) of uneeded
components.

Thanks for viewing

Pete Sandhu
Mechatherm UK
0 Likes