User is still in Project after nightly RVM Export

Hello, everyone, I have a problem with the RVM night export. The export runs without any problems, unfortunately the user is still in the project after the macro has run through. The macro ends with "finish". Actually, the user should no longer exist in the project afterwards. Is there another way to log the user out of the project?

  • in your macro files after "export finish" try to add "quit"

  • Hi Adak,

    good idea but it is not running!


    --
    -- !folders[1] = 'C:\atmp\NIGHT_SHIFT\DatabaseCheck\'
    -- !folders[2] = 'C:\atmp\NIGHT_SHIFT\PipingCheck\'
    --
    -- !folders[4] = 'C:\atmp\NIGHT_SHIFT\Clashes\'
    --
    -- do !x from 1 to !folders.Size()
    --
    -- !fo = object file('$!folders[$!x]')
    -- if (!fo.Exists().Not()) then
    --!comm = |SYSCOM 'MKDIR $!folders[$!x]'|
    --$!comm
    --endif
    --Enddo

    !b = object DATETIME()
    q var !b
    !year = !b.year()
    !Month = !b.Month()
    !day = !b.date()


    var !AKTProjekt evar projekt
    q var !AktProjekt
    var !AktDatal evar DATAL
    q var !AktDatal
    var !StatusName evar 'StatusName'
    var !Logfile evar Logfile
    q var !Logfile
    q evar modul

    DESIGN
    --MODEL
    --Create RVM file
    !folders[3] = '\\dieffenbacher.intra\dse\ProE\AVEVA\AVEVA_PLM\NavisWorks\'

    VAR !projcode PROJ CODE
    VAR !projname PROJ ID
    !revFile = object file('$!folders[3]' + '$!year$!Month$!day' + '_' + '$!projcode' + '_' + '$!projname' + '_model.rvm')
    --!revFile = object file('$!folders[3]' + 'AGL' + '_model.rvm')
    --run export command
    EXPORT REPRESENTATION ON
    Representation insu on translucency 95
    EXPORT FILE /$!revFile OVER

    EXPORT AUTOCOLOUR RESET
    EXPORT AUTOCOLOUR ON
    EXPORT AUTOCOLOUR DISPLAYEXPORT ON

    --export autocolour displayexport off

    --alp log /c:\temp\rvmexport.log
    --!fileRULES = object file('K:\AVEVA\ADMIN\RVM_NIGHT_EXPORT\scDesignExportRuleSetExampleTest.xml')
    --!lines = !filerules.readfile(99999)
    --!filerules.close()
    --
    -- do !rule values !lines
    -- !colour = !rule.split(' ').last()
    -- !test = !colour.real()
    -- handle any
    -- var !num colour number $!colour
    -- !rule = !rule.replace(!colour,!num)
    -- endhandle
    -- $!rule
    -- handle any
    -- $P $!!error.text : $!rule
    -- endhandle
    -- enddo
    --

    EXPORT HOLES ON
    EXPORT REPRE ON
    ----REPRESENTATION LEVEL BRAN 7
    !sRulec = 'C:\Users\Public\Documents\AVEVA\USERDATA\RULEC-ExportNavisWorks.txt'
    -- !sRulec = 'C:\temp\RULEC-ExportNavisWorks.txt'
    $p $!sRulec
    !oRulec = object FILE(!sRulec)
    $p !oRulec
    !lines = !oRulec.readFile()
    $p $!lines
    do !line from 2 to !lines.size()
    if(!lines[!line].replace(' ',' ').replace(' ',' ').length() ne 1)then
    !scope = !lines[!line].part(2,'\')
    !color = !lines[!line].part(3,'\')
    !expres = 'export autocolour ' + !scope + ' colour ' + !color
    $!expres
    $P $!expres
    endif
    enddo


    EXPORT all zone with ( ( :RVM-EXPORT of zone eq 'TRUE') )
    EXPORT all GRIDWL with ( ( :RVM-EXPORT of GRIDWL eq 'TRUE') )

    EXPORT FINISH


    --alp log end
    !output = object file ('$!StatusName')
    !output.open('WRITE')
    !output.writeRecord('Projekt wurde gewartet')
    !output.close()

    quit
    --ping -n 20 localhost

    finish

  • could you please check tty mode instead of schedule tasks.You are running night routines by schedule tasks?

  • Hi,

    i try it in tty, but the same issue.

    If i put the script in to the Comand it runs. I start the Macro via batch at the moment and not via shedule task.