Solid Edge Revision Manager Object Library
DownloadDocumentFromServer Method
Specifies the URL path of the document to download from the server.
Member of the DocumentAccess constant set that specifies the file access mode.
Specifies the path of the local cache on the user's machine where the specified document will be downloaded.
Specifies whether to get latest documents when you download the specified document. Specify TRUE to get the latest version of the document from the server. Specify FALSE to use the existing version of the document from the local cache.
Specifies whether to process indirect documents (documents that the specified document links to, for example) when downloading the specified document. Specify TRUE or omit this parameter to get all of the indirect files linked to the document. Specify FALSE to omit indirect files.
Member of the RevisionRuleType constant set that specifies a revision rule for the operation.
Specifies whether to stop the Open operation if the rule specified by RevisionRuleOption is not applicable. When set to true, the operation stops.
Description
This method downloads the document you specify from the server to the local cache.
Syntax
Visual Basic
Public Function DownloadDocumentFromServer( _
   ByVal FileToDownLoadFromServer As String, _
   ByVal FileAccessMode As DocumentAccess, _
   ByRef LocalPath As String, _
   Optional ByVal GetLatestDocuments As Variant, _
   Optional ByVal ProcessIndirectDocuments As Variant, _
   Optional ByVal RevisionRuleOption As Variant, _
   Optional ByVal StopFileOpenIfRevisionRuleNotApplicable As Variant _
) As Long
Parameters
FileToDownLoadFromServer
Specifies the URL path of the document to download from the server.
FileAccessMode
ValueDescription
igReadExclusiveDocument has exclusive read access
igReadOnlyDocument has read-only access
igReadWriteDocument has read-write access
Member of the DocumentAccess constant set that specifies the file access mode.
LocalPath
Specifies the path of the local cache on the user's machine where the specified document will be downloaded.
GetLatestDocuments
Specifies whether to get latest documents when you download the specified document. Specify TRUE to get the latest version of the document from the server. Specify FALSE to use the existing version of the document from the local cache.
ProcessIndirectDocuments
Specifies whether to process indirect documents (documents that the specified document links to, for example) when downloading the specified document. Specify TRUE or omit this parameter to get all of the indirect files linked to the document. Specify FALSE to omit indirect files.
RevisionRuleOption
Member of the RevisionRuleType constant set that specifies a revision rule for the operation.
StopFileOpenIfRevisionRuleNotApplicable
Specifies whether to stop the Open operation if the rule specified by RevisionRuleOption is not applicable. When set to true, the operation stops.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim FileToDownLoadFromServer As String
        Dim LocalPath As String

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

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

            FileToDownLoadFromServer = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par"
            LocalPath = "D:\InsightCache\Insight\solidvm\Engineering\PreReleased\PreReleasedDocLib"

            objInsight.DownloadDocumentFromServer(FileToDownLoadFromServer, DocumentAccess.igReadOnly, LocalPath, False, False, 0, False)
        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.