Hi @GKPByDesign. I do not quite fully understand the details of what you are trying to do. Can you please explain it a bit differently, or with more details? What do you mean by 'inactive sheets'? It sounds like each of your open drawing files will have one sheet named exactly the same as the file name, then the rest of the sheets will have generic names like "sheet 1:1" or "sheet 1:2" and so on, is that correct? And you only want to retain that one sheet that is named exactly the same as the owning drawing file's name, while deleting all the others within that file, right? What do you mean by "containing these to the same file"? Do you want to copy/move the one retained sheet from each file all into one drawing file? It would be simple to process all open drawings in one go, but I just need to fully understand all the details involved? Maybe telling us why you are wanting to do this may help us understand also.
Below is a starter iLogic rule code you can play around with.
Dim oOpenDocs As Documents = ThisApplication.Documents
For Each oDoc As Document In oOpenDocs
If oDoc.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Continue For
Dim oDDoc As DrawingDocument = oDoc
Dim sFileName As String = System.IO.Path.GetFileNameWithoutExtension(oDDoc.FullFileName)
Dim oSheets As Sheets = oDDoc.Sheets
For Each oSheet As Sheet In oSheets
' If oSheet.Name.Contains(":") Then
' Dim sFirstPart As String = oSheet.Name.Split(":").First
' If sFirstPart <> sFileName Then oSheet.Delete
' End If
If oSheet.Name <> sFileName Then oSheet.Delete
Next
Next
Wesley Crihfield

(Not an Autodesk Employee)