Solid Edge Revision Manager Object Library
DeleteFolder Method
Specifies the number of files and/or folders to delete.
Specifies the files and/or folders to delete.
Specifies the number of files and/or folders that were successfully deleted.
Specifies the files and/or folders that were successfully deleted.
Description
This method deletes the specified list of files and/or folders and returns the successfully deleted files.
Syntax
Visual Basic
Public Function DeleteFolder( _
   ByVal NumberOfDocumentsToBeDeleted As Long, _
   ByVal listOfFilesToDelete As Variant, _
   ByRef NumberOfSuccessfullyDeletedDocuments As Long, _
   ByRef listOfFileSuccessfullyDeleted As Variant _
) As Long
Parameters
NumberOfDocumentsToBeDeleted
Specifies the number of files and/or folders to delete.
listOfFilesToDelete
Specifies the files and/or folders to delete.
NumberOfSuccessfullyDeletedDocuments
Specifies the number of files and/or folders that were successfully deleted.
listOfFileSuccessfullyDeleted
Specifies the files and/or folders that were successfully deleted.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim aListOfFoldersToDelete(2) As Object
        Dim NumberOfSuccessfullyDeletedFolders As Long
        Dim aListOfFoldersSuccessfullyDeleted As Object

        Try
            ' Start Revision Manager.
            objApplication = New RevisionManager.Application

            ' Get reference to Insight object.
            objInsight = objApplication.Insight

            aListOfFoldersToDelete(0) = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/greg1"
            aListOfFoldersToDelete(1) = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/greg"
            aListOfFoldersToDelete(2) = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit"

            objInsight.DeleteFolder(aListOfFoldersToDelete.Length, aListOfFoldersToDelete, NumberOfSuccessfullyDeletedFolders, aListOfFoldersSuccessfullyDeleted)
        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            ' Release COM Objects.
            If Not (objInsight Is Nothing) Then
                Marshal.ReleaseComObject(objInsight)
                objInsight = Nothing
            End If

            If Not (objApplication Is Nothing) Then
                objApplication.Quit()
                Marshal.ReleaseComObject(objApplication)
                objApplication = Nothing
            End If
        End Try
    End Sub

End Module
See Also

Insight Object  | Insight Members

Send comments on this topic.