AnsweredAssumed Answered

VBA Macro Mate References

Question asked by Samantha Szkirpan on May 27, 2016
Latest reply on Jun 4, 2016 by Alfred Jelinek



I'm trying to automate the assembly of components to a rail. The issue with this is that the rail has U's meaning the holes where components are attached are not equally spaced. The holes come in sets of 3 evenly spaced holes and looks something like this:   o   o   o o   o   o o   o   o

My first idea was to try and label each hole in each set with 1, 2, and 3 (hopefully using mate references) and the parts would have corresponding 1's, 2's, and 3's predetermined to be tangent mates. The issue arises when you import new parts to an open assembly using API, the predetermined mate references do not automatically line up like they do when you insert parts manually.

How do I get the mate references to work as they do when inserted manually using VBA? Is there some caveat in the addcomponent4 method that enables the use of mate references that I'm missing? Any other ideas aside from mate references that would be more effective?


Thank you