MACRO LIBRARY

Get the features used to create a fillet

Free public access. No account or subscription required.

Files

Associated model(s) Get the features used to create a fillet

Code

'Preconditions: Part is open containing a fillet feature; fillet is selected in FeatureManager tree
'Result: See immediate window
    
'Written by Keith Rice
'CADSharp LLC
'www.cadsharp.com
    
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFeat As SldWorks.Feature
Dim swFilletFeatData As SldWorks.SimpleFilletFeatureData2
Dim vFeats As Variant
Dim i As Integer
    
Sub main()
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swSelMgr = swModel.SelectionManager
    
    Set swFeat = swSelMgr.GetSelectedObject6(1, -1)
    Set swFilletFeatData = swFeat.GetDefinition
    swFilletFeatData.AccessSelections swModel, Nothing
    vFeats = swFilletFeatData.Features
    swFilletFeatData.ReleaseSelectionAccess
    
    For i = 0 To UBound(vFeats)
        Set swFeat = vFeats(i)
        Debug.Print swFeat.Name
    Next i
End Sub