for those of you who are interested, here is a sample sub that traverses features/subfeatures and outputs the creation/modification info to the debug window.
First, modify a feature 'manually', save, and re-run the sub. The feature mod date *should* update.
Secondly, try changing dims from a design table; save, and re-run the sub. I was getting only the 'design table' feature as being updated.
Thirdly, make some dims in a sketch visible from outside the sketch; and modify/rebuild by double clicking the sketch dimension, save, rerun the sub. I was getting a nogo here, as well
' ----- cut here ----------------
Sub main()
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Feature As SldWorks.Feature
Dim subFeat As SldWorks.Feature
Dim Config As SldWorks.configuration
Const swDocPART = 1 ' Used to be TYPE_PART
Set swApp = Application.SldWorks
If swApp Is Nothing Then
MsgBox "Please start Solidworks before running this macro"
Exit Sub
End If
Set Part = swApp.ActiveDoc
If Part Is Nothing Then
MsgBox "Please have a part loaded"
Exit Sub
End If
Set Config = Part.GetActiveConfiguration
ConfigName$ = Config.Name
DebugPrint "Feature History for:" & ConfigName$
Set Feature = Part.FirstFeature 'Get the 1st feature in part
While Not Feature Is Nothing ' While we have a valid feature
featureName = Feature.Name ' Get the name of the feature
Creator$ = Feature.CreatedBy
CreateDate$ = Feature.DateCreated
Moddate$ = Feature.DateModified
Debug.Print vbCrLf & featureName & " Created By: " & Creator$ & " on " & CreateDate$
Debug.Print Chr$(9) & "Modified on " & Moddate$
SubFeatMsg$ = Chr$(9) & featureName & " SubFeatures:"
Set subFeat = Feature.GetFirstSubFeature
If Not (subFeat Is Nothing) Then Debug.Print SubFeatMsg$
While Not subFeat Is Nothing ' While we have a valid Sub-feature
' Get the name of the Sub-feature
subFeatureName$ = subFeat.Name
Creator$ = subFeat.CreatedBy
CreateDate$ = subFeat.DateCreated
Moddate$ = subFeat.DateModified
Debug.Print Chr$(9) & Chr$(9) & subFeatureName$ & " Created By: " & Creator$ & " on " & CreateDate$
Debug.Print Chr$(9) & Chr$(9) & "Modified on " & Moddate$
Set subFeat = subFeat.GetNextSubFeature
Wend ' Continue until the last Sub-feature is done
Set Feature = Feature.GetNextFeature()
Wend ' Continue until the last feature is done
End Sub