Trouble in creating Line & points in a new sketch

hello friends,

I am facing trouble in creating a line or point on a sketch. I tried creating rectangle but it works instead. I really dont understand what the issue is. I tried with assigning True value to AddtoDB but it still fails. I read that we need to ensure the sketch should be active. Its newly created sketch and I dont know how to activiate this. Does anyone have come across this issue and have solution for this.

Any help would be appreciated.

Thanks & Regards,

Rejo Jayaraj

SolidworksApi macros