Creating a Timestamp

From ArcoWiki
Revision as of 12:52, 4 August 2016 by Admin (talk | contribs) (Created page with "This is used to create a unique '''timestamp''' inside a part program. Typically can be used to identify each execution/report with a unique file name. <code><span style="col...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is used to create a unique timestamp inside a part program. Typically can be used to identify each execution/report with a unique file name.

$$Begin Example…

DECL/CHAR,100, time_stamp
DECL/CHAR,200, STR3
DECL/CHAR,200, STR2

$$Assign the time_stamp

time_stamp = ASSIGN/ STIMESTAMP()

$$ Read the report folder of ARCO

STR2=ASSIGN/GETENV('ARCOREPORTFOLDER')

$$Create a Unique file name with time stamp at the end of the name

STR3=ASSIGN/CONCAT(str2,'output_',time_stamp,'.mea')

$$Create Dummy Point and Tolerances

F(q)=FEAT/POINT,CART,00,0,0,0,0,1
FA(q)=FEAT/POINT,CART,00,0,0,0,0,1
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

$$Build the output

DID(OUT_FILE)=DEVICE/STOR,STR3
OPEN/DID(OUT_FILE),FDATA,V(TEXT),OUTPUT,OVERWR
OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)
CLOSE/DID(OUT_FILE)