Help with code to export RVM file to the network

Hi all PML Gurus,

What I'm trying to achive is nothing new on PDMS/E3D world. What I want is to extract one RVM file during night using windows scheduler task running one E3D batch file.

I have done/copy/modify this code. Some parts aree from here on the forum others over the Internet:

-----------------------------------------------------------------------------------------------------------------------------------------------------------

-- Date Definition
!date = object DateTime()
!month = !date.Month()

VAR !clock CLOCK
VAR !clockdetail split('$!Clock')
VAR !clocktime replace(!clockdetail[4], ':','-')

!year = !clockdetail[3].string()
!monthnew = !month.string()
!day = !clockdetail[1].string()
!time = vtext(!clocktime)

!fileclock = !year + '-' + !monthnew + '-' + !day + '_' + !time

-- Get project ID
VAR !projID PROJ ID

DESIGN

MAP BUILD MDB
HANDLE (69,97)
ENDHANDLE

!!reviewpath = object FILE('\\MAINsvr1\PROJETS\CLIENT\0270\3D Revue\RVM\' + '$!projID' + '_' + '$!fileclock' + '.rvm')

WRITE ('Building RVM export list for project $!projID ...')

VAR !SITES COLLECT ALL SITE WITH MATCHWILD (NAME OF SITE, '*Zone5*' )

repre lev 6
repre lev pipe 6
repre lev nozz 6
repre lev struc 6
repre tube on
export repr on
export file/$!!reviewpath
export filenote ''
repre snode off
repre pnode off
repre pline pkey off
export encoding UTFEight
export holes on

export autocolour ALL WITH MATCHWI(NAME OF SITE, '*PIPE*') colour 3

DO !UNSITE VALUES !SITES
export $!UNSITE
ENDDO

export finish

FINISH

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Runing this code with the path variable !!reviewpath set to the local computer !!reviewpath = object FILE('C:\TEMP\' + '$!projID' + '_' + '$!fileclock' + '.rvm'), the code works perfect.

The problem is when I try to write the RVM file to the server. I have try different path configuration, direct path to the server. I have Maped the server on windows explorer with a letter M:, but none of them work. If I test this paths on windows explorer and they work and send me to the specific folder. I have also read and write premissions to the folder.

!!reviewpath = object FILE('\\MAINsvr1\PROJETS\CLIENT\0270\3D Revue\RVM\' + '$!projID' + '_' + '$!fileclock' + '.rvm') - Using path with direct access to the server

!!reviewpath = object FILE('M:\MAINsvr1\PROJETS\CLIENT\0270\3D Revue\RVM\' + '$!projID' + '_' + '$!fileclock' + '.rvm') - Using path maped on windows with letter M:

When I run the code with this paths I get always this error:

The error states: "...name must begin with letter", but I think I have done that mapping the server with the letter M:.

I have also try different configurations but none of them have worked.

Any idea what I'm doing wrong?

Thanks for the help.

Regards,

ARamos

 

Parents Reply Children
No Data