Solid Edge Revision Manager Object Library
CopyFiles Method
Specifies the URL of the container document, a directory on the SharePoint server. The method mimics the interactive behavior of opening a file in Revision Manager and then copying the component parts in it. For example, if you open an assembly in Revision Manager and copy parts within it, the part documents will be copied and the assembly (container) will be updated to point to the copied parts. To copy a list of part documents, specify any one of them as a "dummy" container, and then pass the list as the FilesToBeCopy.
Specifies the list of files to be copied.
Specifies the destination location of the copied files.
Description
This method copies the specified files from one managed folder to another managed folder.
Syntax
Visual Basic
Public Function CopyFiles( _
   ByVal FileName As String, _
   ByVal FilesToBeCopy As Variant, _
   ByVal DestinationPathsOfCopiedFiles As Variant _
) As Long
Parameters
FileName
Specifies the URL of the container document, a directory on the SharePoint server. The method mimics the interactive behavior of opening a file in Revision Manager and then copying the component parts in it. For example, if you open an assembly in Revision Manager and copy parts within it, the part documents will be copied and the assembly (container) will be updated to point to the copied parts. To copy a list of part documents, specify any one of them as a "dummy" container, and then pass the list as the FilesToBeCopy.
FilesToBeCopy
Specifies the list of files to be copied.
DestinationPathsOfCopiedFiles
Specifies the destination location of the copied files.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim FileName As String
        Dim FilesToBeCopy(0) As Object
        Dim DestinationPathsOfCopiedFiles(0) As Object

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

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

            FileName = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par"
            FilesToBeCopy(0) = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par"
            DestinationPathsOfCopiedFiles(0) = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Greg/Summit.par"

            objInsight.CopyFiles(FileName, FilesToBeCopy, DestinationPathsOfCopiedFiles)
        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.