How to create a dimension and give it a set value

Hello all;

I'm having a problem trying to find a way to create a dimension between 2 selected points, and then giving the dimension a value of 3mm. I looked at a macro that I recorded but to me it seemed like the code was clunky. Currently I am using objPart.AddDimensions2(0,0,0) to create a dimension but am lost from there. Also is there a way to set the dimension location without knowing the x,y,z location? The attached picture shows the 3D points that I want to dimension. I do have the points set to variables so I can select them using the select4 method no problem.

Hope that was clear anough.

RHatzung

SolidworksApi macros