AnsweredAssumed Answered

SketchManager:: MakeSketchBlockFromFile Angle

Question asked by Joecel Torres on Jan 30, 2015
Latest reply on Jan 30, 2015 by Simon Turner

Hi,

 

I`m trying to insert a block in a drawing file.

Some blocks are horizontal while others, vertical.

For the vertical blocks, I`m trying to use "90" for the Angle but the output in incorrect.

I tried using 0, 90, 180 and 270 for further testing.

Please see the attached file for the output.

 

Here`s my code snippet:

MathUtility mathUtil = swApp.GetMathUtility();
MathPoint mathPt = (MathPoint)mathUtil.CreatePoint(new double[3] { viewOutline[0] * scale[1], viewOutline[3] * scale[1] + 1, 0 });
SketchBlockDefinition block;
mathPt = (MathPoint)mathUtil.CreatePoint(new double[3] { viewOutline[0] * scale[1], viewOutline[1] * scale[1], 0 });
block = sktMngr.MakeSketchBlockFromFile(mathPt, @"C:\Solidworks Common\blocks\RIGHT_SIDE_L.SLDBLK", false, (scale[1] - 20) / 1000.0, 0);
block = sktMngr.MakeSketchBlockFromFile(mathPt, @"C:\Solidworks Common\blocks\RIGHT_SIDE_L.SLDBLK", false, (scale[1] - 20) / 1000.0, 90);
block = sktMngr.MakeSketchBlockFromFile(mathPt, @"C:\Solidworks Common\blocks\RIGHT_SIDE_L.SLDBLK", false, (scale[1] - 20) / 1000.0, 180);
block = sktMngr.MakeSketchBlockFromFile(mathPt, @"C:\Solidworks Common\blocks\RIGHT_SIDE_L.SLDBLK", false, (scale[1] - 20) / 1000.0, 270);

 

Following are the actual angle generated after the above code:

90° = 116.62°

180° = 233.24°

270° = 349.86°

 

Has anyone else encountered this before?

What am I missing here?

 

Regards,

Joecel

Attachments

Outcomes