资源描述:
《UG添加引用集源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、/*********************************************************************************CommonRefset.cpp****描述:**1、检查目标组件中是否存在“TRUE”和“FALSE”引用集,如果没有则添加**2、添加或者删除目标引用集中的对象****作者:**韦清华,转载请保留该信息*******************************************************************************//*
2、Includefiles*/#if!defined(__hp9000s800)&&!defined(__sgi)&&!defined(__sun)#include#includeusingstd::ostrstream;usingstd::endl;usingstd::ends;usingstd::cerr;#else#include#include#endif#include#include#include
3、#include#include#include//uf_object_types.h#include#defineUF_CALL(X)(report_error(__FILE__,__LINE__,#X,(X)))staticintreport_error(char*file,intline,char*call,intirc){if(irc){charerr[133],msg[133];sprintf(msg,"***
4、ERRORcode%datline%din%s:+++",irc,line,file);UF_get_fail_message(irc,err);UF_print_syslog(msg,FALSE);UF_print_syslog(err,FALSE);UF_print_syslog("",FALSE);UF_print_syslog(call,FALSE);UF_print_syslog(";",FALSE);if(!UF_UI_open_listing_window()){UF_UI_write_listing_
5、window(msg);UF_UI_write_listing_window(err);UF_UI_write_listing_window("");UF_UI_write_listing_window(call);UF_UI_write_listing_window(";");}}return(irc);}staticintsel_init_proc(UF_UI_selection_p_tselect,void*user_data){intnum_triples=7;UF_UI_mask_tmask_triples[]
6、={{UF_solid_type,UF_solid_body_subtype,UF_UI_SEL_FEATURE_BODY},{UF_point_type,UF_point_subtype,UF_UI_SEL_NOT_A_FEATURE},{UF_line_type,UF_line_normal_subtype,UF_UI_SEL_NOT_A_FEATURE},{UF_datum_axis_type,0,UF_UI_SEL_NOT_A_FEATURE},{UF_datum_plane_type,0,UF_UI_SEL_NOT_A
7、_FEATURE},{UF_dataum_point_type,0,UF_UI_SEL_NOT_A_FEATURE},{UF_group_type,0,UF_UI_SEL_NOT_A_FEATURE},};if((UF_CALL(UF_UI_set_sel_mask(select,UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC,num_triples,mask_triples)))!=0)return(UF_UI_SEL_FAILURE);if(user_data!=NULL){tag_t*re
8、fset_id=(tag_t*)user_data;if(refset_id!=NULL_TAG){intnum_members(0);tag_t*members=NULL;UF_ASSEM_ask_ref_set_members(*refset_id,&num