NX11+VS2013 #include <NXOpen/Section.hxx> #include <NXOpen/SectionCollection.hxx> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/CoordinateSystem.hxx> #include <NXOpen/CoordinateSystemColl…
NX11+VS2013 #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/WCS.hxx> #include <NXOpen/CartesianCoordinateSystem.hxx> #include <NXOpen/CoordinateSystem.hxx>…
NX11+VS2013 #include <NXOpen/Section.hxx> #include <NXOpen/SectionCollection.hxx> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/UI.hxx> #include <NXOpen/Drawings_DrawingSheet.hxx> #inc…
UFUN的API里是没有切换到工程图的函数的,NXOPEN里是有方法可以用的.不过应该是不支持NX9以下的版本. NX9的不能录制出来,在UI类里有方法 NX9+VS2012 #include <uf.h> #include <NXOpen/UI.hxx> #include <NXOpen/MenuBar_MenuBarManager.hxx> NXOpen::UI *theUI = NXOpen::UI::GetUI(); UF_initialize(); //NX9…
NX9+VS2012 #include <NXOpen/Features_BlockFeatureBuilder.hxx> #include <NXOpen/Features_FeatureCollection.hxx> #include <NXOpen/NXException.hxx> #include <NXOpen/Body.hxx> #include <NXOpen/BodyCollection.hxx> #include <NXO…
NX9+VS2012 #include <NXOpen/NXObject.hxx> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Point.hxx> #include <NXOpen/PointCollection.hxx> NXOpen::Session *theSession = NXOpen::Session::GetSes…
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 <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/ListingWindow.hxx> #include <NXOpen/NXMessageBox.hxx> #include <NXOpen/Drawings_DrawingSheet.hxx>…
没有什么可以看的,NXOPEN直接录制一下导出STEP就可以了.录制出来自己挑需要的代码拿过来改一下. NX9+VS2012 #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/Step214Creator.hxx> #include <NXOpen/DexManager.hxx>…
没有什么可以看的,NXOPEN直接录制一下导出CAD就可以了.录制出来自己挑需要的代码拿过来改一下. NX9+VS2012 #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/Session.hxx> #include <NXOpen/DxfdwgCreator.hxx> #include <NXOpen/DexManager.hxx>…
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <NXOpen/PrintPDFBuilder.hxx> #include <NXOpen/Drawings_DrawingSheet.hxx> #include <NXOpen/NXObjectManager.hxx> #include <NXOpen/PlotManager.hxx> #include <NXOp…
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_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_drf.h> #include <NXOpen/Annotations_Note.hxx> #include <NXOpen/NXObjectManager.hxx> UF_initialize(); //创建注释 char* TextString[] = {"Caesar卢尚宇"}; ] = {,,}; tag_t NoteTag = NULL_TAG; U…
NX11+VS2013 #include <NXOpen/DisplayManager.hxx> #include <NXOpen/Body.hxx> #include <NXOpen/BodyCollection.hxx> #include <NXOpen/NXException.hxx> #include <NXOpen/NXObject.hxx> #include <NXOpen/Part.hxx> #include <N…
NX9+VS2012 #include <NXOpen/NXObject.hxx> #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include <NXOpen/UI.hxx> #include <NXOpen/NXMessageBox.hxx> #include <NXOpen/ListingWindow.hxx> using namespace N…
#include <uf_defs.h> #include <uf_ui_types.h> #include <iostream> #include <NXOpen/Session.hxx> #include <NXOpen/UI.hxx> #include <NXOpen/NXMessageBox.hxx> #include <NXOpen/Callback.hxx> #include <NXOpen/NXExce…
版本 NX9+VS2012 1.怎么往VS软件里添加VC,C#,VB向导模板 先到NX安装目录下UGOPEN文件夹里找到这三个文件夹 拷贝到VS的安装目录下 这里有几个注意事项,VS2017,VS2019以下的版本这样操作没问题, VS2017和VS2019微软调整了VC文件夹的目录,换位置了,所以你加过去发现打开VS里面没有C++的向导模板. 去你的VS2017或者VS2019安装目录下找到\Common7\IDE文件夹目录,把VC向导模板放进去. 下面我们新建项目,使用NX向导模板 两个向导…
关于 在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;…
每当提起UDO总是会让我想起大专毕业那会失业找工作,后来有个宝贵机会去了软件公司上班,拿到了我人生中的第一个NX二次开发项目,一个关于测量汽车前后左右摄像头的项目.当时那个项目就用到了UDO,对于只看了两个月唐康林工程师二次开发视频教程就跑出来找工作的我,显然是不会UDO的,后来采用了将handle值写到部件属性里,然后每次打开工具对话框前先去部件属性里读,在给到对话框里.在然后项目没做完我就特么滚蛋了. 时隔差不多两年,以前技术底子太差,好多东西都不懂,直到最近我对UDO才有了一些认知了解,会…
今天是国庆节,放假休息懒得动,没有出去玩,在家研究一下发射线函数UF_MODL_trace_a_ray.小弟以前在软件公司混的时候,当时我做的那个项目就用到了UF_MODL_trace_a_ray,当时为了赶项目,从别处抄了代码,改吧改吧.自己也没有仔细的去研究一下这个函数的用法.UF_MODL_trace_a_ray在NX二次开发中算是一个用到比较高频的函数,今天研究了一下,写了一道例题,UFUN和NXOpen 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>…
在网上看到一篇C#二次开发环境搭建的文章:NX二次开发-使用NXOPEN C#手工搭建开发环境配置 ,写得非常好.我按照文章操作,过程中遇到几个问题,把问题分享给大家,希望对各位有帮助. 注意三点: 1)一定要查看NX DLL的.NET版本,例如NX8.5对应的是.NET 版本是4.0,因此当前工程及依赖的其他工程必须保持一致(包括引用的DLL),如果不是,则无法执行.那么如何查看NX对应的的.NET版本?在引用中选中NXOpen,右键属性,查看运行时版本,即是.NET版本. 2)执行程序如果报…
在写这篇文章的时候,我正在头晕,因为下班坐车回家,有些晕车了.头疼的要死.也吃不下去饭. 版本:NX11+VS2013 最近这一年已经由C++过度到C#,改用C#做应用程序开发和NX二次开发. C#在做复杂界面开发的时候,WinFrom要比MFC简单的多(这个时候纯BlockUI已经满足不了集成功能的复杂界面需求了),数据库连接也简单. 言归正传 在我经过一段时间的看QQ群别人讨论技术,给了我点启发,以及带着兴趣百度到了一些相关资料.学会了这种方法. 1.有需求 在用C#做NX二次开发的时候,我…
先选择多个对象object,然后使用此函数获取选择的对象的tag,最后就可以使用object的一些函数了. ufun例子: extern DllExport void ufusr(char *parm, int *returnCode, int rlen) { UF_initialize(); tag_t *tagObjects; int iCount = 0; UF_UI_ask_global_sel_object_list(&iCount, &tagObjects); for (int…
本文分为两部分:"带参数的函数"和 "带修饰的函数". 浏览这篇博客前请先阅读: [NX二次开发]NX内部函数,查找内部函数的方法 带参数的函数: void UGS::DiagnosticUI::ClearDiagnosticsDisplayImmediately(class UGS::UICOMP &)void UGS::DiagnosticUI::DisplayDiagnosticsImmediately(class UGS::UICOMP &)…
本文分为两部分:"带参数的函数"和 "带修饰的函数". 浏览这篇博客前请先阅读: [NX二次开发]NX内部函数,查找内部函数的方法 带参数的函数: bool AMX__action_list_has_visible_items(struct AMX__action_list_s *)struct AMX__action_s * AMX__ask_action_by_accelerator(int,char const *)struct AMX__action_ite…