Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Selected Items Macro

  • Thread starter Thread starter jacklavender
  • Start date Start date
J

jacklavender

Guest
Hi,

I want to write a macro that will draw a selection box and then delete whatever is selected there. (Its for modifying some old drawings that have unwanted notes on them in the same location each time.)

Hope you can help!

Jack

this is what I have...

Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Sheet1", "SHEET", 0.1899620074174, 0.1867665172791, 0, False, 0, Nothing, 0)

' Here I want to delete whatever is selected rather than a named item
boolstatus = Part.Extension.SelectByID2("DetailItem1968@Sheet1", "NOTE", 0, 0, 0, True, 0, Nothing, 0)
Part.EditDelete
End Sub
 

Part and Inventory Search

Sponsor

Back
Top