GetFromBriefcaseTree

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > RemoteAccess >

GetFromBriefcaseTree

Description

Get documents from the BriefCase.

Syntax

call DBWShell("GetFromBriefcaseTree zipFileName restoreProject restoreMode restoreDir okRestoreDB okRestoreProjects okCreateWorkingSet Silent")

Parameters

zipFileName

The BriefCase file to retrieve from

restoreProject

the project to restore documents in
this parameter depends on value 0 of parameter OkRestoreProjects

restoreMode

possible values are:
0: load all files in the same folder
1: load all files under a folder preserving their structure
this parameter depends on value 0 of the parameter okRestoreDB

restoreDir

a folder to load files in.
this parameter depends on value 1 of parameter restoreMode

okRestoreDB

possible values are:
0: unzip files only
1: unzip files and rebuild records and parent-child relations

okRestoreProjects

possible values are:
0: load documents in selected project
1: recreate project structure if not already existing
this parameter depends on value 1 of parameter okRestoreDB

okCreateWorkingSet

possible values are:
0: do not create a Working Set with loaded documents
1: Create a Working Set with loaded documents

Silent

to avoid asking confirmation
0: Ask confirmation (default)
1: Do not ask confirmation

See also

PutInBriefcaseTree command

Example

Call DBWShell ("GetFromBriefCaseTree " & _

  replace(BcFilename," ","|") & " " & _
  replace(choosed_project," ","|") & " " &_
  restoreMode & " " & _
  replace(restorepath," ","|") & " " &_
  restoreDBMode & " " &_
  restoreProjectsMode & " " &_
  okCreateWorkingSet & _
  Silent )

Remarks

The DBWResult(“@EXIT_CODE”) contains a value that helps in determining the cause of the exit from the API

Here below is the list of the exit codes:

Exit code

Description

0

no errors

1

MDB not supported

2

Root Directory must have a drive letter

3

ZIP file does not exist

4

Briefcase function needs DBWorks Enterprise

5

Remote Access not activated

6

Briefcase function can't be used when working with Remote Access Local Mode

7

Briefcase has no files

8

Error copying files in temporary SCHEMA folder

9

Error starting Briefcase MDB database

10

PARENT_CHILD structure in MDB is not compatible with PARENT_CHILD structure in target database

11

Answered NO to question: Briefcase does not contain any record marked with your COMPANY_ID - Continue ?

12

Briefcase has no records

13

Button CANCEL has been pressed in the Document Selector form for selecting documents to be imported

14

Answered NO to question: Files overwriting proprietary files have been discarded - Continue ?

15

Answered NO to question: Importing the Briefcase will create duplicated IDs - Continue ?

16

Error creating new file directory

17

Answered NO to question: Local files are newer than Briefcase files - Do you want to overwrite them ?

18

Failed to create backup copy ( if a backup folder is assigned ) of existing target files

19

Answered ABORT to question: Error getting the Unique Id of the record of file - Retry / Abort ?

20

Target file is now writeable

21

Answered CANCEL to question: Target file is now writeable - Retry / Cancel ?

22

Failed to copy briefcase file to target file

23

Failed to created state dependent file copies when working in Local Checkout Mode

24

Button CANCEL has been pressed in the Document Selector form for deleting the orphan records from target db

25

Unable to open log file for file copy errors checking

26

Different time stamps between briefcase file and main archive file

27

Button CANCEL has been pressed while populating the orphan documents selector form

Example

DBWShell("GetFromBriefcaseTree ...")

exitCode = DBWResult(“@EXIT_CODE”)
if exitCode = 13 then
 'user pressed CANCEL to the briefcase document selector form
end if