怡宁塑胶模具设计

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

//头文件

#include <Windows.h>

#include <iostream>

#include <NXOpen/ListingWindow.hxx>

 

//定义函数

string GetNXPath();

 

//获取NX主程序路径
string MyClass::GetNXPath()
{
char NXPath[MAX_PATH];
GetModuleFileNameA(NULL, NXPath, MAX_PATH);
string NX_path = NXPath;
return NX_path;
}

 

void MyClass::do_it()
{

// 打开信息窗口

theSession->ListingWindow()->Open();

string NXFullPath = GetNXPath();

//输出路径到信息窗口
theSession->ListingWindow()->WriteLine(NXFullPath);

}

 

posted on 2021-08-26 11:29  怡宁塑胶模具设计  阅读(511)  评论(0编辑  收藏  举报