I have been stuck some time trying to interface NX Open via external scripts that I have written. Here is an explanation of what I am trying to do:
I am currently designing classes and subroutines (in python) to automate NX assembly models which can edit the design variables and mass properties of the assembly. I have successfully written code snippets that generalize simple processes, such as translating and rotating objects, but the road block I am running into is the inability to import the NXOpen API into an external script which will run the desired class without opening NX at all. Every direction I go seems to be a dead end. I've tried editing my NXOpen environment variables to allow other python paths, and I've tried using the command "run_journal" only to realize I need the teamcenter installation to use this command which is out of our budget at the moment. In summary, I've been trying to run external files to execute NXOpen automation scripts outside of NX and cannot figure it out. I am willing to switch over to Java or VB if needed, but am not too sure how to do it in those languages as well.
If anyone has any insight or knowledge on this matter, any help would be greatly appreciated!
Thanks so much!
Sam
re: run_journal
You do not need a teamcenter license/install to use the run_journal command line utility.
https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:xid862706
I have successfully used the run_journal utility with VB code on a native (no teamcenter) NX installation. According to the help docs (link above), it appears the process is the same for Python journals.