定义: NXOpen::BlockStyler::BlockDialog* theDialog; theDialog->PerformApply();//执行应用并重新启动对话框. theDialog->show();//启动对话框.…
关于 在Block UI中UF_initialize();和UF_terminate();的使用 用Block UI作NX二次开发的时候,不需要在使用UFUN函数的时候加UF_initialize();和UF_terminate();. 可以直接加在CPP里这个位置: extern "C" DllExport void ufusr(char *param, int *retcod, int param_len) { TwoPointCyl *theTwoPointCyl = NULL;…
NX9+VS2012 public: void SetBlockUIShow(); void EnumInt::SetBlockUIShow() { //获取枚举控件 PropertyList* EnumProps = enum0->GetProperties(); int EnumValue = EnumProps->GetEnum("Value"); delete EnumProps; EnumProps = NULL; //得到ini类型值 //条件判断,当枚举为下拉…
NX9+VS2012 public: void SetBlockUIShow(); void ToggleInt::SetBlockUIShow() { //获取开关控件 //获取枚举控件 PropertyList* ToggleProps = toggle0->GetProperties(); int ToggleValue = ToggleProps->GetLogical("Value"); delete ToggleProps; ToggleProps = NULL…
Face Collector(面收集器)控件的获取 NX9+VS2012 #include <uf.h> #include <uf_obj.h> UF_initialize(); //面收集器控件 PropertyList* FaceSelectProps = face_select0->GetProperties(); std::vector<NXOpen::TaggedObject *> faces = FaceSelectProps->GetTagge…
Object Color Picker(对象颜色拾取器)控件的获取 NX9+VS2012 #include <uf.h> #include <uf_obj.h> UF_initialize(); //获取体收集器控件 PropertyList* BodySelectProps = bodySelect0->GetProperties(); std::vector<NXOpen::TaggedObject *> Bodys = BodySelectProps->…
Body Collector(体收集器)控件的获取 NX9+VS2012 #include <uf.h> #include <uf_obj.h> UF_initialize(); //获取体收集器控件 PropertyList* BodySelectProps = bodySelect0->GetProperties(); std::vector<NXOpen::TaggedObject *> Bodys = BodySelectProps->GetTagg…
Specify Point(指定点)控件的获取 NX9+VS2012 #include <uf.h> #include <uf_ui.h> UF_initialize(); //获取点XYZ坐标 PropertyList *SelectPoint1Props = point0->GetProperties(); Point3d SelectPoint1 = SelectPoint1Props->GetPoint("Point"); delete Se…
Expression(表达式)控件的获取 NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //获取表达式控件的值 PropertyList *ExpressionProps = expression0->GetProperties(); double ExpressionValue = ExpressionProps->GetDouble("Value"); delet…
本文通过举四个例子来告诉大家在NX二次开发过程中会经常用到UFUN和NXOpen结合去开发,在UFUN中我们得到的是Tag_t对象,在NXOpen中得到的是TaggedObject对象,这两个是需要进行转换的.本文主要知识点为:TaggedObject->tag_t() , NXOpen::NXObjectManager::Get(BodyTag1) , feature1->JournalIdentifier()的用法. NX11+VS2013 #include <uf.h> #i…