Just to sort out where the issues is...
Have you checked if the line was successfully added as you wanted? Have a look at the parameters of the lines. If the parameters corresponds to the coded macro, then the issue is in the SolidWorks settings. If so, people might want to know what SolidWorks version you are running.
Just a thought, are we sure that the lines do not snap to anything?
You can use 2014 SolidWorks API Help - AddToDB Property (ISketchManager) to add entities directly to database and avoid snapping.
Remember to set back the value to False after you have added the lines / sketch segments you want.