UG爱好者

标题: 代码 [打印本页]

作者: 1484331152    时间: 2020-7-3 21:02
标题: 代码
global mom_tool_pitch
global mom_spindle_speed
global feed
global xl
global mom_operation_name
global afterG84
    if {![info exists mom_tool_pitch ]} {

   MOM_display_message  " 温馨提示:

     工序$mom_operation_name没有螺距。

     请确认,并知晓

    " "攻丝" "E"
  }
if {[info exists mom_tool_pitch ]} {
set text [ MOM_display_message " 温馨提示:

           攻丝选择!!!!!

       " "攻丝消息" "W" "F=P" "F=S*P" ]

   switch $text {
       1 { set xl ""
           set v "6" }
       2 {
        set xl "M29 G95"
            set afterG84 1
                set v "5"
                  }
                    }
            if { $v == 6 } {
               set feed [expr $mom_tool_pitch]
               }
         if { $v == 5 } {
             set feed [expr $mom_tool_pitch]
       }
     }
if {[info exists xl ]} {
MOM_output_literal "$xl"}




作者: topckey    时间: 2020-7-4 09:29
怎么用呢? 添加在哪个位置合适?




欢迎光临 UG爱好者 (https://www.ugsnx.com/) Powered by Discuz! X3.2