- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In running down bad values I'm getting returned to me by using the Measure Tools within the API, I'm either not using the tool correctly or the values it returns are just wrong.
I'm in a planar sketch projecting some points from edges of a face into my sketch and doing some polar calculations for some decision making. Since the values being returned made no sense, I went old school and applied a trig formula to calculate the distance myself. Here's the code snippet of what I'm testing...
Dim oMT As MeasureTools = ThisApplication.MeasureTools Dim FLP(NoSides / NoSections, 4) As Point2d oSketch.Solve MsgBox(oMT.GetMinimumDistance(oSKP(1), FLP(i, j)) / 2.54) MsgBox(Sqrt(Pow(oSKP(1).Geometry.X - FLP(i, j).X, 2) + Pow(oSKP(1).Geometry.Y - FLP(i, j).Y, 2)) / 2.54)
Now I get this isn't everything, but you can see how I'm looking up results.
The measure tool is returning a bad value (19.230792 in my test) while the trig formula returns a correct value (18.60058). I get you can't test this yourself unless I share what I have in front of me with you, but my primary question is am I using the measure tool correctly and if so then any idea why would I be getting a bad result?
Currently in Inv 2022.1.1

Solved! Go to Solution.