117 lines
3.8 KiB
Tcl
117 lines
3.8 KiB
Tcl
set ::custom_flag(from_move,$::mom_path_name) 1
|
|
# set ::custom_flag(from_move,$::mom_path_name) 1
|
|
|
|
set te875st 11111
|
|
|
|
#set ::custom_flag(from_move,$::mom_path_name) 1
|
|
|
|
if {$main == 1 && 1 == 1} {
|
|
puts "main"
|
|
}
|
|
|
|
proc test {} {
|
|
puts "main"
|
|
proc llll {} {}
|
|
set rrrrrrr
|
|
}
|
|
LIB_GE_command_buffer_edit_insert MOM_tool_change_LIB TOOL_CHANGE_AUTO {CUSTOM_after_tool_change_call} mytag after @TOOL_CHANGE_AUTO
|
|
|
|
MOM_abort
|
|
|
|
namespace eval myns {
|
|
proc add {a b} {
|
|
set sum [expr {$a + $b}]
|
|
return $sum
|
|
}
|
|
set config "debug"
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# Function to output a spacer line or empty line
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_spacer_output {type {length 20} {line_num 0} {output 1}} {
|
|
LIB_GE_message [string repeat $type $length] "output_$output" $line_num
|
|
}
|
|
|
|
|
|
SERVICE_spacer_output "*" 2 0 0
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# Function to delete the file
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_remove_file {file} {
|
|
if {![SERVICE_check_file_exists $file]} {return}
|
|
MOM_remove_file $file
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# Function to check if the file exists
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_check_file_exists {file} {
|
|
if {[file exists $file]} {return 1}
|
|
return 0
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# Ask UDE Info for the Tool
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_ask_ude_tool {pos ude_name tool_name} {
|
|
MOM_ask_ude_info $tool_name "tool" $pos
|
|
|
|
if {[lsearch $::mom_result $ude_name] != -1} {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# Ask UDE Info for the Operation
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_ask_ude_operation {pos ude_name path_name} {
|
|
MOM_ask_ude_info $path_name "operation" $pos
|
|
|
|
if {[lsearch $::mom_result $ude_name] != -1} {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# output suppress or dont suppress
|
|
# [SERVICE_output_handling "ingore_output"] ignores the output
|
|
# arg options: ingore_output
|
|
# restore
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_output_handling {handler} {
|
|
set ::lib_ge(hidden_output) $handler
|
|
}
|
|
|
|
#_________________________________________________________________________________________________
|
|
# <Documentation>
|
|
# write the mom_tool_data to store tool information
|
|
# this function is called in start of program
|
|
#_________________________________________________________________________________________________
|
|
proc SERVICE_get_tool_data {} {
|
|
global mom_tool_data
|
|
global mom_operation_info
|
|
|
|
set mom_tool_data(toollist) ""
|
|
set operations $::mom_operation_name_list
|
|
foreach operation $operations {
|
|
if {[lsearch -exact $mom_tool_data(toollist) $mom_operation_info($operation,tool_name)] == -1} {
|
|
lappend mom_tool_data(toollist) $mom_operation_info($operation,tool_name)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
LIB_GE_command_buffer_edit_replace MOM_end_of_program_LIB END_OF_PROGRAM @END_OF_PROG {
|
|
MOM_do_template "end_of_program_rewind"
|
|
} EndOfProgramRewind
|