Problem with Sweep and sketch.

Hello,

I try to write macro and I have few problems.


First of these is when I draw a rectangle(vSkLines = CType(swDoc.SketchManager.CreateCornerRectangle(-101.7/ 1000, 0.0, 0.0, -98.3 / 1000, -2 / 1000, 0), Array)) in a sketch, add the curve through the x y z points and Sweep it with direction vector. And when I’m editing operation in SolidWorks there is no direction vector there.


The second problem that I have is when I make second sketch on the same plan as before and make rectangle(vSkLines = CType(swDoc.SketchManager.CreateCornerRectangle(-101.7 / 1000, -0.3 / 1000, 0, -91.7 / 1000, -3.3 / 1000, 0), Array)) which should be  -0.3 on Y axis. When I look in SolidWorks both of rectangle have Y =0.

I Was Looking in API help and on many forums, and I can’t fix it.

I attach my macro, and hope that this can be solved.   

Thank you for all help.

Paul.

SolidworksApi macros