a'ゞ 闭眼听风 2023-01-10 19:05 采纳率: 0%
浏览 89

NX二次开发自动加载非DLL外挂异常

你好 一个大难题需要帮助
问题遇到的现象和发生背景 java开发的外挂放在startup目录下无法像dll一样自动加载外挂
遇到的现象和发生背景,请写出第一个错误信息
用代码块功能插入代码,请勿粘贴截图。 不用代码块回答率下降 50%
运行结果及详细报错内容
我的解答思路和尝试过的方法,不写自己思路的,回答率下降 60% 尝试过写一个简单的dll外挂打开cmd窗口命令运行java程序, 但是java程序会提示获取不到NX的 UFSession, 运行环境不符合获取session
我想要达到的结果,如果你需要快速回答,请尝试 “付费悬赏” 请问有没有方式 使用NXOpen获取其他函数库写一个简单的dll, dll里面操作NX打开.jar文件(即java的外挂)-即不是命令行窗口执行java外挂, 而是通过二次开发操作NX在NX软件中打开java外挂
  • 写回答

1条回答 默认 最新

  • 恩·艾克斯·红 2023-01-11 10:05
    关注

    在每个NX安装目录下都有案例,对应不同语言的源码,每个具体案例下会有一个说明文件,其中包含怎么运行和一些特殊说明,自己详细去看下。
    如下是一个JAVA开发后工具应该放置的路径和设置的环境变量:
    Files required
    Any part file
    ChangeFaceColor.java
    ChangeFaceColor.dlx
    The dlx file must be placed in one of the following locations:
    From where NX session is launched
    $UGII_USER_DIR/application
    For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly recommended. This variable is set to a full directory path to a file containing a list of root directories for all custom applications. e.g., UGII_CUSTOM_DIRECTORY_FILE=\ugii\menus\custom_dirs.dat

    以及如何运行这个工具的步骤:
    Unless noted otherwise, the commands in these instructions must be run from an NX command prompt. See the general notes of the examples for instructions on how to start an NX command prompt.
    Instructions for Windows: All commands are the same as in Unix except substitute "make" with "nmake -f Makefile_win".
    Interactive mode
    Compile the example with following command:
    make
    Start NX.
    Open any part file with some faces that you can select to change the face color. You can also create a new part file and create some faces by inserting features that create solid geometry.
    In NX, go to File - Execute - NX Open, select ChangeFaceColor.jar, and press Ok. The Change Face Color dialog will be displayed on the screen.
    Select one or more faces in the Face Collector block. You can specify face selection intent rules from the Face Rule list on the NX Top Border Bar.
    Select the new color for your selected faces using the Object Color Picker block.
    Click OK or Apply to set the color of the selected faces to the new color.

    评论

报告相同问题?

问题事件

  • 创建了问题 1月10日

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