NX二次开发-通过NX自带UI分别获取集成环境和本地打开的part名字
- 通过NX自带UI获取集成环境下打开的part名字;
1 string GetOpenPartName()
2 {
3 char fileName[MAX_FSPEC_BUFSIZE] = "";
4 logical unused = true;
5 int response = 0;
6 UF_UI_ask_open_part_filename(fileName, &unused, &response);
7
8 char* partName = "";
9 UF_UGMGR_convert_file_name_to_cli(fileName, &partName);
10
11 return partName;
12 }
- 通过NX自带UI获取本地打开的part名字。
1 string GetLocalOpenPartName()
2 {
3 char fileName[MAX_FSPEC_BUFSIZE] = "";
4 logical unused = true;
5 int response = 0;
6 UF_UI_ask_open_part_filename(fileName, &unused, &response);
7
8 return fileName;
9 }