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
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
Check the expression types of p865, Percentage_Clearance, and T_Matl_X.
www.nxjournaling.com
RE: Baffling Expression Error - NX9
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
RE: Baffling Expression Error - NX9
Live and learn!!
Thanks
Dave
RE: Baffling Expression Error - NX9
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
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
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.