摘要: NX二次开发-修剪字符串前后的空格 1 void TrimString(string & str) 2 { 3 string::size_type pos = str.find_last_not_of(' '); 4 if (pos != string::npos) 5 { 6 str.erase( 阅读全文
posted @ 2021-02-04 15:56 不再低调 阅读(156) 评论(0) 推荐(0) 编辑
摘要: NX二次开发-创建目录 1 bool CreateDir(string path) 2 { 3 if (path.empty()) 4 { 5 return false; 6 } 7 8 CreateDirectory(multiByteToWideChar(path), NULL); 9 10 r 阅读全文
posted @ 2021-02-04 15:51 不再低调 阅读(149) 评论(0) 推荐(0) 编辑
摘要: NX二次开发-检查文件夹是否存在 1 bool CheckFolderExist(const string & strPath) 2 { 3 if (strPath.empty()) 4 { 5 return false; 6 } 7 8 WIN32_FIND_DATA wfd; 9 BOOL bV 阅读全文
posted @ 2021-02-04 15:50 不再低调 阅读(170) 评论(0) 推荐(0) 编辑
摘要: NX二次开发-检查文件是否存在 UF函数 1 bool CheckFileExists(string filename) 2 { 3 if (filename.empty()) 4 { 5 return false; 6 } 7 8 int status = 1; 9 UF_CFI_ask_file 阅读全文
posted @ 2021-02-04 15:36 不再低调 阅读(183) 评论(0) 推荐(0) 编辑
摘要: NX二次开发-获取加工导航器上选中刀具或工序的所有paramIndex值 由于paramIndex的值可能会很大,所以在代码里获取五万以内的paramIndex所对应的参数值。 1 void GetCamObjParamInfo() 2 { 3 int objectCount = 0; 4 tag_ 阅读全文
posted @ 2021-02-04 15:30 不再低调 阅读(674) 评论(0) 推荐(0) 编辑