Siemens NX is a CAD package used to create 3D models and engineering drawings. It can be used for a variety of purposes, including product development, manufacturing, and engineering.
Within Siemens NX, you can use formulas (i.e. expressions) to drive CAD geometry and drawings. To make these expressions easier to read and understand, you can rename your expression variables.
This is particularly useful if you are creating a CAD model with complex geometry, or geometry that you may want to easily change in the future.
In this article, I will explain the fundamentals of expressions in Siemens NX and how you can rename your expression variables to make your CAD models easier to change, read and understand.
What Are Expressions In Siemens NX?
To quote the Siemens NX manual directly; “Expressions are arithmetic or conditional formulas that define some characteristics of features.” [source]
In simple terms, this means that you can use formulas (expressions) to control your CAD geometry.
Instead of entering just a basic dimension, you can enter an equation which will maintain a relationship within your CAD.
Expressions can be very simple or complex, depending on your requirement.
It is possible to enter very complex expressions, for example, expressions which use if / else statements, variables, operators, symbols or a combination of the above.
How Do You Use Expressions In Siemens NX?
To get started with expressions in Siemens NX, it is best to start with simple geometry to understand how to enter and access expressions.
For example, if you have a model of a rectangle and you would like one side of the rectangle to be twice the length of the other, you can actually set up this relationship using expressions.
In the following image, I have shown the rectangle with the length of each side labelled as A, B. (More later on how to label your dimensions)
Side B is twice the length of side A and this is controlled by using a formula.
As I want one side to be twice as long as the other, I have simply typed the following into the dimension box.
To overwrite a dimension, just enter an expression into the standard dimension box.
How To Rename Expression Parameters In Siemens NX?
You may have noticed that when you enter a dimension in Siemens NX geometry, Siemens NX assigns a name to it automatically.
This automatically generated name will typically be the letter p, followed by a number, for example:
As I understand it, the “p” stands for parameter and the number is just the next number to identify the dimension.
When you start working with complex expressions or want to share your model with others, having every dimension labelled as “p” is not easy to follow.
Instead, you might want to label your parameter as something meaningful.
To rename expression parameters in Siemens NX, complete the following:
- Click “Ctrl E” to bring up the list of expressions.
If this shortcut does not work for you, in the menu bar select “Tools”, then click on “Expressions”.
- This will then show you a list of the parameters (for example dimensions) and expressions you have entered.
- To rename a parameter, double-click on it and enter a more meaningful name.
- You need to ensure that the name you enter does not have any spaces, or else Siemens will throw an error.
When Should You Use Expressions In Siemens NX?
Once you discover the power of using expressions in Siemens NX, it can make the design and modelling of products so much easier.
It can be tempting to use expressions everywhere, but should you do this?
From my years of experience working in the design and manufacturing industry with Siemens NX, expressions are great to use at the following times:
- To control complex geometry
- To set up relationships between dimensions.
- To input dimensions that are derived from formulas
- To parametrise models that may need updating in the future.
If you are working as part of a CAD team and your model is shared, it is important to consider your team before using expressions.
- Within a team, only use expressions if they are well understood by your team. Otherwise, future CAD operators will not understand your CAD model and find it too hard to edit.
- If you are working within a team, it can be essential to rename your expression parameters with meaningful names, so your model is easy to understand.
Expressions are a very powerful modelling tool within the Siemens NX package.
If used correctly, they can speed up your modelling process, reduce errors and allow you to control and change complex geometry very easily.
It is important to label your expressions clearly in NX if other CAD users will be viewing your model.
For more details on Siemens NX expressions, I recommend checking out the official documentation here.