Solid Edge Framework Type Library
ImportDocumentsToServer Method
The number of files and folders to be imported.
Name of the folder of a file to be imported.
Specifies the UserName of the user to authenticate.
Specifies the password of the user to authenticate.
Specifies the group to which the user belongs. The default group is 'dba'
Specifies the Role of the User in teamcenter.
Specifies the server name to which the user wants to connect.
If the preference 'TC_BOM_Precision_Preference' on server is set to TRUE then this flag can be set to import precise assembly.
With this parameter user can perform 'DryRun' on documents to be imported.
With this parameter user can avoid/see the dialogs while performing operation.
Reserved for future use. Currently recommended to set this flag as 'false'.
With this parameter user can overwrite an existing file.
If any transaction fails then user can restart the transaction by setting this flag.
When this option is set to 'TRUE', the linked document(s) to be imported will not be traversed.
With this parameter the 'sub folders' will also be included while importing documents.
Folder UID which is targeted to import documents.
Description
Import unmanaged files to the server
Syntax
Visual Basic
Public Sub ImportDocumentsToServer( _
   ByVal lnumberOfDocumentsFoldersToImport As Long, _
   ByRef psalistOfFilesFoldersToImport() As Variant, _
   ByVal bstrUserName As String, _
   ByVal bstrPassword As String, _
   ByVal bstrGroup As String, _
   ByVal bstrUserRole As String, _
   ByVal bstrDBUrl As String, _
   ByVal bImportAsPrecise As Boolean, _
   Optional ByVal bPerformOnlyDryRun As Boolean = False, _
   Optional ByVal bDisplayAlert As Boolean = False, _
   Optional ByVal bIsFromATP As Boolean = False, _
   Optional ByVal bIsOverwrite As Boolean = False, _
   Optional ByVal brestart As Boolean = False, _
   Optional ByVal bLinkTraversal As Boolean = False, _
   Optional ByVal bIncludeSubFolders As Boolean = False, _
   Optional ByRef bstrFolderUID As String _
) 
Parameters
lnumberOfDocumentsFoldersToImport
The number of files and folders to be imported.
psalistOfFilesFoldersToImport
Name of the folder of a file to be imported.
bstrUserName
Specifies the UserName of the user to authenticate.
bstrPassword
Specifies the password of the user to authenticate.
bstrGroup
Specifies the group to which the user belongs. The default group is 'dba'
bstrUserRole
Specifies the Role of the User in teamcenter.
bstrDBUrl
Specifies the server name to which the user wants to connect.
bImportAsPrecise
If the preference 'TC_BOM_Precision_Preference' on server is set to TRUE then this flag can be set to import precise assembly.
bPerformOnlyDryRun
With this parameter user can perform 'DryRun' on documents to be imported.
bDisplayAlert
With this parameter user can avoid/see the dialogs while performing operation.
bIsFromATP
Reserved for future use. Currently recommended to set this flag as 'false'.
bIsOverwrite
With this parameter user can overwrite an existing file.
brestart
If any transaction fails then user can restart the transaction by setting this flag.
bLinkTraversal
When this option is set to 'TRUE', the linked document(s) to be imported will not be traversed.
bIncludeSubFolders
With this parameter the 'sub folders' will also be included while importing documents.
bstrFolderUID
Folder UID which is targeted to import documents.
Example
Option Explicit On

Sub Example()
    Dim objApplication As SolidEdgeFramework.Application
    Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
    Dim NumberOfDocumentsFoldersToImport As Long
    Dim ListOfDocumentsFoldersToImport(0) As Object
    Dim UserName As String
    Dim Password As String
    Dim Group As String
    Dim Role As String
    Dim DBURL As String
    Dim Precise As Boolean

    objApplication = GetObject(, "SolidEdge.Application")
    objTCE = objApplication.SolidEdgeTCE

    NumberOfDocumentsFoldersToImport = 1
    ListOfDocumentsFoldersToImport(0) = "D:\import"
    UserName = "username"
    Password = "password"
    Group = "Engineering"
    Role = "Designer"
    DBURL = "http://server:7001/tc"
    Precise = True

    Call objTCE.ImportDocumentsToServer(NumberOfDocumentsFoldersToImport, ListOfDocumentsFoldersToImport, UserName, Password, Group, Role, DBURL, Precise)

    If Not objApplication Is Nothing Then
        Call objApplication.Quit()
    End If

    objTCE = Nothing
    objApplication = Nothing
End Sub
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members  | Solid Edge ST - What's New