ug后处理定制的命令
学习UG后处理的文档 自己写的,全部上机实验过
在pd_cmd_custom_command(用户自定义)——定义命令
1.在程序的末尾加上加工的时间(注意字符间的空格,不能少也不能多)
global mom_machine_time
MOM_output_literal (运行时间:[ format %.2f $mom_machine_time]分钟)
最后效果:(运行时间:0.76分钟)
2.在程序末尾加上生成程序的时间
global mom_date
MOM_output_literal ";date is :$mom_date"
最后效果:;date is :Sat Jun 01 19:38:44 2013
3.加入刀具列表
# Place this custom command in either the start of program
# or the end of program event marker to generate a tool list
# in your NC file.
#
# The Shop Doc template file "pb_post_tool_list.tpl" distributed with
# Post Builder in "POSTBUILD/pblib/misc" directory can be copied
# to the "mach/resource/postprocessor" or "mach/resource/shop_docs" directory,
# in case that your UG runtime environment does not have access to the
# Post Builder installation.
#
# Accessing "pb_post_tool_list.tpl" in other location can also be accomplished
# by changing the code below titled "Generate tool list data" in this proc.
#
# The variable "mom_sys_tool_list_output_type" set in this proc allows you
# to select the type of tool list to be generated.
# The options are:
#
# "ORDER_IN_USE" - List tools used in the program in the order of operations.
# "ALL_UNIQUE" - List all unique tools once for each in the order of use.
# "GROUP_BY_TYPE" - List tools in groups of different tool types.
#
# The desired tool list type can be set by changing the code below.
# The default is set to "GROUP_BY_TYPE".
#
global mom_sys_tool_list_initialized
global mom_sys_tool_list_output_type
if { ![info exists mom_sys_tool_list_initialized] || !$mom_sys_tool_list_initialized } {
MOM_output_to_listing_device "proc PB_CMD_init_tool_list must be executed in the
Start of Program before PB_CMD_create_tool_list is called."
return
学习UG后处理的文档 自己写的,全部上机实验过
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++
# Set mom_sys_tool_list_output_type to the desired output fashion.
#
# "ORDER_IN_USE" - List tools used in the program in the order of operations.
# "ALL_UNIQUE" - List all unique tools once for each in the order of use.
# "GROUP_BY_TYPE" - List tools in groups of different tool types.
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++
# set mom_sys_tool_list_output_type "ORDER_IN_USE"
# set mom_sys_tool_list_output_type "ALL_UNIQUE"
set mom_sys_tool_list_output_type "GROUP_BY_TYPE"
global mom_sys_control_out mom_sys_control_in
global current_program_name
global mom_tool_number mom_tool_length_adjust_register mom_tool_name
#----------------------------------------------------------------------------
# Save info for the currently active tool in the program being post-prcessed
# before starting Shop Doc mechanism for tool list generation.
#----------------------------------------------------------------------------
if [llength [info commands PB_CMD_save_active_oper_tool_data] ] {
PB_CMD_save_active_oper_tool_data
}
#-----------------------------------------------------------
# Create tool list per selected top-level group.
# Group name is set to blank if no group has been selected.
#-----------------------------------------------------------
global mom_parent_group_name
if [info exists mom_parent_group_name] {
set current_program_name $mom_parent_group_name
} else {
set current_program_name ""
学习UG后处理的文档 自己写的,全部上机实验过
set ci " "
set co " "
if [info exists mom_sys_control_in] { set ci $mom_sys_control_in }
if [info exists mom_sys_control_out] { set co $mom_sys_control_out }
#*************************
# Generate tool list data
#*************************
set template_file pb_post_tool_list.tpl
global tcl_platform
if [string match "windows" $tcl_platform(platform)] {
set pb_lib_misc_dir [MOM_ask_env_var UGII_BASE_DIR]\\postbuild\\pblib\\misc\\
} else {
set pb_lib_misc_dir [MOM_ask_env_var UGII_BASE_DIR]/postbuild/pblib/misc/
}
set cam_post_dir [MOM_ask_env_var UGII_CAM_POST_DIR]
set cam_shop_doc_dir [MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR]
if { [file exists ${pb_lib_misc_dir}${template_file}] } {
MOM_do_template_file ${pb_lib_misc_dir}${template_file}
} elseif { [file exists ${cam_post_dir}${template_file}] } {
MOM_do_template_file ${cam_post_dir}${template_file}
} elseif { [file exists ${cam_shop_doc_dir}${template_file}] } {
MOM_do_template_file ${cam_shop_doc_dir}${template_file}
} else {
MOM_output_to_listing_device "ERROR : Template file pb_post_tool_list.tpl is not
found in the following directories: \n \n $pb_lib_misc_dir \n $cam_post_dir \n $cam_shop_doc_dir \n \n Tool list cannot be generated.\n"
return
}
学习UG后处理的文档 自己写的,全部上机实验过
#------------------
# Tool list header
#------------------
shop_doc_output_literal
相关推荐:
- [小学教育]四年级综合实践活动课《衣物的洗涤》教
- [小学教育]2014半年工作总结怎么写
- [小学教育]20世纪外国文学专题综合试题及答案
- [小学教育]TS_1循环使用催化丙烯环氧化反应研究
- [小学教育]最实用的考勤签到表(上下班签到表)
- [小学教育]气候与生态建筑——以新疆民居为例
- [小学教育]二人以上股东有限责任公司章程参考样本
- [小学教育]2014届第一轮复习资料4.1,3美好生活的
- [小学教育]土方开挖、降水方案
- [小学教育]手绘儿童绘本《秋天的图画》(蜡笔)
- [小学教育]2002级硕士研究生卫生统计学考试试题
- [小学教育]环保装备重点发展目录
- [小学教育]金蝶K3合并报表培训教材
- [小学教育]岩浆岩试题及参考答案
- [小学教育]知之深爱之切学习心得
- [小学教育]第十二章 蛋白质的生物合成
- [小学教育]Chapter 2-3 Solid structure and basi
- [小学教育]市政道路雨季专项施工方案
- [小学教育]中国海洋大学2012-2013学年第二学期天
- [小学教育]教育心理学第3章-学习迁移
- 浅谈深化国企改革中加强党管企业
- 2006年中国病理生理学会学术活动安排
- 设计投标工作大纲
- 基于ARP的网络攻击与防御
- 2016届湖北省七市(州)教科研协作体高三
- Google_学术搜索及其检索技巧
- 2019-2020学年七年级地理下册6.3美洲教
- 城市道路可研报告
- 【名师指津】2012高考英语 写作基础技
- 6级知识点培训北京师范大学《幼儿智趣
- 注册会计师会计知识点:金融资产
- 新安装 500 kV 变压器介损分析与判断
- PS2模拟器PCSX2设置及使用教程.
- 医院药事管理与药剂科管理组织机构
- {PPT背景素材}丹巴的醉人美景,免费,一
- NAS网络存储应用解决方案
- 青海省西宁市六年级上学期数学期末考试
- 测量管理体系手册依据ISO10012:2003
- 洞子小学培养骨干教师工作计划
- 浅谈《牛津初中英语》的教材特点及教学




