Component Replace

Component Replace

NachoShaw
Advisor Advisor
323 Views
3 Replies
Message 1 of 4

Component Replace

NachoShaw
Advisor
Advisor

Hey

 

i am working with a step file import so the geometry is dumb. I have to replace some parts with an identical existing component however, when i replace it the new part is repositioned elsewhere, not where where the original was positioned. Im guessing this is because its just in space somewhere.

 

Using code, is there a way of obtaining a parts actual location either by XYZ or maybe a matrix and then transferring that data to the new part so that the new part ends up in the same place as the original?

 

Thanks

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
324 Views
3 Replies
Replies (3)
Message 2 of 4

Martin-Winkler-Consulting
Advisor
Advisor

@NachoShaw 

Could you upload an example step assembly?

Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
Message 3 of 4

NachoShaw
Advisor
Advisor

Hey

 

Yes i'll upload one on Sunday

 

Thanks

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 4 of 4

JhoelForshav
Mentor
Mentor

@NachoShaw 

To get the position and rotation of an occurrence in your assembly you can use the ComponentOccurrence.Transformation property. This is a matrix. You can copy that matrix from the original part and use it when placing the new part.

0 Likes