posts - 74,comments - 5,views - 46802

随笔分类 -  NX二次开发-文件操作

NX二次开发-创建目录
摘要: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 不再低调 阅读(163) 评论(0) 推荐(0) 编辑
NX二次开发-检查文件夹是否存在
摘要: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 不再低调 阅读(183) 评论(0) 推荐(0) 编辑
NX二次开发-检查文件是否存在
摘要: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 不再低调 阅读(207) 评论(0) 推荐(0) 编辑
NX二次开发-拆分路径为文件夹和文件名
摘要:#NX二次开发-拆分路径为文件夹和文件名 1 void SplitFileName(std::string fullName, std::string &dirName, std::string &fileName) 2 { 3 TrimString(fullName); 4 dirName.cle 阅读全文
posted @ 2020-12-14 14:22 不再低调 阅读(349) 评论(0) 推荐(0) 编辑
NX二次开发-根据文件名删除文件
摘要:#NX二次开发-根据文件名删除文件 1 void DeleteFileByFileName(const std::string& fileName) 2 { 3 if (CheckFileExist(fileName)) 4 { 5 remove(fileName.c_str()); 6 } 7 } 阅读全文
posted @ 2020-12-14 13:25 不再低调 阅读(272) 评论(0) 推荐(0) 编辑
NX二次开发-写入信息窗口
摘要:#NX二次开发-写入信息窗口 1 void WriteLW(const std::string& str) 2 { 3 NXOpen::ListingWindow *lw = Session::GetSession()->ListingWindow(); 4 if (!lw->IsOpen()) 5 阅读全文
posted @ 2020-12-14 13:23 不再低调 阅读(274) 评论(0) 推荐(0) 编辑
NX二次开发-读文件
摘要:#NX二次开发-读文件 1 bool ReadFile(const std::string& fileName, std::vector<std::string>& txtLines) 2 { 3 if (!CheckFileExist(fileName)) 4 { 5 return false; 阅读全文
posted @ 2020-12-14 13:18 不再低调 阅读(444) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示