1 Reply Latest reply on Dec 3, 2015 6:23 AM by Padaka Lingam

    Extract chamfer dim

    Hrituc Alexandru

      Hi everyone,

       

                I try to extract chamfer dim. ex: 10x45°... matter what I do it take as dimension 45° or 135° and i don't understand why...

      how must write the code to extract 10 as dimension??

                          Thanks,

      1.jpg

        • Re: Extract chamfer dim
          Padaka Lingam

          In API Help, the below example is there

           

          Dim swApp As SldWorks.SldWorks

          Dim swModel As SldWorks.ModelDoc2

          Dim swSelMgr As SldWorks.SelectionMgr

          Dim swDim As SldWorks.Dimension

          Dim swDisplayDim As SldWorks.DisplayDimension

          Dim length As Double

          Dim angle As Double

          Dim retval As Variant

           

          Sub main()

          Set swApp = Application.SldWorks

          Set swModel = swApp.ActiveDoc

          Set swSelMgr = swModel.SelectionManager

          Set swDisplayDim = swSelMgr.GetSelectedObject6(1, 0)

          Set swDim = swDisplayDim.GetDimension

          retval = swDim.GetSystemChamferValues(length, angle)

          Debug.Print "Is selected dimension a chamfer dimension? " & retval

          Debug.Print "Length = " & length

          Debug.Print "Angle = " & angle

          End Sub