hexagon logo

incorporating excel to make part programs

Hello everyone. I would like to know if it is possible to use excel (or some program like it) to help quickly write a program to measure cylindrical parts. The parts consist of 9 ODs and IDs that are concentric to one another. Most of the parts I need to measure are somewhat like this and I aim to write the programs as quick as possible in off-line mode. Quickly because my time-frame is limited and off-line because I have a lot of distractions at the office that doesn't help me get focused on completing the programs. So, does anyone have any suggestions to offer me? I have developed simple excel sheets to give me points in the past to help me write programs, but that involves a lot of manual editing of X,Y,Z,I,J,Ks. My initial thought was to find a way to incorporate excel or use copy and paste with pattern. I have used copy and paste with pattern with some success and I have not been able to figure out how to incorporate excel. Can someone 'point me in the right direction' so I can get closer to my goal? Thank you for your time and I would appreciate to hear any ideas that I can 'mull' over. Have a great day! By the way, I do have access to IGS and STP files.
Parents
  • Not sure if this is any help but I will try our cad cam guy wrote a post for NX7.5 that when he creates a drilling path it out puts a simple text file containing xyz ijk coordinates and vectors (cad co-ordinate and pcdmis co-ordinates have to match)
    I then simply read in this text file and that supplies all the nominal data for driving the probe. the first part of this supplies data for driving the probe the second part is for tolerancing
    "V1 =FILE/EXISTS,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_01.TXT
    IF/V1
    FPTR =FILE/OPEN,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_01.txt,READ
    DO/
    V2 =FILE/READLINE,FPTR,{VARX} + "," + {VARY} + "," + {VARZ} + "," + {VARI} + "," + {VARJ} + "," + {VARK}
    ASSIGN/HOLEX=VARX
    ASSIGN/HOLEY=VARY
    ASSIGN/HOLEZ=VARZ
    ASSIGN/HOLEI=VARI
    ASSIGN/HOLEJ=VARJ
    ASSIGN/HOLEK=VARK
    SECT_AJ_HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
    THEO/<HOLEX,HOLEY,HOLEZ>,<HOLEI,HOLEJ,HOLEK>,9.475
    ACTL/<-147.5,-22.702,1.096>,<-0.0383997,-0.0365997,0.998592>,9.475
    TARG/<HOLEX,HOLEY,HOLEZ>,<HOLEI,HOLEJ,HOLEK>
    START ANG=0,END ANG=360
    ANGLE VEC=<1,0,0>
    DIRECTION=CCW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=6,DEPTH=0.8,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=3,SPACER=2
    AVOIDANCE MOVE=BOTH,DISTANCE=25
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    UNTIL/V2=="EOF"
    FILE/CLOSE,FPTR,KEEP
    END_IF/"
    "
    COMMENT/REPT,
    *****************************************************
    DIAMETER AND POSITION OF THE FIFTY FOUR 9.475mm HOLES
    *****************************************************
    MOVE/POINT,NORMAL,<0.000,0.000,100.000>
    ASSIGN/COUNT=0
    V3 =FILE/EXISTS,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_ALIGNS_01.TXT
    IF/V3
    FPTR =FILE/OPEN,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_ALIGNS_01.txt,READ
    DO/
    V4 =FILE/READLINE,FPTR,{VARX1} + "," + {VARY1} + "," + {VARZ1} + "," + {VARA1} + "," + {VARA2}
    ASSIGN/ALIGNX=VARX1
    ASSIGN/ALIGNY=VARY1
    ASSIGN/ALIGNZ=VARZ1
    ASSIGN/ALIGNI=VARA1
    ASSIGN/ALIGNJ=VARA2
    COMMENT/REPT,
    "HOLE AT 'X' COORD "+ ALIGNX
    COMMENT/REPT,
    "HOLE AT 'Y' COORD "+ ALIGNY
    AJ_ALIGNS =ALIGNMENT/START,RECALL:ABC_ALIGN,LIST=YES
    ALIGNMENT/TRANS_OFFSET,XAXIS,VARX1
    ALIGNMENT/TRANS_OFFSET,YAXIS,VARY1
    ALIGNMENT/TRANS_OFFSET,ZAXIS,VARZ1
    ALIGNMENT/ROTATE_OFFSET,VARA1,ABOUT,XPLUS
    ALIGNMENT/ROTATE_OFFSET,VARA2,ABOUT,YPLUS
    ALIGNMENT/END
    DIM LOC1= POSITION OF CIRCLE SECT_AJ_HOLE[COUNT+1] UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH FIT TO DATUMS=OFF DEV PERPEN CENTERLINE=OFF DISPLAY=DIAMETER
    AX NOMINAL +TOL -TOL BONUS MEAS DEV OUTTOL
    X 0.000 0.000 0.000
    Y 0.000 0.000 0.000
    DF 9.475 0.025 0.025 0.025 9.475 0.000 0.000 ----#----
    TP MMC 0.100 0.025 0.000 0.000 0.000 #--------
    END OF DIMENSION LOC1
    COMMENT/REPT,
    ************************************************************************
    ASSIGN/COUNT=COUNT+1
    WORKPLANE/ZPLUS
    UNTIL/V4=="EOF"
    FILE/CLOSE,FPTR,KEEP"
    I hope this might point you in a general direction the code below is a sample of the text file it is reading
    "-147.50 ,22.70157 ,1.096379 ,-2.098 ,-2.201
    -122.50 ,59.42008 ,-.36795 ,-5.49 ,-2.201
    -85.00 ,84.59342 ,-1.85354 ,-7.81 ,-2.201
    -43.00 ,99.87403 ,-2.50418 ,-9.208 ,-2.201
    0 ,104.7207 ,-1.61513 ,-9.633 ,-2.201
    40 ,104.9787 ,-.09507 ,-9.633 ,-2.201"
