Get Op Tool Path

From Macros Wiki
Jump to: navigation, search
check part_open, "You must have a part open to run this macro"
local i, inum, iop
get_op_list 1  !    get list of selected ops
if inum<1 then stop "Please select an operation"
!    create a file open dialog
!    -------------------------
file_dialog_new "Select output filename"
file_dialog_extension "Text files (*.txt)", "txt"
file_dialog_extension "All files (*.*)", "*"
file_dialog_show save, f$
!    open the file on unit 1 for writing
!    -----------------------------------
file_open 1, f$, write
if FileError<>0 then stop "Error opening output file"
for i=1 to inum
call "GetPathOneOp.mac", iop
next i
file_close 1
if FileError<>0 then stop "Error closing output file"
message "Finished, output file = %f$"
run_exe "c:\Windows\System32\Notepad.exe", f$