AnsweredAssumed Answered

How to select swWzdHoleTypes_e value

Question asked by Yong Ning on Dec 27, 2015
Latest reply on Dec 29, 2015 by Divyanshu Bhardwaj

follow code.

How to  select  the "swWzdHoleTypes_e" value→

 

SwFeatData.Type = swTapThruCounterSinkBottom

→ SwFeatData = ?????

 

for example

 

Specifies values for wizard hole type values.

Legacy Hole Types

swSimple

swTapered

swCounterBored

swCounterSunk

 

*************************

 

 

0.jpg

 

 

 

Private Sub ll2()

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

      Set SwApp = Application.SldWorks

      Set SwModel = SwApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr

      Set SwSelMgr = SwModel.SelectionManager

   Dim Feature As SldWorks.Feature

   Dim SwFeatData As SldWorks.WizardHoleFeatureData2

       ' Here Write code for selecting the feature

       Set Feature = SwSelMgr.GetSelectedObject5(1)

       Set SwFeatData = Feature.GetDefinition

       ''

       With SwFeatData         

           Debug.Print .Standard, .Type

           SwModel.ForceRebuild3 True

       End With

End Sub

Outcomes