Your Products have been synced, click here to refresh
SUBROUTINE/OUTPUT1, EXCELPOS = : EXCEL CELL, VALUE = : VALUE, = FPTR =FILE/OPEN,C:\CMM\Subroutines\Stuff,APPEND ASSIGN/RITEVAL=CONCAT(EXCELPOS,",",STR(VALUE)) FILE/WRITELINE,FPTR,RITEVAL FILE/CLOSE,FPTR,KEEP ENDSUB
CIR1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<2.9237,0.1703,2.7565>,<0,0,1>,0.46 ACTL/<2.9237,0.1703,2.7565>,<0,0,1>,0.46 TARG/<2.9237,0.1703,2.7565>,<0,0,1> START ANG=3.3333,END ANG=183.3333 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES NUMHITS=3,DEPTH=0.1968,PITCH=0 SAMPLE METHOD=SAMPLE_HITS SAMPLE HITS=0,SPACER=0 AVOIDANCE MOVE=NO,DISTANCE=0.3937 FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO SHOW HITS=NO CS1 =CALLSUB/OUTPUT1,C:\CMM\Subroutines\Wimpies_Subs_Inch.PRG:"G10" ,STR(CIR1.D)
You might be able to achieve what you're after if your data is in .csv format, it depends on what you are trying to do. Have you looked at the Excel Form Report Command?
Here is a recent post that had a full script for opening an Excel file and adding measurement data to it.
I was only able to get the data into the first column, not a specific cell. Your might want to consider writing to a CSV (Comma Separated Value) file and then inside a blank Excel worksheet, import the CSV file into different columns / rows (from Excel's ribbon, choose Data, then From Text/CSV).
Something like this may be easy, then all you need to do is write a quick macro in Excel that reads the cell then enters the value from the file. There are a lot of ways you can go with this, but this seems simple enough to start from and use in programs.
Writing to specific cells, you're going to have to do so with a script. I probably went the hard way because I didn't know (and still don't know much) about VB.
I wrote it to a CSV, then used a script to convert it to an Excel format. Then copied the cells from that Excel into a dedicated, network-based Excel document for all to see.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |