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

Getting all the components of assembly irrespective of instance

Highlighted
Newbie

Getting all the components of assembly irrespective of instance

I have an assembly which has to Family instances.



I f I open Generic instance of the assembly, two parts are visible in
Model Tree,



But if I open the other instance, 3 parts are loaded.



Is there a way to get details all the components of an assembly
irrespective of the instance?



I want to get the file paths for all the components
(sub-assemblies/parts) related to an assembly file.



I am using ProSolidFeatVisit()
<file: d:\ptc\proewildfire%203.0\protoolkit\protkdoc\api\2525.html=">
to visit assembly components.



Regards,



Vinay



2 REPLIES 2

Getting all the components of assembly irrespective of instance

Hi Curtis



It's not about showing in Model tree.



This is my issue:

Assembly MyAsm has to instances "Generic" & "Instance2"

When I open Generic Instance, my tree looks like this (even if I show
Suppressed parts)

MyAsm

|-Part1



When I open "Instance2" Instance, my tree looks like this

Instance2

|-Part2



What I do is visit the assembly, find all file names and copy them to
same temp location.



Now when visiting the assembly MyAsm for its components I want to know
that Part2 is also associated with it, so that I can copy all the three
files

viz; MyAsm.asm, Part1.prt & Part2.prt to temp location.



When user tries to open the assembly from temp location he should be
able to open any instance.



Current problem is, if I visit Generic instance, Part2 is not getting
saved to temp location.

While opening the Assembly, if user selects "Instance2" it fails as
Part2 is not available.



Regards,



Vinay

Getting all the components of assembly irrespective of instance

Vinay,

Read the API Wizard under User's Guide->Family Tables. You can check if
an assembly component has a family table (ProFamtableCheck). Then you
can iterate through the family table instances with
ProFamtableInstanceVisit. For each instance you can get a handle to the
ProMdl using ProFaminstanceMdlGet. Then you can use the ProMdl*
functions to get the file names.



Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078


Announcements