|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > RemoteAccess > Download |
With the Remote Access Mode enabled, downloads the foreign document file with the assigned unique id.
call DBWShell("Download UniqueID ["REFRESH"|"CHECK"|"QUICKCHECK" [OkDownloadZipFile]] ")
UniqueID |
unique id of the document to download. |
|---|---|
"REFRESH" |
Optional. A check on the dates is made and if the remote file date if newer than the local file date the download is performed. |
"CHECK" |
Optional. A check on the dates is made and if the remote file date if newer than the local file date the result values will be available. |
"QUICKCHECK" |
Optional. Sets the @OKDOWNLOAD output parameter; see below for details. |
OkDownloadZipFile |
Optional. |
case "REFRESH"
@OKDOWNLOAD |
0: no download |
case "CHECK"
@OKDOWNLOAD |
0: remote is older than local |
|---|---|
@REMOTE_FILE_SIZE |
<size> the remote file size that should be downloaded |
case "QUICKCHECK"
@OKDOWNLOAD |
1: if the file is obsolete compared to the LAST_MODIFIED_FILE_DATE value in the database |
|---|---|
@REMOTE_FILE_SIZE |
it is always 0, since no access is done on the remote file |
Error codes are returned through the variable @ERROR_CODE
errorCode = DBWResult("@ERROR_CODE")
after executing the command, check the value of okDBW variable, if FALSE:
•case DBWShell("Download")
errorCode |
meaning |
|---|---|
0 |
no error (everything ok) |
1 |
same company ID |
2 |
unable to get remote path |
4 |
unable to create path on local server |
5 |
unable to create Remote Access Log entry |
6 |
unable to copy remotePath on localPath |
7 |
unable to copy master drawings |
9 |
local file overwrite risk, please check configuration records |
10 |
used out of this shell command |
11 |
remote access is not enabled |
•case DBWShell("Download CHECK")
errorCode |
meaning |
|---|---|
0 |
no error (everything ok) |
1 |
unable to get remote path from DBW_COMPANY_INFO table |
2 |
remote file does not exist |
3 |
local file does not exist |
4 |
unable to access remote path |
5 |
remote access is not enabled |
•case DBWShell("Download QUICKCHECK")
errorCode |
meaning |
|---|---|
0 |
no error (everything ok) |
100 |
the DBW_TIME_ZONE_OFFSET is not declared in the database |
200 |
the document is not a foreign document |
call DBWShell ("Download 28 CHECK")
if not okDBW then
errorCode = DBWResult("@ERROR_CODE")
DBWMsgBox "Error:" & errorCode
end if
DBWShell("Download 1234567 0 1")