1 Reply Latest reply on Jun 2, 2007 3:52 AM by SolidAir

    Does SW truncate the length of lines?

    Brian Hoerner
      A user posed a question to me due to an assembly situation, the question basically is, does SW truncate or just round up to the eight decimal place? So if a line point to point is technically 3.2222222256789, is the actual line length changed to 3.22222223 or is it just rounded to show that length?

      I had thought there was a discussion on this, but that may have been in Pro/E land somewhere.

      Thanks for any thoughts
        • Does SW truncate the length of lines?

          Using this very simple macro (a dimension must be pre-selected):


          Sub main()

          Dim swApp As SldWorks.SldWorks

          Dim swModel As SldWorks.modelDoc

          Dim swSelMgr As SldWorks.SelectionMgr

          Dim swDim As SldWorks.Dimension

          Dim swDispDim As SldWorks.DisplayDimension

          Dim swAnn As SldWorks.Annotation

          Dim swConfig As SldWorks.Configuration

          Dim vConfigNames As Variant

          Dim vValue As Variant

          Set swApp = Application.SldWorks

          Set swModel = swApp.ActiveDoc

          Set swSelMgr = swModel.SelectionManager

          Set swDispDim = swSelMgr.GetSelectedObject5(1)

          Set swDim = swDispDim.GetDimension

          MsgBox swDim.value

          End Sub

          It appears that the number is stored as 3.2222222256789 if the units are in MM (internally, SolidWorks converts all values to meters).