hexagon logo

Extract dimension ID to custom TXT file

Hello,
I'm new in the forum. I am not skillful with the controls of the script, so I need your help.
My goal is export dimension ID to txt file. Inside the program I execute several parts (LOOP command), so the export data should be like array elements of dimension data. I wish the LOC1 variable should be as assign value.

DIM LOC1= LOCATION OF CIRCLE CIR2 UNITS=MM ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX MEAS NOMINAL DEV +TOL -TOL OUTTOL
X -12.4751 -12.5000 0.0249 0.0500 -0.0500 0.0000 -----#--
Z -22.5030 -22.5000 -0.0030 0.0500 -0.0500 0.0000 ---#----
END OF DIMENSION LOC1

ASSIGN\V1 = ???? Id (ID-2),0
FPTR =FILE/OPEN,V1,APPEND
FILE/WRITELINE,FPTR,"Mera kosa " + STEVEC + "," + V1.X.MEAS + V1.Z.MEAS + V1.D.MEAS

that should be result:

LOC1[1] AX:X, 12.500000, 0.050000, -0.050000, 12.475100, 0.024900, 0.000000
LOC1[1] AX:Z, 22.500000, 0.050000, -0.050000, 22.503000, 0.003000, 0.000000
LOC1[2] AX:X
LOC1[2] AX:Z
LOC1[3] AX:X
LOC1[3] AX:Z
......

I get the number data from program using LOC1.X.MEAS, but on my sorrow, I can't extract LOC1 information from the record.

Can you help me with script code inside the program.


Parents Reply Children
No Data