NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建一个新的表达式,有TAG tag_t NewExpTag = NULL_TAG; UF_MODL_create_exp_tag("DMM=151.5", &NewExpTag); //输入表达式名称,获取它的名称和值 ]; UF_MODL_ask_exp("DMM", ExpDefn); lw-&g…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 ] = {0.0, 0.0, 0.0};//设置原点 ] = {"};//设置长宽高 tag_t BlkTag = NULL_TAG; UF_MODL_create_block1(Sign, Corner_pt, Edge_Len, &Blk…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建表达式 tag_t NewExpTag = NULL_TAG; UF_MODL_create_exp_tag("DMM=151.5", &NewExpTag); //输入表达式TAG,得到表达式字符串 char* String; UF_MODL_ask_exp_tag_string(NewExpTag, &St…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建表达式 tag_t NewExpTag = NULL_TAG; UF_MODL_create_exp_tag("DMM=151.5", &NewExpTag); //输入表达式TAG,得到表达式值 double Value; UF_MODL_ask_exp_tag_value(NewExpTag, &Value…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_part.h> UF_initialize(); //获取当前显示部件的TAG tag_t DisplayTag = UF_PART_ask_display_part(); //输入Part的TAG,获取整个部件表达式的TAG和表达式个数 int NumberOfExps; tag_t* ExpsTag = NULL_TAG; UF_MODL_ask…
最近在做表达式创建,发现UFUN的创建表达式函数UF_MODL_create_exp,UF_MODL_create_exp_tag没有办法创建字符串类型的表达式,例如AA="BB". 后来我是用NXOPEN去做的,直接录一下,然后改改就可以了.后来请教唐工,他给我一个新的方法,用导入表达式函数UF_MODL_import_exp去实现.理论上这个方法,应该无论什么类型的表达式都可以导入进来. NX11+VS2013 #include <uf.h> #include <…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建一个新的表达式,无TAG UF_MODL_create_exp("DC=100"); //创建一个新的表达式,有TAG tag_t NewExpTag = NULL_TAG; UF_MODL_create_exp_tag("DMM=151.5", &NewExpTag); UF_terminate(…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建一个新的表达式,无TAG UF_MODL_create_exp("DC=100"); //创建一个新的表达式,有TAG tag_t NewExpTag = NULL_TAG; UF_MODL_create_exp_tag("DMM=151.5", &NewExpTag); UF_terminate(…
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_part.h> #include <uf_obj.h> UF_initialize(); //遍历当前part所有body lw->Open(); ; tag_t BodyTag = NULL_TAG; UF_OBJ_cycle_objs_in_part(UF_PART_ask_display_part(), UF_solid_t…
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/Annotations_TableSectionCollection.hxx> #include <NXOpe…