Solid Edge Revision Manager Object Library
RenameFiles Method
Specifies the URL paths of the files to be renamed.
Specifies the destination URL paths of the files to be renamed.
Description
This method renames the specified files and moves them to a new location.
Syntax
Visual Basic
Public Function RenameFiles( _
   ByVal FilesToBeRenamed As Variant, _
   ByVal DestinationPathsOfRenamedFiles As Variant _
) As Long
Parameters
FilesToBeRenamed
Specifies the URL paths of the files to be renamed.
DestinationPathsOfRenamedFiles
Specifies the destination URL paths of the files to be renamed.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim FilesToBeRenamed As Object
        Dim DestinationPathsOfRenamedFiles As Object

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

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

            FilesToBeRenamed = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit_AddToLibrary.par"
            DestinationPathsOfRenamedFiles = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit_AddToLibrary_Renamed.par"

            objInsight.RenameFiles(FilesToBeRenamed, DestinationPathsOfRenamedFiles)

        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.