I'm wondering if there is a way in API using VBA to select the feature closest to the currently selected feature with some constraints. For example, if I had the flat face of some component selected and wanted to select the circular face closest in the assembly file to my currently selected flat face. Is there a way to do this in SolidWorks or using Solidworks API that anyone knows of?
My dilemma is that I have slots on parts that need to be mated to holes using the Slot mate under the mechanical mates. However there 8 rails with about 50 holes each on them and I'm trying to find some way to select these holes for mates without having to go through and name all 400 holes and then write a program which will have to specify all 400 holes.