AnsweredAssumed Answered

How to rename a pre-selected sketch

Question asked by Feroz Mahomed on Nov 30, 2019
Latest reply on Nov 30, 2019 by Feroz Mahomed

What do i change in the code below to rename a pre-selected sketch in the feature manager tree?


Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()


Set swApp = Application.SldWorks


Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("SKETCH1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
Part.SelectedFeatureProperties 0, 0, 0, 0, 0, 0, 0, 1, 0, "LO"
End Sub