Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Problem with expression units 2

Status
Not open for further replies.

gieter

Materials
Jun 3, 2003
122
We recently upgraded from NX3 to NX6. Eversince we run into one problem after the other and all these problems are related to expression units.
Expression units were introduced in NX3 and in all pre-NX3 files used in the newer versions the units were left blank. NX3 ignored this, but now in NX6 it is not accepted anymore. The units MUST match.
I already have a PR on problems with part family member substitution, but it seems to be all over the place and it's frustrating me that much that I consider going back to NX3.
The main problem is that I can't edit the units in the expression editor or the choice is for some reason restricted to e.g. only length units.
Has anyone ran into the same problems and if so, can it be solved in a simple way?
I don't want to make a GTAC call on this because everytime they ask me to send part files and this is as annoying as the problem itself.

"There are easier ways of earning a living than in the casting industry. But few are as exiting"
After Prof. John Campbell

Gieter
 
Replies continue below

Recommended for you

Gieter,

It's called progress !

However, I couldn't agree with you more. They're a pain when dealing with legacy files.

For me I hve two options, the first is creating an intermediate expression, allowing the 'fixing' of the units.

The second option, and I guess it's simply delaying the inevitable, is to continue using the pre-Nx3 expression dialog. Simply create a MEN file (eg expression.men) in your /Startup folder and paste in the following ...

VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

AFTER UG_INSERT_DLEXPRESSION
BUTTON UG_TOOLBOX_EXPRESSION
LABEL Pre-Nx3 Expression...
ACCELERATOR Ctrl+Shift+E
ACTIONS STANDARD
END_OF_AFTER

This will give you access to both expression dialogs.

Specialty Engineered Automation (SEA)
a UGS Foundation Partner
 
Just to weigh in, once you get going with the current way that NX deals with units, it is actually highly useful in ensuring correct evaluation/entry of functions. You can get very creative with combinations of expressions, measurements of (volume, surface area, length etc) and the unit-aware backbone helps eliminate mistakes.
 
Can you please provide some explicit examples of where you are having a conflict with respect to pre-NX 3 part file expressions and NX 6 expressions?

Nothing has changed that I'm aware of since NX 3 except the introduction of additional Expression 'Types', such as now having an Expression which could represent something other than a Number (note that 'Number' is the default which means that unless you change this, it will behave just like expressions have always behaved and note that this has nothing to do with Units or Dimensionality except that they are ONLY relevant with respect to Number type Expressions). The other new Expression 'Types', include String, Boolean, Integer, Point and Vector.

To start with, there is a difference between 'Units' and 'Dimensionality'. Units generally are not the problem as long as the Dimensionality's match. Units are how a parameter is being measured such as a Length being in Millimeters or Inches, or some other unit of LINEAR measure. 'Length' however is a Dimensionality, as are Angle, or Area, or Volume, etc. all different Dimensionality's, each of which has certain expectations as to what the Units will be, such as an Angle will generally only have the Units of Degrees or Radians, whereas Volume has some linear Unit raised to the power of 3 or 'cubed'. This is just plain old, well understood mathematical principles.

The way the expression system now works (and has since NX 3) is that IF an expression has Dimensionality and you are creating a 'formula' where one expression is being referenced by another then the usage of that Expression will depend on the Dimensionality making sense. For example you will not be allowed to set an expression representing an Angle equal to an expression which has a Dimensionality of Length, and so on. This also means that I can't set an Area expression equal to an Expression for Length, however I could create a Formula where 2 Length expressions are multiplied by each other such as in the format of...

Exp(Area)=Exp(Length)*Exp(Length)

Or if it were Volume you'd have...

Exp(Volume)=Exp(Length)*Exp(Length)* Exp(Length)

...or even...

Exp(Volume)=Exp(Area)*Exp(Length)

Now in addition to normal engineering Dimensionality's that one would expect to find in a sophisticated Engineering system, NX also provides support for Numbers which have no Units and these have a Dimensionality of 'Constant'. Now this is also a needed convention since there are many mathematical values which are Constants (i.e. have NO units) and so any number created as a Constant will not conflict with ANY other expression's Units or Dimensionality. Note that ALL pre-NX 3 part files opened in NX 3, or later release, the legacy expressions will ALL be considered to have the Dimensionality of 'Constant' with NO Units assigned. Therefore, there should be NO problems with using these expressions in combination with ANY other Expression, be it a legacy Expression or a new one created in the current release of NX. The only thing that you need to keep in mind is that while there are no Units assigned to these legacy Expressions, we do know which ones represent linear versus angular parameters and we also enforce the rule that all linear parameters show values based on the base units of the part file. Therefore if the part file is a Metric file, the assumed linear units are Millimeters. If the part was created as an Imperial (AKA English) Part file, then the assumed linear units are Inches (Angles are assumed to be Degrees irrespective of the base units of the part file).

So unless you can show us that something other than the issues described above are what you're talking about, we have to assume that NX is working as expected and that the problems must lie with the way that you are using the software and that these attempts are violating the guidelines for using the Expression system as an Engineering Formula builder.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Thanks Phillpd for the usefull advise.

To John: I recognise that units and dimensionality can be very usefull. But I find it frustrating when a software makes decissions for me that I can't override. Moreover it's not consistent.

An example: I have an nx1 part that contains an expression for an angle. I take this part into an assembly. In the assembly I create circular component array of 2 components. I then make a link from the top assembly to the (undimensioned) angle expression of the assembly component. In the heat of the battle I ofcoarse forget to choose a unit for the new angle expression in the top assembly and i replace the angle value I had put in in the array by the new expression. I then receive an error message for a unit dismatch on the first array. The funny thing is that the second array doesn't complain at all!

Once You have used an expression it is no longer possible to change the unit, nor the dimensionality. This means you have to undo the changes and do the whole thing all over again.

As said on old part family's there is a PR 1709899.

"There are easier ways of earning a living than in the casting industry. But few are as exiting"
After Prof. John Campbell

Gieter
 
I agree with Gieter, I have been facing the problem of "not able to edit" the units of already created expressions.
 
Generally the only reason that you can NOT edit the units or dimensionality of an expression is because that expression is ALREADY being referenced by another expression or was created by NX when a feature was added to the model and therefore if it were possible to change the original expression's 'intent', that this would cause an error where the expression is being used.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Then, you take the following example

In Tools->Expression, create K=1 (with length as its dimensionality), after hitting Enter, you can not edit its dimensionality, right! although this expression is not at all used anywhere! There should be option of editing an expression's dimensionality and units if it is not used or referenced anywhere. I mean to say, at least for newly created expressions that will be referenced by next features. For example, I create expressions for Diameter, Length and so on before starting the first sketch while creating Part Families, and it is annoying to recreate them if I miss dimensionality of a variable.
 
I'm sorry but I have NO problem whatsoever in editing the dimensionality of an expression which I just created as long as I don't first reference it in some other expression. See the attached video.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor