
Frederik, the scripting engineer, introduces the Siemens NX beginner NXOpen course (Python). He invites questions, offers help, and wishes you luck as you begin.
Learn essential Python concepts for NXOpen, including imports, data types, string operations, lists, object-oriented dot notation, loops, conditionals, functions, and type hints, with setup in VSCode or PyCharm.
Explore installing Python to enable code completion and intellisense in NXOpen, using NX’s built-in Python version and sample journals like hello_world and print_nx_python_version.
Install Visual Studio Code and the Python extension, set up Pylance and NX Python stub files to enable IntelliSense for the Hello World journal and the print and Python version.
Learn to install and set up PyCharm Community Edition for NXOpen, configure the Python interpreter with NXOpen paths, and enable code completion and intellisense to start coding journals.
Discover NXOpen Python resources, set up Visual Studio Code with the Python extension, and access NXOpen Python references, documentation, and builder considerations for efficient scripting.
Learn how to record a Python journal and replay that same Python journal.
Inspect the NXOpen journal in VS code, remove unnecessary imports and model manipulation, then re-record with no manipulation, adjust color values, and run to verify the result.
Build a list of all bodies from WorkPart in NXOpen, iterate over it, and assign a new color. Eliminate FindObject to make the journal universal across parts.
Refactor the code in functions and add a different color for each body in the part.
Color every face in a part with a random color using NXOpen Python. Retrieve faces with GetFaces and apply color via display modifications to all faces as DisplayableObject.
Learn to move bodies to a specific layer in Siemens NX using NXOpen Python by defining a move_object_to_layer function, passing DisplayableObject bodies and an integer layer to MoveDisplayableObjects.
Move datums and sketches to a specific layer by filtering for datum planes and sketches in the NXOpen work part, then apply layer changes and test in NX.
Learn to list all objects on a specific layer using NXOpen in Python, via the layer manager and the get all objects on layer function, printing types and journal identifiers.
Explore the NXOpen model history tree by listing and inspecting features, their parents and children, including sketches, datum coordinate systems, planes, and extrudes, using journal identifiers and intellisense in Python.
Learn to create a string attribute named my attribute with value hello on solid bodies in nxopen using python, and manage attribute builders, commits, and tests.
Learn how to update attributes in NXOpen Python by using the attribute properties builder on the work part, editing the string attribute, and committing the update to apply changes.
Learn to read attributes in NXOpen with Python, using GetUserAttribute to fetch attribute values and compare builders with pure code for better performance.
Create and display a message box in NXOpen Python to interact with users, using the UI to show information, warnings, errors, and questions, and handle the resulting responses.
Simple input and file selection
Use the nx selection manager to pick a single object with selectTaggedObject, specifying message, title, and scope, and handle the response as a tagged object and a Point3d cursor.
Learn to select a solid body in NXOpen, cast it for color updates, and change its color with a reusable color_body function via pre-selection.
Create a custom toolbar in NXOpen, add a 'My Tools' tab, and configure a color command that runs nx_selection2.py with hover text. Explore grouping and system commands for interactive customization.
Configure UGII_USER_DIR and Windows environment variables to load custom toolbars in NX at startup, then place scripts in UGII_USER_DIR/application and startup to create your own tools.
Winner of the 2025 Siemens Techcellence community champion award and the Community Catalyst Tutotial Titan award
Siemens NX has a powerfull feature called NXOpen. It is a set of API's which you can use create your own programs or journals as they are called.
In this course you will learn how you can use NXOpen to create your own programs. You don't need any NXOpen experience as we take it from the beginning, but even people with NXOpen experience will benefit from this course. We start by setting up the development environment using Visual Studio Code. I have chosen VS Code because it is free, it is popular so a lot of extensions and tutorials exist and (for people in a corporate environment) it can be installed without having admin privileges. But for the pythonists out there, I also show how to install and configure Pycharm.
During this course we will learn how to change the color of bodies and faces, move objects to layers and work with attributes. Through these basic programs you will get familiar with NXOpen and you will be able to apply these skills to create your own NXOpen journals.
At the end of the course there is an additional section on how to handle user interaction and we finish the course with a section on how to easily access and share you programs.
This course is in Python, the programming language for engineers, but even if you prefer another language you will be able to apply the code and concepts from this course.