hexagon logo

Assigning a variable from a variable assignment

Hello I would like to do something like the following but I cannot get it to work and coffee has still to hit my this Friday morning:

Assign - Counter=1
Assign - V1=1
Assign - VCALL="V"+Counter

Now, I would like for VCALL to take the value of 1 instead of the string "V1". Keep in mind that this is a super simplified example but should give the idea of what I am after. I tried these pointer brackets {} but they don't seem to work. Creating a function does not seem to work either. I am getting a string with the name of the variable instead of the value in the variable :S

Any help here guys please?
  • Are you trying to do this, where I have a feature taking X and Y coordinates out of variables, which I change (at the end) during loops so that the feature has different values each run?
    (please ignore that this is pretty bad in the actual machine measurement part, I deleted 90 percent of the program to get the variable stuff with one measure and an output, this isn't the complete program)

    STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
    ALIGNMENT/END
    MODE/MANUAL
    FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;MEAS,NOM,TOL,DEV,OUTTOL, ,
    LOADPROBE/1X20X20
    TIP/T1A0B0, SHANKIJK=0, -0.0002, 1, ANGLE=3.3706
    TOUCHSPEED/ 1.75
    MOVESPEED/ 265
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
    Place 25pc fixture on CMM.
    
    The plate bolts into F8 and P8.
    
    If you use risers to get above the lang, use support
    risers as possible (they will NOT be able to be screwed
    into, this plate does not match the 6 hole mounting
    pattern on the fixture).
    
    Load the parts on the fixture, starting in the near left
    position and filling columns back.
    
    When a column is full, start the next column.
    
    The program will stop by trying to check a part that isn't
    present. If you do not load properly and the fixture isn't
    full, it will stop early.
    
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
    Measure a single hit on -A- of any of the parts.
    PNT41 =FEAT/POINT,CARTESIAN
    THEO/<10.0188,9.4273,-22.3365>,<0,0,1>
    ACTL/<16.0169,18.5042,-23.3603>,<0,0,1>
    MEAS/POINT,1,WORKPLANE
    HIT/BASIC,NORMAL,<10.0188,9.4273,-22.3365>,<0,0,1>,<16.0169,18.5042,-23.3603>,USE THEO=YES
    ENDMEAS/
    ASSIGN/VZLOC=PNT41.Z
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
    Lift the probe above the part for DCC inspection.
    ASSIGN/VCOL=0
    ASSIGN/VROW=0
    MODE/DCC
    RECYCLE =LABEL/
    RECALL/ALIGNMENT,INTERNAL,STARTUP
    FIX_ROT =GENERIC/LINE,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<0+0,0+0,0+0>,$
    MEAS/XYZ,<0+0,0+0,0+0>,$
    NOM/IJK,<1,0,0>,$
    MEAS/IJK,<1,0,0>,$
    DISTANCE/0.4,0.4
    FIX_POS =GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<0+0,0+0,0+0>,$
    MEAS/XYZ,<3.787+3*VCOL,6.292+3*VROW,VZLOC>,$
    NOM/IJK,<0,0,1>,$
    MEAS/IJK,<0,0,1>
    ALN_FIX =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
    ALIGNMENT/TRANS,XAXIS,FIX_POS
    ALIGNMENT/TRANS,YAXIS,FIX_POS
    ALIGNMENT/TRANS,ZAXIS,FIX_POS
    ALIGNMENT/END
    CIR2 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
    THEO/<-0.566,-0.92,0.895>,<0,0,1>,0.5,0
    ACTL/<-0.5702,-0.9212,0.8914>,<0,0,1>,0.4925,0
    TARG/<-0.566,-0.92,0.895>,<0,0,1>
    START ANG=90,END ANG=270
    ANGLE VEC=<1,0,0>
    DIRECTION=CCW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=7,DEPTH=0,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=0,SPACER=0
    AVOIDANCE MOVE=NO
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    CIR3 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
    THEO/<-0.566,-0.92,1.066>,<0,0,1>,0.5,0
    ACTL/<-0.5736,-0.9212,1.0624>,<0,0,1>,0.4863,0
    TARG/<-0.566,-0.92,1.066>,<0,0,1>
    START ANG=310,END ANG=229
    ANGLE VEC=<0,-1,0>
    DIRECTION=CW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=5,DEPTH=0,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=0,SPACER=0
    AVOIDANCE MOVE=NO
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    CIR4 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
    THEO/<-0.566,-0.92,1.2325>,<0,0,1>,0.5,0
    ACTL/<-0.5703,-0.9199,1.2289>,<0,0,1>,0.4935,0
    TARG/<-0.566,-0.92,1.2325>,<0,0,1>
    START ANG=90,END ANG=270
    ANGLE VEC=<1,0,0>
    DIRECTION=CCW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=7,DEPTH=0,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=0,SPACER=0
    AVOIDANCE MOVE=NO
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    CYL1 =FEAT/CYLINDER,CARTESIAN,IN,LEAST_SQR,YES
    THEO/<-0.566,-0.92,1.0638>,<0,0,1>,0.5,0.3375
    ACTL/<-0.5711,-0.9206,1.06>,<-0.0015339,0.0025842,0.9999955>,0.4919,0.3385
    CONSTR/CYLINDER,BF,CIR2.HIT[4..7],CIR3.HIT[1..3],CIR4.HIT[4..7],,
    N53 =GEOMETRIC_TOLERANCE/STANDARD=ASME Y14.5,SHOWEXPANDED=YES,
    DATUM_MATH=LSQ,DISPLAY_COORDS=DRF,
    UNITS=IN,OUTPUT=BOTH,ARROWDENSITY=100,
    SEGMENT_1,PROFILE_SURFACE,0.01,__,__,A,__,B,__,C,_ _,
    TEXT=OFF,CADGRAPH=ON,REPORTGRAPH=OFF,MULT=10,
    MEASURED:
    CYL1:0.0072,
    ADD
    DATUMS/REPORTDATUMSIZE=OFF,
    A(CYL_A):NOM=0.3743,+Tol=0.0004,-Tol=0.0004,
    FEATURES/CYL1,,
    ANALYSISVIEW/,
    FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;MEAS,NOM,TOL,DEV,OUTTOL, ,
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=OFF,AUTO=1,AUTO OPEN=OFF,$
    TO_PRINTER=ON,COPIES=1,$
    TO_DMIS_REPORT=ON,FILE_OPTION=INDEX,FILENAME=,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=DELETE_INSTANCES
    IF/VROW<4
    ASSIGN/VROW=VROW + 1
    END_IF/
    ELSE/
    ASSIGN/VCOL=VCOL+1
    ASSIGN/VROW=0
    END_ELSE/
    IF_GOTO/VCOL==5,GOTO = DUMPOUT
    GOTO/RECYCLE
    DUMPOUT =LABEL/​​