AnsweredAssumed Answered

configuration naming

Question asked by Tony Vitale on Feb 25, 2020
Latest reply on Feb 25, 2020 by Tony Vitale

Hi all,


I found a macro created by Deepak Gupta

my question is how to change this so it adds a -xxx to the config name. thanks in advance!


Option Explicit

Sub main()

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

If InStr(UCase(swModel.GetTitle), ".SLD") > 0 Then

swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = Left(swModel.GetTitle, Len(swModel.GetTitle) - 7)


swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = swModel.GetTitle

End If


End Sub