2 Replies Latest reply on Jan 24, 2018 1:21 PM by Michael Caulton

    How to use InsertConvertToSheetMetal2

    Michael Caulton

      Using: swModel.FeatureManager.InsertConvertToSheetMetal2(0.005, False, True, 0.005, 0.001, swSheetMetalReliefTypes_e.swSheetMetalReliefTear, 0.5, 1, 0.5, False)

       

      I have tried

      1. Manually select face before calling InsertConvertToSheetMetal2.
      2. Selecting the largest face before calling InsertConvertToSheetMetal2
      3. Selecting all faces before calling InsertConvertToSheetMetal2

       

      The "FindBends" bit doesn't seems to work as getting the fold details and thickness too.

       

      If one does the process manually, ie click a surface, convert to sheet metal, collect all bends, it seems to work great and automatically get the thickness, bends and radii.

       

      Has anyone had any success with this method?

       

      Part I have been testing on attached below.

        • Re: How to use InsertConvertToSheetMetal2
          Manikandan Babu

          Hi Michael,

          Please try with below lines.

           

          Option Explicit

          Dim swApp As SldWorks.SldWorks

          Dim Part As SldWorks.ModelDoc2

          Dim boolstatus As Boolean

          Sub main()

          Set swApp = Application.SldWorks

          Set Part = swApp.ActiveDoc

          boolstatus = Part.Extension.SelectByRay(0.132066674313478, -1.23957539069579E-02, -1.19999999986931E-03, -0.53719135137754, 0.656811490250355, 0.529173051354923, 1.87625830157726E-03, 2, False, 0, 0)

          boolstatus = Part.FeatureManager.InsertConvertToSheetMetal2(0.005, False, True, 0.005, 0.001, swSheetMetalReliefTypes_e.swSheetMetalReliefTear, 0.5, 1, 0.5, False)

          Part.ClearSelection2 True

          End Sub

           

          Thanks

          Manikandan