Selection Criteria
Many methods require that you preselect something (e.g., feature, body,
edge, sketch, and etc.) either programmatically or interactively. These
methods might also impose other types of selection criteria such as restricting
you to selecting specific sketch entities or selecting multiple sketch
entities in a specific order.
You should check the SOLIDWORKS software or the SOLIDWORKS Help to see
how the equivalent user-interface operation works and to determine if
additional programming is required to satisfy any selection criteria.