NX二次开发获取NX主程序路径
2024-09-06 11:26:14
//头文件
#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);
}
最新文章
- Android Studio:Failed to resolve ***
- ListView 中的ImageView Button
- 数组中第K小的数字(Google面试题)
- WPF学习之路(八)页面
- JVM最多能创建多少个线程:unabletocreatenewnativethread
- XMPP协议错误码
- iOS-设计模式-懒加载
- jsp笔记
- nginx + keepalived 双机热备
- JSP标记
- 1.ssh访问限制
- Atitit.hibernate体系结构大总结
- 平时的笔记02:处理fnmatch模块
- 想使用WM_CONCAT 函数进行多列转一行,但发现没有
- git初学笔记1
- HTML知识点总结之table
- Python深度学习(Deep Learning with Python) 中文版+英文版+源代码
- Java Jvm运行机制原理
- python基础知识13---函数对象、函数嵌套、名称空间与作用域、装饰器
- JQuery之Attr()与Prop()方法