ug后处理定制的命令

上传人:ni****g 文档编号:457437524 上传时间:2022-09-20 格式:DOCX 页数:7 大小:16.55KB
返回 下载 相关 举报
ug后处理定制的命令_第1页
第1页 / 共7页
ug后处理定制的命令_第2页
第2页 / 共7页
ug后处理定制的命令_第3页
第3页 / 共7页
ug后处理定制的命令_第4页
第4页 / 共7页
ug后处理定制的命令_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《ug后处理定制的命令》由会员分享,可在线阅读,更多相关《ug后处理定制的命令(7页珍藏版)》请在金锄头文库上搜索。

1、在pd_cmd_custom_comman(d用户自定义)定义命令1.在程序的末尾加上加工的时间(注意字符间的空格,不能少也不能多)globalmom_machine_timeMOM_output_literal(运行时间:format%.2f$mom_machine_time分钟)最后效果:(运行时间:0.76分钟)2.在程序末尾加上生成程序的时间globalmom_dateMOM_output_literal;dateis:$mom_date最后效果:;dateis:SatJun0119:38:4420133.加入刀具列表#Placethiscustomcommandineitherthe

2、startofprogram#ortheendofprogrameventmarkertogenerateatoollist#inyourNCfile.#TheShopDoctemplatefilepb_post_tool_list.tpldistributedwith#PostBuilderinPOSTBUILD/pblib/miscdirectorycanbecopied#tothemach/resource/postprocessorormach/resource/shop_docsdirectory,#incasethatyourUGruntimeenvironmentdoesnoth

3、aveaccesstothe#PostBuilderinstallation.#Accessingpb_post_tool_list.tplinotherlocationcanalsobeaccomplished#bychangingthecodebelowtitledGeneratetoollistdatainthisproc.#Thevariablemom_sys_tool_list_output_typesetinthisprocallowsyou#toselectthetypeoftoollisttobegenerated.#Theoptionsare:#ORDER_IN_USE#AL

4、L_UNIQUE#GROUP_BY_TYPE-Listtoolsusedintheprogramintheorderofoperations.-Listalluniquetoolsonceforeachintheorderofuse.-Listtoolsingroupsofdifferenttooltypes.#Thedesiredtoollisttypecanbesetbychangingthecodebelow.#ThedefaultissettoGROUP_BY_TYPE.#globalmom_sys_tool_list_initializedglobalmom_sys_tool_lis

5、t_output_typeif!infoexistsmom_sys_tool_list_initialized|!$mom_sys_tool_list_initializedMOM_output_to_listing_deviceprocPB_CMD_init_tool_listmustbeexecutedintheStartofProgrambeforePB_CMD_create_tool_listiscalled.Jreturn#+#Setmom_sys_tool_list_output_typetothedesiredoutputfashion.#ORDER_IN_USE-Listtoo

6、lsusedintheprogramintheorderofoperations.#ALL_UNIQUE-Listalluniquetoolsonceforeachintheorderofuse.#GROUP_BY_TYPE-Listtoolsingroupsofdifferenttooltypes.#+#setmom_sys_tool_list_output_typeORDER_IN_USE#setmom_sys_tool_list_output_typeALL_UNIQUEsetmom_sys_tool_list_output_typeGROUP_BY_TYPEglobalmom_sys_

7、control_outmom_sys_control_inglobalcurrent_program_nameglobalmom_tool_numbermom_tool_length_adjust_registermom_tool_name#Saveinfoforthecurrentlyactivetoolintheprogrambeingpost-prcessed#beforestartingShopDocmechanismfortoollistgeneration.#ifllengthinfocommandsPB_CMD_save_active_oper_tool_dataPB_CMD_s

8、ave_active_oper_tool_data#Createtoollistperselectedtop-levelgroup.#Groupnameissettoblankifnogrouphasbeenselected.#globalmom_parent_group_nameifinfoexistsmom_parent_group_namesetcurrent_program_name$mom_parent_group_nameelsesetcurrent_program_namesetcisetcoifinfoexistsmom_sys_control_insetci$mom_sys_

9、control_inifinfoexistsmom_sys_control_outsetco$mom_sys_control_out#*#Generatetoollistdata#*settemplate_filepb_post_tool_list.tplglobaltcl_platformifstringmatchwindows$tcl_platform(platform)setpb_lib_misc_dirMOM_ask_env_varUGII_BASE_DIRpostbuildpblibmiscelsesetpb_lib_misc_dirMOM_ask_env_varUGII_BASE_

10、DIR/postbuild/pblib/misc/setcam_post_dirMOM_ask_env_varUGII_CAM_POST_DIRsetcam_shop_doc_dirMOM_ask_env_varUGII_CAM_SHOP_DOC_DIRiffileexists$pb_lib_misc_dir$template_fileMOM_do_template_file$pb_lib_misc_dir$template_fileelseiffileexists$cam_post_dir$template_fileMOM_do_template_file$cam_post_dir$temp

11、late_fileelseiffileexists$cam_shop_doc_dir$template_fileMOM_do_template_file$cam_shop_doc_dir$template_fileelseMOM_output_to_listing_deviceERROR:Templatefilepb_post_tool_list.tplisnotfoundinthefollowingdirectories:nn$pb_lib_misc_dirn$cam_post_dirn$cam_shop_doc_dirnnToollistcannotbegenerated.nreturn#

12、Toollistheader#shop_doc_output_literal$co=$cishop_doc_output_literal$coTOOLLIST$cishop_doc_output_literal$co=$ci#Outputtoollist#globaltool_data_bufferglobalmom_sys_tool_stackswitch$mom_sys_tool_list_output_typeORDER_IN_USEsettool_list$mom_sys_tool_stack(IN_USE)GROUP_BY_TYPEsettool_listconcat$mom_sys

13、_tool_stack(LATHE)$mom_sys_tool_stack(DRILL)$mom_sys_tool_stack(MILL)defaultsettool_list$mom_sys_tool_stack(ALL)setprev_tool_typeforeachtool$tool_listsettool_type$tool_data_buffer($tool,type)&#Outputtooltypeheaderifitchanges.if!stringmatch$tool_type$prev_tool_typeifinfoexiststool_data_buffer($tool_type,header)$tool_data_buffer($tool_type,header)!=shop_doc_output_literal$tool_data_buffer($tool_type,header)ifinfoexiststool_data_buffer($tool,output)shop_doc_output_literal$tool_data_buffer($tool,output)setprev_tool_type$tool_type#Toollistfooter#shop_doc_output_literal$co=

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号