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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Get top and bottom components in an assembly

JD_2779181
9-Granite

Get top and bottom components in an assembly

Creo Parametric 4.0/7.0

 

Hi,

I have to get all part component from an assembly and group all those components in top or bottom group. Is there a function that allows to differ top and bottom components?

 

I use ProSolidDispCompVisit to visit all components. Put all in an array with ProArrayObjectAdd and loop all models. I want to separate top from bottom and create/fill group with.

 

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions
MichelH
12-Amethyst
(To:JD_2779181)

If you have the ComponentPath of each component you can use Transform3D::GetZAxis to get the location.

Comment: I am working with OTK Java, but should be similar with toolkit...

View solution in original post

7 REPLIES 7

Hi,

Can you provide more information about what you mention by "Top components" and "Bottom components"? The order in the assembly tree? Assembled first components (placed at first half of the tree) is - top?

Hi,

 

First of all thank you!

Well, I want to know how to differ the top components from the bottom components placed in a card board after getting all of them with ProSolidDispCompVisit .Capture.PNG

Hello.

I think, you can analyze Z-axis direction. Compare Z-axis of each component model and card board Z-axis.

Take a look

https://community.ptc.com/t5/Customization/Get-global-coordinates-of-entry-port-coordinate-system-with/m-p/756058#M10635

Thank you! That's right!

MichelH
12-Amethyst
(To:JD_2779181)

Hello,

are you trying to separate visible from invisible components? ProSolidDispCompVisit description: Visits all the displayed components in the solid handle.

Regards

Michael

Hello, 

Thank you anwering me.

 

Well, I want to get all dispayed components and differ the components placed in top side of the board from the one placed in bottom side.

 

Capture.PNG

MichelH
12-Amethyst
(To:JD_2779181)

If you have the ComponentPath of each component you can use Transform3D::GetZAxis to get the location.

Comment: I am working with OTK Java, but should be similar with toolkit...

Top Tags