Problem with Units when entities generated by VBA Macro

I'm part way through generating a custom VBA script that will create horological standard gears. The VBA routine will generate all the lines and arcs needed to describe the complete gear. I have previously written this script in Python for another 3D package - it works very well. I thought the main challenge would just be the translation to VBA.

The problem I have is when calling the solidworks method to create lines:

Set skSegment = Part.SketchManager.CreateLine(point_2_x, point_2_y, 0#, point_3_x, point_3_y, 0#)

The method takes six parameters to describe the start and end points of a line in terms of x,y,z.

In the sample above, the actual values passed are:

point_2_x 11.9835544170549
point_2_y 0.628031474915326
point_3_x 10.7286395330378
point_3_y 0.562264172654755

z values are always zero.

The script works and produces the lines BUT, the values are interpreted as Meters and not Millimeters. The document units are set to MMGS but solidworks insists on treating my script values as Meters. The sketch ends up 1000 times the size it should be.

Does anyone know how to fix this problem?