AnsweredAssumed Answered

Can the EditDelete delete drawing sheets?

Question asked by Ly Nguyen on Jun 3, 2020
Latest reply on Jun 3, 2020 by Jordan Brown

I have run into issue with the drawing sheets not being deleted by part.editdelete although it was recorded by macro and it was not able to execute it.  See the comment it showed on the picture.  Is a bug?

Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("Sheet1", "SHEET", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Sheet2", "SHEET", 0, 0, 0, False, 0, Nothing, 0)
End Sub