This macro is renaming feature tree for parts. If the macro is launched for assemblies then the components would be renamed only in assembly and not propagated to model name
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Const STR_FIND_WHAT As String = "Sheet"
Const STR_REPLACE_WITH As String = "SHEET"
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Dim swFeatures As Variant: swFeatures = swModel.FeatureManager.GetFeatures(False)
Dim i As Integer
Dim s As String: s = ""
For i = 0 To UBound(swFeatures)
Dim swFeature As Feature: Set swFeature = swFeatures(i)
If InStrRev(swFeature.name, STR_FIND_WHAT) > 0 Then
s = s & "feature : '" & swFeature.name
swFeature.name = Replace(swFeature.name, STR_FIND_WHAT, STR_REPLACE_WITH)
s = s & "' is renamed to : '" & swFeature.name & "'." & vbNewLine
If (s <> "") Then
Thanks a million, Viktor!