0 Replies Latest reply on Jun 2, 2017 3:15 PM by Michael Garvelink

    API for activating Cosmetic Thread on Hole Wizard Features

    Michael Garvelink

      I am working on a macro that looks at all the Tapped Holes created using Hole Wizard and verifying the user had 'Cosmetic Threads' activated. I have figured out the 'Get' part, but I am stuck on the 'Modify' part.


      I thing that I want to change the eNumeration value of CosmeticThreadType from 0 to 1


      Else where in the Macro, I traverse the Feature Tree, when I find a tapped hole, I call this function -


      Function TappedHole(swFeat As SldWorks.Feature)

          Dim swModel                     As SldWorks.ModelDoc2

          Dim swPart                      As SldWorks.PartDoc

          Dim x                           As SldWorks.WizardHoleFeatureData2


          Set x = swFeat.GetDefinition


              'MsgBox "Tapped Hole"


              Debug.Print swFeat.Description

              Debug.Print x.CosmeticThreadType

              Debug.Print "*****************************************"

              Debug.Print ""


           'change the CosmeticThreadType -

              'swFeat.ModifyDefinition x.CosmeticThreadType, 1, Nothing


      End Function




      Any thoughts?