Hi,
I am trying to mate two parts together using the concentric feature using API.
As show in the picture below, the bottom of the cylinder needs to be concentric with the circle on the bottom surface named "Circle1" . I have also named the bottom edge of the cylinder Bottom Pin to try and mate them by name . If anyone could assist me here it would be nice as I am new and have been stuck for a while now.
Attached is a code I attempted to use but was unable to work
I started by adding Option explicit at the top of the macro to make sure each variable is defined. You have a typo here:
bRet = sw.Face2.Select4(True, Nothing)
So the selection isn't gonna work. You should be able to see this when you step through the macro line by line. You would have then also seen that EntitiesToMate(1) is nothing, probably.