文章作者:里海
简介:
UG/NX二次开发 获取日志文件路径
效果:
代码:
#include "me.hpp"
string getLogPath()
{
char* cSysLog;
UF_ask_syslog_filename(&cSysLog);
string strSysLog = cSysLog;
UF_free(cSysLog);
return strSysLog;
}
extern DllExport void ufusr(char* param, int* returnCode, int rlen)
{
UF_initialize();
string strSysLog = getLogPath();
print("%s\n", strSysLog.c_str());
UF_terminate();
}
extern int ufusr_ask_unload(void)
{
return (UF_UNLOAD_IMMEDIATELY);
}