×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Baffling Expression Error - NX9

Baffling Expression Error - NX9

Baffling Expression Error - NX9

(OP)
Since I've started to heavily use expressions I get this once in a while.

Ex: Expressions

Name Formula
Percentage_Clearance = p865 ( This value pulled from the attribute table) Actual Value = .08
T_Matl_X = "XXXX - 050 - 1"::T" (This value pulled from another part) Actual Value = .029

If I combine them in an expression like this:
Percentage_Clearance*T_Matl_X
I get this error: "Area was found where length was expected"

If I just change just 1 of the 2 expression names to the actual value like this:
Percentage_Clearance*.029
I get the correct result = .00232

Attribute type is Number and Length.

Is there a good reason why this doesn't work???

TIA

Dave

RE: Baffling Expression Error - NX9

You are multiplying 2 length values together and trying to put the result in another 'length' value expression.

Check the expression types of p865, Percentage_Clearance, and T_Matl_X.

www.nxjournaling.com

RE: Baffling Expression Error - NX9

(OP)
Yes Cowski your right... they are both length.

But I've written thousands of expressions in the last 3 months and they are either length or angle.
I rarely use angle and I've only encountered this error a very small percentage of the time.

If I use area the application of the resulting value is no good to me.

Isn't there a generic "number" type?
Percentage doesn't seem to be an option... which is what the .08 value is






RE: Baffling Expression Error - NX9

There is a "constant" type in the expressions which I almost exclusively use because sometimes you just don't know how an expression will be used in the future. Whether you agree with this practice or not it has never bitten me in any way, qualified by saying I don't do a lot of fancy mathematics.

RE: Baffling Expression Error - NX9

(OP)
OK.. I'm a moron. Never saw the "constant" just above length.


Live and learn!!

Thanks

Dave

RE: Baffling Expression Error - NX9

The changes made to the 'Expression' system (I can't recall exactly when that took place since the oldest version of NX that I currently have access to is NX 5.0) when we added support for Dimensionality and Units was part of an effort to provide not only a 'calculator-like' functionality but a true engineering 'formula builder' and solver.

As for the use of the 'Constant' Dimensionality, there are no problems with doing that since its use will in no way interfere with the use of Units or other Dimensionalities, as was already discovered. And of course, any legacy files from before these changes will be updated with the assumption that all previous expressions were simply created using the Dimensionality of 'Conatant'.

That being said, please be aware that as far as NX is concerned, whenever you create any sort of feature or constraint or whatever that includes expressions, they will be created using the appropriate Dimensionality and Units and these CANNOT be altered or modified. Now this shouldn't be a problem for users who have adopted this "always create 'Constant' expressions" approach but they will still need to be careful when setting the value of one expression defined by the system by referencing the value of another expression defined by the system since there will be no way to avoid having to use the proper Dimensionality.

As a bit of a side bar, Units are only an issue when you start mixing Dimensionalities, as has already been commented on, however when it comes to units WITHIN one Dimensionality type, for example, when working with 'Length' expressions, mixing Imperial (Inch, Feet, Mile, etc.) and Metric (Millimeters, Meters, Kilometers, etc.) units will simply convert the values so that you always get the correct 'size'.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Baffling Expression Error - NX9

(OP)
Good input and thanks!

I can't believe something so fundamental and obvious got passed me like that.

Now that I have this huge effort behind me hopefully having all the expressions I've made in "Length" isn't going to screw things up somewhere down the road.


Dave

RE: Baffling Expression Error - NX9

Generally speaking, unless your 'user-defined' expressions are being created specifically for use in some sort of engineering formula where Units and Dimensionality are required, you're probably better off just using the 'Constant' setting, particularly if they are going to be used only as operands, that is a number which will be used to multiply or divide some other expression by, whether that second expression has Dimensionality or not.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources