API: Find "Where used"
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
API: Find "Where used"

 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks
Author Message
TV
Guest





Posted: Tue Dec 21, 2004 4:11 pm    Post subject: API: Find "Where used" Reply with quote

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

Back to top
CS
Guest





Posted: Thu Dec 23, 2004 7:25 pm    Post subject: Re: Find "Where used" Reply with quote

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

"TV" <thomas.voetmann@cpspowder.com> wrote in message
news:6cdc5b58.0412210311.3d6851ce@posting.google.com...
Quote:
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
Back to top
Evan T. Basalik
Guest





Posted: Tue Dec 28, 2004 12:04 am    Post subject: Re: Find "Where used" Reply with quote

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

Evan

"CS" <C@S.COM> wrote in message news:33029uF3ose5lU1@individual.net...
Quote:
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

"TV" <thomas.voetmann@cpspowder.com> wrote in message
news:6cdc5b58.0412210311.3d6851ce@posting.google.com...
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



Back to top
Mark Reimer
Guest





Posted: Tue Dec 28, 2004 9:09 pm    Post subject: Re: Find "Where used" Reply with quote

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


"TV" <thomas.voetmann@cpspowder.com> wrote in message
news:6cdc5b58.0412210311.3d6851ce@posting.google.com...
Quote:
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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB