×
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

If statement not possible with mixed units?

If statement not possible with mixed units?

If statement not possible with mixed units?

(OP)
In the Expression statement "If(Angle>0)(dimension1)else(dimension2) the variable Angle is in units of degrees and dimension1 and dimension2 are in units of inches. I get an error because of mixed units. Why is this not possible? I want one dimension for a positive angle and another dimension if the angle is negative. How can I accomplish this?

Thanks in advance,

Jim Weisner
Senior Designer

RE: If statement not possible with mixed units?

Any constants in the formula are interpreted as being in the units of the expression. It thinks that you are trying to compare an angular value to an inch value. To make it understand, you will need to specify the units on the number that you are comparing to.

Try this:

CODE

If(Angle>0[degrees])(dimension1)else(dimension2) 

www.nxjournaling.com

RE: If statement not possible with mixed units?

Nice trick !
I'll remember.

"My english is bad ? That's why i'am french."

RE: If statement not possible with mixed units?

(OP)
Thanks! It worked like a charm!!

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