Reply
  • Not sure if this is any help but I will try our cad cam guy wrote a post for NX7.5 that when he creates a drilling path it out puts a simple text file containing xyz ijk coordinates and vectors (cad co-ordinate and pcdmis co-ordinates have to match)
    I then simply read in this text file and that supplies all the nominal data for driving the probe. the first part of this supplies data for driving the probe the second part is for tolerancing
    "V1 =FILE/EXISTS,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_01.TXT
    IF/V1
    FPTR =FILE/OPEN,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_01.txt,READ
    DO/
    V2 =FILE/READLINE,FPTR,{VARX} + "," + {VARY} + "," + {VARZ} + "," + {VARI} + "," + {VARJ} + "," + {VARK}
    ASSIGN/HOLEX=VARX
    ASSIGN/HOLEY=VARY
    ASSIGN/HOLEZ=VARZ
    ASSIGN/HOLEI=VARI
    ASSIGN/HOLEJ=VARJ
    ASSIGN/HOLEK=VARK
    SECT_AJ_HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
    THEO/<HOLEX,HOLEY,HOLEZ>,<HOLEI,HOLEJ,HOLEK>,9.475
    ACTL/<-147.5,-22.702,1.096>,<-0.0383997,-0.0365997,0.998592>,9.475
    TARG/<HOLEX,HOLEY,HOLEZ>,<HOLEI,HOLEJ,HOLEK>
    START ANG=0,END ANG=360
    ANGLE VEC=<1,0,0>
    DIRECTION=CCW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=6,DEPTH=0.8,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=3,SPACER=2
    AVOIDANCE MOVE=BOTH,DISTANCE=25
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    UNTIL/V2=="EOF"
    FILE/CLOSE,FPTR,KEEP
    END_IF/"
    "
    COMMENT/REPT,
    *****************************************************
    DIAMETER AND POSITION OF THE FIFTY FOUR 9.475mm HOLES
    *****************************************************
    MOVE/POINT,NORMAL,<0.000,0.000,100.000>
    ASSIGN/COUNT=0
    V3 =FILE/EXISTS,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_ALIGNS_01.TXT
    IF/V3
    FPTR =FILE/OPEN,U:\CMM_INSPECT\NON BRISTOL\BRR\BRR40672\SPLCMM_ALIGNS_01.txt,READ
    DO/
    V4 =FILE/READLINE,FPTR,{VARX1} + "," + {VARY1} + "," + {VARZ1} + "," + {VARA1} + "," + {VARA2}
    ASSIGN/ALIGNX=VARX1
    ASSIGN/ALIGNY=VARY1
    ASSIGN/ALIGNZ=VARZ1
    ASSIGN/ALIGNI=VARA1
    ASSIGN/ALIGNJ=VARA2
    COMMENT/REPT,
    "HOLE AT 'X' COORD "+ ALIGNX
    COMMENT/REPT,
    "HOLE AT 'Y' COORD "+ ALIGNY
    AJ_ALIGNS =ALIGNMENT/START,RECALL:ABC_ALIGN,LIST=YES
    ALIGNMENT/TRANS_OFFSET,XAXIS,VARX1
    ALIGNMENT/TRANS_OFFSET,YAXIS,VARY1
    ALIGNMENT/TRANS_OFFSET,ZAXIS,VARZ1
    ALIGNMENT/ROTATE_OFFSET,VARA1,ABOUT,XPLUS
    ALIGNMENT/ROTATE_OFFSET,VARA2,ABOUT,YPLUS
    ALIGNMENT/END
    DIM LOC1= POSITION OF CIRCLE SECT_AJ_HOLE[COUNT+1] UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH FIT TO DATUMS=OFF DEV PERPEN CENTERLINE=OFF DISPLAY=DIAMETER
    AX NOMINAL +TOL -TOL BONUS MEAS DEV OUTTOL
    X 0.000 0.000 0.000
    Y 0.000 0.000 0.000
    DF 9.475 0.025 0.025 0.025 9.475 0.000 0.000 ----#----
    TP MMC 0.100 0.025 0.000 0.000 0.000 #--------
    END OF DIMENSION LOC1
    COMMENT/REPT,
    ************************************************************************
    ASSIGN/COUNT=COUNT+1
    WORKPLANE/ZPLUS
    UNTIL/V4=="EOF"
    FILE/CLOSE,FPTR,KEEP"
    I hope this might point you in a general direction the code below is a sample of the text file it is reading
    "-147.50 ,22.70157 ,1.096379 ,-2.098 ,-2.201
    -122.50 ,59.42008 ,-.36795 ,-5.49 ,-2.201
    -85.00 ,84.59342 ,-1.85354 ,-7.81 ,-2.201
    -43.00 ,99.87403 ,-2.50418 ,-9.208 ,-2.201
    0 ,104.7207 ,-1.61513 ,-9.633 ,-2.201
    40 ,104.9787 ,-.09507 ,-9.633 ,-2.201"
Children
No Data