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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

jlink question - search through model tree for specific group within specific component

lylebeidler
1-Visitor

jlink question - search through model tree for specific group within specific component

One for the JLink masters out there.

I need to have my JLink app, starting in the top-level assembly, search
through the subassemblies until it finds a specified group. I'm having
trouble finding what I need in the documentation or examples. Can someone
give me some pointers where to look? I've been stumbling around the API
Wizard & can't figure out what to do, so some direction to my steps would be
really appreciated.

Thanks



--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
3 REPLIES 3

Hi,

it's all the same procedure with all Pro/E APIs.

There is no "give me the bom" command.

So the solution is to loop RECURSIVELY through the assembly tree starting at top level asm of course. Then, in every subasm, get a list of all features (!) in the subasm of type FEAT_TYPE_COMPONENT (name is different in all APIs). Then you can check for every single component if there is the group you are looking for.

Hope that helps.

Andreas

__________________________________

Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Rudolf-Diesel-Str. 6
D-65439 Floersheim / Germany

phone: +49 6145 598296
mail: -

Hi Lyle
Here is a utility class that I use to traverse assembly structures. It is
written based on the example in the J-Link APIWizards. I hope it will give
you a good foundation for your further work.

If you have specific J-link questions, the - is
dedicated for that.

Enjoy!
Bjarne




Lyle Beidler <->
01-10-2009 17:33
Please respond to
Lyle Beidler <->


To
-
cc

Subject
[proecad] - jlink question - search through model tree for specific group
within specific component






One for the JLink masters out there.
I need to have my JLink app, starting in the top-level assembly, search
through the subassemblies until it finds a specified group. I?m having
trouble finding what I need in the documentation or examples. Can someone
give me some pointers where to look? I?ve been stumbling around the API
Wizard & can?t figure out what to do, so some direction to my steps would
be really appreciated.
Thanks

--

Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
-


> I need to have my JLink app, starting in the top-level assembly, search
> through the subassemblies until it finds a specified group.


Here is a Pro/WebLink based example that illustrates recursing through assemblies:
http://inversionconsulting.blogspot.com/2008/04/weblink-send-proe-pnt-data-to-excel.html


Use Bjarne's example for the specifics of doing this in J-Link. The above code
in J-Link would be quite a bit more verbose, but that's just a Java thing.


Marc
--
Marc Mettes
-
Visit My CAD/PDM AutomationBlog
Or, Subscribe to My CAD/PDM Automation Blog by Email





Announcements


Top Tags