problem during running API...

This error i am getting when running a macro and after this sometime solidworks will get hang.

SolidworksApi macros