Automated Sketch Coordinates

I was wondering if I could get some help on my issue.

I am trying to automate the creation of a model starting from the sketch. The sketch would be pretty much the same geometricaly (a trapezoid) in all cases, but the demensions would be dependant on the user input from the UserForm. I have the UserForm all set up and the various demensions set as variables, but when I look at the recorded SolidWorks API all the coordinates seem to be multiplied by an arbitrary constant. For example:

InsertRefPlane( 8, 0.054055628, 0,  0, 0, 0)

The second number is my demension divided by a factor of 39.37007874 ( 2.128, the number I inputed while recording the macro)

All lengths seem to be divided by 39.37007874 and all angles seem to be divided by 57.29577951. (but I could be over generalizing as I did not check every single dimension)

I would like to be able just to put variables directly into the creation of the sketch

For example

CreateLine(0, 0, 0, x, y, z)

or

SetMyDimension = Part.Parameter("D2@Sketch1")

myDimension.SystemValue = LengthA

but since the numbers are not in inches I am not sure if that will work.

Also, I noticed that there were several posts about MathTransform object, but I didn't exactly understand how to use them for my problem.

Thanks for you help,

Elizabeth

SolidworksApi macros