How to get collision information

Dear Sir....

     I am doing one project on SolidWorks..... to generate Assembly sequence..........

So, it will be helpful if i could extract the collision information using API. I mean to say, is there any example in API to get collision informationof two assembled parts. for example a pen is assembled with body and cap. it is lying along X-direction. if we want to dis-assemble the cap from body we must move the cap in -X direction . if we move in +X direction the API code must give an information that there is a collision betwwen these two parts.

Please anyone help me in solving this problem....

Thanks in advance

With regards

Borad

NITW

SolidworksApi macros