Why is Distance Mate Dim is always 1

I have a routine that makes a mate to an inserted part, butno matter what I put for the distance value, it always makes mydistance mate 1"

I have the same question for my angle mates, I put 45 as my value,but they come out 58.31007809deg in the assembly.

I think it has to do with the values vs units thing?? Is therequired value a real/integer/etc... and it's not equal to my dim?

I'm running the macro in an assembly, and the units are IPS (inchpound second) whichis what I want.

Here are the two commands to make the mates: (the top one is theangle mate and the bottom one is the distance mate)

Thanks!
-Wes

boolstatus = assy.Extension.SelectByID2("Front Plane@" &swComp.Name2 & "@" & swRootComp.Name2, "PLANE", 0, 0, 0,False, 0, Nothing, 0)
boolstatus = assy.Extension.SelectByID2("Front Plane", "PLANE", 0,0, 0, True, 0, Nothing, 0)
assy.AddMate 6, 2, 0, 0.06326275636025, 45

boolstatus = assy.Extension.SelectByID2("Top Plane@" &swComp.Name2 & "@" & swRootComp.Name2, "PLANE", 0, 0, 0,False, 0, Nothing, 0)
boolstatus = assy.Extension.SelectByID2("Top Plane", "PLANE", 0, 0,0, True, 0, Nothing, 0)
assy.AddMate 5, 2, 0, 0.0254, 24

SolidworksApi macros