点击查看详细介绍

一键透明与不透明合及在一个件,自己学来玩玩的,读取ID编号,我想把他分割,设标题,256个开关呀

WW_TT_TOOLS 2月前 110 0

UG NX 二次开发 技术交流 qq群:641226372      UG二次开发(C、C#、WPF)


#include <uf.h>
#include <uf_assem.h>
#include <uf_obj.h>

//入口函数
void ufusr(char *parm, int *returnCode, int rlen)
{
UF_initialize();

tag_t workpartTAG =UF_ASSEM_ask_work_part();
tag_t bodyTAG=NULL_TAG;
UF_OBJ_cycle_objs_in_part(workpartTAG,UF_solid_type,&bodyTAG);
UF_OBJ_translucency_t numLAY ;
UF_OBJ_ask_translucency(bodyTAG,&numLAY);
while (bodyTAG!=NULL_TAG)
{
if (numLAY==0)
{
UF_OBJ_set_translucency(bodyTAG,50);
UF_OBJ_cycle_objs_in_part(workpartTAG,UF_solid_type,&bodyTAG);
}
else if (numLAY==50)
{

UF_OBJ_set_translucency(bodyTAG,100);
UF_OBJ_cycle_objs_in_part(workpartTAG,UF_solid_type,&bodyTAG);
}
else
{
UF_OBJ_set_translucency(bodyTAG,0);
UF_OBJ_cycle_objs_in_part(workpartTAG,UF_solid_type,&bodyTAG);
}
}
UF_terminate();
}

//出口函数
int ufusr_ask_unload(void)
{
return(UF_UNLOAD_IMMEDIATELY);
}

0

最新回复 (0)
请登录后发表新帖