随笔分类 - NXOPEN
摘要:NXOpen::FileNew *fileNew1; fileNew1 = theSession->Parts()->FileNew(); fileNew1->SetUseBlankTemplate(true); fileNew1->SetUnits(NXOpen::Part::UnitsMilli
阅读全文
摘要:if (theblocktoggle02 == true)//抑制复制体的特征,//UF方式 { uf_list_p_t feature_list; UF_MODL_ask_body_feats(copies, &feature_list); UF_MODL_suppress_feature(fea
阅读全文
摘要:void PartEdit::formatThedate() //获得系统时间{ //获得日期 UF_initialize(); UF_system_info_t info; UF_ask_system_info(&info); //格式化日期 string formatdate = info.da
阅读全文
摘要:void SEModifyAttX::delAtt() //删除实体或者部件事例属性{ try { //获取UI界面的属性 //获取选择对象TAG PropertyList *blockxuanzhePros = bodySelect0->GetProperties(); std::vector<N
阅读全文
摘要:NXOPEN关于使用代码关闭UI 因为初始化不了,所以不能用 theDialog->PerformApply(); 所以改用cwnd类模拟点击窗口来完成 以下头文件必须在最后面 #include <afxwin.h> //必写 #undef CreateDialog //必写#include <NX
阅读全文
摘要:theDialog->TopBlock()->FindBlock("Dialog")->SetLabel("自动装配(六六超六 QQ:920037355)"); //theDialog->TopBlock()->FindBlock("Dialog")->GetProperties()->SetStr
阅读全文
摘要:c++多个源文件共用一个全局变量(extern 的用法) 1,在Hello.hpp里面定义: using namespace std;using namespace NXOpen;using namespace NXOpen::BlockStyler; //在以上代码后定义 extern int p
阅读全文
摘要:// 查询点集中到指定面最近的点static tag_t GetMinDistPoint(tag_t face, std::vector<tag_t>& points){ double dist = DBL_MAX; double faceCenter[3] = { 0.0, 0.0, 0.0 };
阅读全文
摘要:自定义的SplitString函数对字符串进行分割 void SplitString(const std::string& s, std::vector<std::string>& v, const std::string& c){ std::string::size_type pos1, pos2
阅读全文
摘要:static void MapPoint(const bool wcsToAbs, double wcsP[3], double absP[3]){ int from = wcsToAbs ? UF_CSYS_ROOT_WCS_COORDS : UF_CSYS_ROOT_COORDS; int to
阅读全文
摘要:tag_t WorkPartTAG = UF_ASSEM_ask_work_part(); UF_ATTR_value_t value; int title_type; string strAttr; UF_ATTR_find_attribute(bodyTAG, UF_ATTR_any, "YX_
阅读全文
摘要:#include <uf_ugfont.h>#include <uf_drf.h> //查找字体int index=-1;tag_t s_part_tag=UF_PART_ask_display_part();tag_t s_obj=NULL_TAG;UF_OBJ_cycle_objs_in_par
阅读全文
摘要:uf_list_p_t face_list; UF_MODL_ask_body_faces(bodyTAG, &face_list); int count; UF_MODL_ask_list_count(face_list, &count); uf_list_p_t yz_face_list; UF
阅读全文
摘要:void DZWEIZHI::OpenMain()//主入口 { try { // Enter your callback code here NXOpen::Session *theSession = NXOpen::Session::GetSession(); NXOpen::Part *wor
阅读全文
摘要:void DZWEIZHI::Dele()//删除对象 { try { // Enter your callback code here NXOpen::Session *theSession = NXOpen::Session::GetSession(); NXOpen::Part *workPa
阅读全文
摘要:void DZWEIZHI::RemoveParam()//去参 { try { // Enter your callback code here NXOpen::Session *theSession = NXOpen::Session::GetSession(); NXOpen::Part *w
阅读全文