2 Replies Latest reply on Sep 9, 2016 7:43 AM by L. xn

    How to get this function 

    L. xn


        • Re:  How to get this function 
          Hrituc Alexandru


          First select  Sheet-Metal and after that run the code!




          Dim swApp As SldWorks.SldWorks

          Dim Part As SldWorks.ModelDoc2

          Dim boolstatus As Boolean

          Dim FeatureData As SldWorks.SheetMetalFeatureData

          Dim Feature As SldWorks.Feature

          Dim Component As SldWorks.Component

          Dim bData As SldWorks.CustomBendAllowance

          Dim nam As String


          Sub main()

          Set swApp = CreateObject("SldWorks.Application")

          Set Part = swApp.ActiveDoc

              Set Feature = Part.SelectionManager.GetSelectedObject6(1, -1)

                nam = Feature.GetTypeName

              Set FeatureData = Feature.GetDefinition

              Set bData = FeatureData.GetCustomBendAllowance

              Dim bType As Long

              bType = bData.Type

              bData.Type = swBendAllowanceDeduction

              bData.kfactor = 0.2268

              Call FeatureData.SetCustomBendAllowance(bData)

              boolstatus = Feature.ModifyDefinition(FeatureData, Part, Component)


          End Sub