how to resolve dimension mismatch issue in expression editor
how to resolve dimension mismatch issue in expression editor
(OP)
Nx8.5
Hi all,
I am trying to do an experiment which uses "diameter" to determine the value of "angle" as shown in picture.
however, it says dimension mismatch...
my understanding is the If statement offers condition, it has nothing to do with caluclation in the "to do' right? why it says dimension mismatches, how to resolve? thank you
Hi all,
I am trying to do an experiment which uses "diameter" to determine the value of "angle" as shown in picture.
however, it says dimension mismatch...
my understanding is the If statement offers condition, it has nothing to do with caluclation in the "to do' right? why it says dimension mismatches, how to resolve? thank you





RE: how to resolve dimension mismatch issue in expression editor
CODE
If the "5" represents inches, then use "5in" instead...
Alternately, you could set up another expression value to define the changeover point. Something like:
cutoff (units: length), value: 5
then the angle expression would be:
CODE
www.nxjournaling.com
RE: how to resolve dimension mismatch issue in expression editor
And another question arises..
if I wrote:
if (diameter > 0mm && diameter <=5mm) (10)
else if (diameter > 5mm) (25)
error says; the specified string contains syntax error
error here: else if ( diameter > 5mm) (25);
thanks again
RE: how to resolve dimension mismatch issue in expression editor
if (diameter > 0mm && diameter <=5mm) (10)
else if (diameter > 5mm) (25)
else
(30)
RE: how to resolve dimension mismatch issue in expression editor
CODE
Do you anticipate negative diameter values? If not, your expression can be simplified to:
CODE
www.nxjournaling.com
RE: how to resolve dimension mismatch issue in expression editor
i copied pasted your code to the editor but doesnt work, it gives this error ( see picture)
what i am doing now is try to get a feel of the if-else statement in the NX expression editor, has nothing to do with any modeling, just try to learn its syntax.
RE: how to resolve dimension mismatch issue in expression editor
www.nxjournaling.com
RE: how to resolve dimension mismatch issue in expression editor
RE: how to resolve dimension mismatch issue in expression editor
RE: how to resolve dimension mismatch issue in expression editor
www.nxjournaling.com
RE: how to resolve dimension mismatch issue in expression editor
RE: how to resolve dimension mismatch issue in expression editor
www.nxjournaling.com
RE: how to resolve dimension mismatch issue in expression editor
NX epxression editior kind of different from VB syntax and Excel syntax, need to get used to it