Jorge Mirabelli

Macro Failing to Create Circle

Discussion created by Jorge Mirabelli on Aug 6, 2019
Latest reply on Aug 6, 2019 by Jorge Mirabelli

I have a macro that works about 60% of the time and I have no idea why. I will run it with the same data three times and get three different results, please help. The line which fails is:

 

Set skSegment = Part.SketchManager.CreateCircleByRadius(xValue, yValue, zValue, Range("D" & i).Value / 1000)

 

where I am just trying to create a circle using variables that are storing the center's data. What is strange is that sometimes if I add a break point at this line and do NOTHING except click the continue button the code will work...at least on my computer. I am now on a better computer but it is failing more frequently. I have watched the variables used in the expression and they always are valid numbers. Unfortunately the upload video feature is currently down, but what happens is the blue circle and orange coordinate axes will flash on the screen for a moment and then disappear and no circle will have been created despite the sketch having attempted to create one. Sorry if this doesn't really make sense, I do not know how to explain it...

Outcomes