API: Find "Where used"

I need to make a "clean up" routine, that finds all components NOT used by a particular assembly. I plan to traverse through a folder (and subfolders) and for each part or assembly detect if it is used by my main assembly. But I need some API like the Where Used in SW-Explorer or mayby a direct call to the SW-Explorer objects. Alternatively I can traverse through my main assembly but I am out of luck when some components are suppressed. It would be OK if I just could list ALL components in the feature tree. Any idea? I hope I make my self clear.

Thanks in advance.

Thomas

Reply to
TV
Loading thread data ...

Ok I thought that a few months back on the API help for 2004 I saw some new tools that gave you Windows Explorer like capabilities. Including Where Used. After looking, and being frustrated that I can't find it again. I only found that there are 2 functions one is Sldworks::SaveAs and it allows you to update a list of files with the new file name I can't remember what the other was but it was similar. I swear that there was another tool that you needed to use in conjunction with it to find out what files needed to be updated, but for the life of me I can't find it. Sorry! Anyone else know where to look in the help to find this function.

Corey

Reply to
CS

Were you thinking of SWAPP.ReplaceReferencedDocument? I use it a bunch to point a file to a new file.

Evan

Reply to
Evan T. Basalik

I am using ModelDoc2.GetDependencies2 for just this purpose. It will give you all depencencies including suppressed components in the assembly. Refer to the "Remarks" area in the help page for this command to see how suppressed componsnts are handled.

--Mark

Reply to
Mark Reimer

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.