Opening Multiple File with Incremental Name

From ArcoWiki
Jump to: navigation, search

This example show how to create an series of different output files in a specific folder using incremental names.

$$ Creates a Dummy Point

F(q)=FEAT/POINT,CART,00,0,0,0,0,1
FA(q)=FEAT/POINT,CART,00,0,0,0,0,1

$$ Define some tolerance

T(CORTOL_1)=TOL/CORTOL,XAXIS,-0.1000,0.1000
T(CORTOL_2)=TOL/CORTOL,YAXIS,-0.1000,0.1000
T(CORTOL_3)=TOL/CORTOL,ZAXIS,-0.1000,0.1000

$$ Declare the files: ??? is the symbol for incremental files

DID(uno)=DEVICE/INCR,'C:\uno_???.MEA'
DID(due)=DEVICE/INCR,'C:\due_???.HTM'
DID(tre)=DEVICE/INCR,'C:\tre_???'

$$ Little loop to create multiple file

(III)
OPEN/DID(UNO),FDATA,V(TEXT),OUTPUT,OVERWR
OPEN/DID(due),FDATA,V(HTML),OUTPUT,APPEND
OPEN/DID(TRE),FDATA,V(SPCLIGHT),OUTPUT,OVERWR
OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)
CLOSE/DD(UNO)
CLOSE/DID(DUE)
CLOSE/DID(TRE)
JUMPTO/(III)