Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

nx customization using java

Status
Not open for further replies.

yadvdinesh

Aerospace
Apr 13, 2015
31
Hi,

I want to create journals in nx using java language. I am using eclipse for writing journals. I have the help file of NX open with me.

Can someone tell me where to find nx open API packages & how to import them in eclipse? When I am writing import nxopen.* in eclipse, its showing me "The import nxopen can not be resolved".

Thanx
 
Replies continue below

Recommended for you

So, two answers for you here... :)

FIRST ANSWER:

While Journaling can be used to record actions into Java:

150420_journaling_preferences.png


...Java code cannot be played back through the Journaling mechanism in NX:

150420_journaling_playback.png


As stated, Java code must be compiled and executed like any other compiled NX Open application.

Runtime support is available for .NET Journals (VB and C#) and in NX 10, for Python.

Hope that helps clarify the "Journaling" situation!

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
SECOND ANSWER:

If you're just writing NX Open automation in Eclipse using Java (not technically Journaling) then here's the answer to the question you actually asked. :)

For the project in Eclipse, right click on the project in the Package Explorer and select “Configure Build Path”.

Click on the Java Build Path, and then the Libraries Tab. You want to "Add External Jars", and ad the NXOpen jar files to the build path.

150420_includes_for_java.png


For sure you'll want NXOpen.jar. The other two NXOpenUF and NXOpenUI are more specific if you need either user function calls or some interactive calls. In the image above, the developer has added a few more for this particular project, but that is the basic idea. Normally the NXOpen.jar file is in the …\kits\ugii directory of the installation. Here, the developer had copied it to another location, but that should not be necessary for a customer install.

Does that help?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Thank you so much Taylor. I was looking for the information which you have provided in the second answer :)
 
No problem. That was my guess. :)

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor