NXKnowledge

Community Knowledge > Gotchas and Pitfalls

What Journal Recording Doesn't Tell You: Limitations of Recorded NXOpen Code

Recording a journal (Tools → Journal → Record) is the standard first step recommended everywhere in the NXOpen community for learning how to automate a given operation — "the best way to learn NXOpen C++ seems to be to record a C++ journal for a desired process and study how it does its thing," per Eng-Tips discussion referenced elsewhere in this knowledge base. But community sources are consistent that recorded journals have real, specific limitations that matter once you move from learning to production tooling.

Journals must live in a single file, and can't reference external libraries

Per NX Journaling's beginner documentation, journal code cannot reference external libraries and must reside in a single file. This rules out sharing common utility code across multiple journals the normal way (e.g., a shared helper module) — anything a journal needs must be inlined, or you need to move to a compiled application (C++/C#/Java) if you want real code reuse across tools.

Recorded values are literal, not parameterized

SWMS's blog on NXOpen application extensions makes the point directly: journals "only transparently record values" — whatever you typed into a dialog during recording shows up as a hardcoded literal in the generated code. Turning a recorded journal into an actual reusable tool means deliberately replacing those literals with real input handling (a dialog, a Block UI Styler UI, or command-line arguments), which the recorder gives you no help with.

The recorder doesn't necessarily capture every property a builder needs

As documented in the SketchPolygonBuilder case elsewhere in this knowledge base: if a property happened to be sitting at its default value during the recorded session, the recorder may simply omit assigning it — even though that property can be strictly required for Commit() to succeed in other contexts. Anyone lifting recorded code into a general-purpose tool needs to check the builder's full property set against the API reference, not just trust that "the recorder would have included it if it mattered."

Practical takeaway

  • Use journal recording as documented — the fastest way to discover which NXOpen classes/methods a given operation actually uses.
  • Do not treat recorded code as production-ready: budget explicit work to (1) parameterize hardcoded literals, (2) verify builder properties against the API reference rather than trusting recorder omissions, and (3) restructure single-file journal code into a proper multi-file application if you need code reuse across tools.

Source: https://www.nxjournaling.com/content/beginning-journaling-using-nx-journal ; https://www.swms.de/en/blog/application-extensions-for-siemens-nx-with-the-nxopen-interface/ ; https://nxjournaling.com/content/incorrect-object-operation-sketchpolygonbuilder · retrieved 2026-07-08