Interference detection during Motion Study

Is there any method by which we can perform interference detection during motion study using API.

SolidworksApi macros