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…
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…
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…
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…
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…
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…
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…
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/Annotations_TableSectionCollection.…
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/Annotations_TableSectionCollection.…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <uf_part.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "Sheet1";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <uf_part.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "Sheet1";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <uf_part.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "Sheet1";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size…
#include <uf.h> #include <uf_drf.h> UF_initialize(); //插入PNG char* file_name = "D:\\123.png"; ] = { 50.0, 50.0, 0.0 }; tag_t ImageTag = NULL_TAG; UF_DRF_create_image_from_file(file_name, NULL_TAG, origin, &ImageTag); //设置图片高度 UF_…
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…
UF公共类型 UF_begin_timer计时函数 https://www.cnblogs.com/nxopen2018/p/10957135.html UF_end_timer计时函数 https://www.cnblogs.com/nxopen2018/p/11099462.html UF_initialize初始化 https://www.cnblogs.com/nxopen2018/p/10952538.html UF_terminate终止  https://www.cnblogs.c…
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: 在UFUN里面没有直接的函数: 思路就是: .先将工程图转换为cgm .调用系统的cgm2pdf.exe工具,将上一步转换的cgm再转成PDF格式: 以下是我写的一个例子.大家可以拿一个工程图测试以下代码,最后会在C盘生成tkl.cgm与tkl.pdf两个文件. #include <uf.h>…
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: 在UFUN里面没有直接的函数: 思路就是: .先将工程图转换为cgm .调用系统的cgm2pdf.exe工具,将上一步转换的cgm再转成PDF格式: 以下是我写的一个例子.大家可以拿一个工程图测试以下代码,最后会在C盘生成tkl.cgm与tkl.pdf两个文件. #include <uf.h>…
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: 在UFUN里面没有直接的函数: 思路就是: .先将工程图转换为cgm .调用系统的cgm2pdf.exe工具,将上一步转换的cgm再转成PDF格式: 以下是我写的一个例子.大家可以拿一个工程图测试以下代码,最后会在C盘生成tkl.cgm与tkl.pdf两个文件. #include <uf.h>…
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: 在UFUN里面没有直接的函数: 思路就是: .先将工程图转换为cgm .调用系统的cgm2pdf.exe工具,将上一步转换的cgm再转成PDF格式: 以下是我写的一个例子.大家可以拿一个工程图测试以下代码,最后会在C盘生成tkl.cgm与tkl.pdf两个文件. #include <uf.h>…
今天是国庆节,放假休息懒得动,没有出去玩,在家研究一下发射线函数UF_MODL_trace_a_ray.小弟以前在软件公司混的时候,当时我做的那个项目就用到了UF_MODL_trace_a_ray,当时为了赶项目,从别处抄了代码,改吧改吧.自己也没有仔细的去研究一下这个函数的用法.UF_MODL_trace_a_ray在NX二次开发中算是一个用到比较高频的函数,今天研究了一下,写了一道例题,UFUN和NXOpen C++简单混合去用了一下,大致介绍下函数的用法.如有错误,还请各位前辈多多指教小弟…
NX11+VS2013 #include <uf.h> #include <uf_curve.h> #include <uf_vec.h> UF_initialize(); //创建点1 ] = { 10.0, 10.0, 10.0 }; tag_t PointTag1 = NULL_TAG; UF_CURVE_create_point(Point1, &PointTag1); //创建点2 ] = { 100.0, 100.0, 100.0 }; tag_t…
NX9+VS2012 //NX二次开发中常用拉伸函数为UF_MODL_create_extruded2,但是此函数不能拉伸片体, //想要拉伸片体用函数UF_MODL_create_extruded. #include <uf.h> #include <uf_curve.h> #include <uf_modl.h> #include <uf_obj.h> UF_initialize(); //创建直线1 UF_CURVE_line_t LineCoords…
NX9+VS2012 //NX二次开发中常用拉伸函数为UF_MODL_create_extruded2,但是此函数不能拉伸片体, //想要拉伸片体用函数UF_MODL_create_extruded. #include <uf.h> #include <uf_curve.h> #include <uf_modl.h> #include <uf_obj.h> UF_initialize(); //创建直线1 UF_CURVE_line_t LineCoords…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> #include <uf_ui.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "ABC";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size_sta…
本文通过举四个例子来告诉大家在NX二次开发过程中会经常用到UFUN和NXOpen结合去开发,在UFUN中我们得到的是Tag_t对象,在NXOpen中得到的是TaggedObject对象,这两个是需要进行转换的.本文主要知识点为:TaggedObject->tag_t() , NXOpen::NXObjectManager::Get(BodyTag1) , feature1->JournalIdentifier()的用法. NX11+VS2013 #include <uf.h> #i…
NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx> #include <NXOpen/NXObjectManager.hxx> UF_initialize(); //创建注释 char* TextString[] = {"Caesar卢尚宇"}; ] = {,,}; tag_t NoteTag = NULL_TAG; U…
1 NX11+VS2013 2 3 4 #include <uf.h> 5 #include <uf_ui.h> 6 #include <uf_drf.h> 7 8 9 UF_initialize(); 10 11 //创建注释 12 char* TextString[] = { "Caesar卢尚宇" }; 13 double Origin3d[3] = { 100, 100, 100 }; 14 tag_t NoteTag = NULL_TAG;…
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_drf.h> UF_initialize(); //创建注释 char* TextString[] = { "Caesar卢尚宇" }; ] = { , , }; tag_t NoteTag = NULL_TAG; UF_DRF_create_note(, TextString, Origin3d, , &NoteTag);…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "ABC";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size_state = UF_DRAW_METRIC_SIZE;…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize(); //新建工程图(A4图纸) char* DrawingName = "ABC";//设置图纸名字 UF_DRAW_info_t DrawingInfo;//设置图纸大小.投影视角.视图比例等 DrawingInfo.size_state = UF_DRAW_METRIC_SIZE;…