hexagon logo

GeoTol Axis Data Extraction

Is there a way to pull the data from the axis measurements in Geometric Tolerances? I cannot seem to find the correct method to get that data. Is it possible?

Parents
  • Hi,

    your MID() function looks odd


    Mid Function
    string = Mid(strgvar,begin,length)


    if the ",length" parameter is not passed then it takes the total length of the string
    that means the code you wrote passes the text starting from position 13 to the end.


    ################################################## #########################
    I now assume that the line length is always exactly 13 characters (I can hardly test that):
    ASSIGN/V_LINE_1=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),1,13))
    ASSIGN/V_LINE_2=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),14,13))
    ASSIGN/V_LINE_3=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),27,13))
    so on
    



    ################################################## #########################
    The problem with that is that you should test whether the line is empty.
    because you can turn the lines off and on​.
    preferably with a loop

    ASSIGN/VLINECOUNT = -1
    ASSIGN/VLINETEXT[0] = "test"
    DO/
    ASSIGN/VLINECOUNT = VLINECOUNT + 1
    ASSIGN/VLINETEXT[VLINECOUNT]=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),(V LINECOUNT*13)+1,13))
    UNTIL/COUNTER==(VLINETEXT[VLINECOUNT]="") OR (LEN(VLINETEXT[VLINECOUNT])<13)​


    ################################################## #########################
    sorry i didn't test this on a machine, just wrote it out from my head. It should work something like this, I'll test it later when I have time
Reply
  • Hi,

    your MID() function looks odd


    Mid Function
    string = Mid(strgvar,begin,length)


    if the ",length" parameter is not passed then it takes the total length of the string
    that means the code you wrote passes the text starting from position 13 to the end.


    ################################################## #########################
    I now assume that the line length is always exactly 13 characters (I can hardly test that):
    ASSIGN/V_LINE_1=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),1,13))
    ASSIGN/V_LINE_2=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),14,13))
    ASSIGN/V_LINE_3=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),27,13))
    so on
    



    ################################################## #########################
    The problem with that is that you should test whether the line is empty.
    because you can turn the lines off and on​.
    preferably with a loop

    ASSIGN/VLINECOUNT = -1
    ASSIGN/VLINETEXT[0] = "test"
    DO/
    ASSIGN/VLINECOUNT = VLINECOUNT + 1
    ASSIGN/VLINETEXT[VLINECOUNT]=DOUBLE(MID(GETTEXTEX(1133,1,"SEG=1","FCFLOC1"),(V LINECOUNT*13)+1,13))
    UNTIL/COUNTER==(VLINETEXT[VLINECOUNT]="") OR (LEN(VLINETEXT[VLINECOUNT])<13)​


    ################################################## #########################
    sorry i didn't test this on a machine, just wrote it out from my head. It should work something like this, I'll test it later when I have time
Children
No Data