Any idea why this equation is not working?

Any idea why this equation is not working?

chris
Advisor Advisor
622 Views
7 Replies
Message 1 of 8

Any idea why this equation is not working?

chris
Advisor
Advisor

I do this 100's of times a day, but for some reason, this is not working, an "inch" number divided by an "inch" number?

 

Yeah, this is going to be a problem!

 

 

chris_0-1714700551368.png

chris_0-1714701060510.png

 

 

 

 

0 Likes
Accepted solutions (3)
623 Views
7 Replies
Replies (7)
Message 2 of 8

SBix26
Consultant
Consultant

Because Test3 units are also inches.  Inches divided by inches should be unitless.


Sam B

Inventor Pro 2025 | Windows 11 Home 23H2
autodesk-expert-elite-member-logo-1line-rgb-black.png

Message 3 of 8

chris
Advisor
Advisor

@SBix26  Now you have me going back and looking at older parts parameter equations... this can't be the first time I've encountered dividing/multiplying to "inch" numbers together...

 

well this worked, pain the *** to have to do this, makes the equations so long for more involved equations.

Test3 = Test1 / ((Test2)/1in)

 

Interesting, iLogic returns the correct number, even though Test3 is inches, and it's written like this: 

Test3 = Test1 / Test2

Message 4 of 8

SBix26
Consultant
Consultant

It's not logical to expect inches as the result, though.  Length divided by length gives you a result that tells you how many times (unitless) the one goes into the other.  Can you explain the rationale for dividing length units and expecting a length unit as the result?


Sam B

Inventor Pro 2025 | Windows 11 Home 23H2
autodesk-expert-elite-member-logo-1line-rgb-black.png

Message 5 of 8

chris
Advisor
Advisor

actually, I wasn't thinking about the unit, I was just thinking about the number, because this isn't an issue with (addition and subtraction), no big deal, I've made the change now, but something like this is a lot easier to write than the highlighted  equation (see image) 

chris_0-1714704510278.png

 

 

0 Likes
Message 6 of 8

cidhelp
Collaborator
Collaborator
Accepted solution

Hello @chris ,

 

if the parameters have a length unit, I can type like your red annotation. On pressing Enter Inventor is adding some units (grd is german for deg and oE for ul) but results correct.

 

Message 7 of 8

CCarreiras
Mentor
Mentor
Accepted solution

Other option is to quick change the expected unit:

 

CCarreiras_0-1714730533164.png

 

CCarreiras

EESignature

Message 8 of 8

SBix26
Consultant
Consultant
Accepted solution

If AS2 is a length (inches), then your equation as you show in red makes perfect sense.  However, you have AS2 in degrees, so I'm not at all clear how that works.

 

If AS2 is inches, then the equation is this: LOD * sin (45 deg / 2 ul).

 

Sounds as if you have not had to deal with calculations involving measurement units very much.  Units are a great way to check that you've gotten an equation formulated properly.  If you are looking for area, for example, and your equation doesn't end up with square length units (in^2, for example), something is probably not right with your equation.  If you're looking for speed, your equation needs to divide distance by time (m/sec, for example).

 

There are the odd situations where the units don't make logical sense (though I can't think of one at the moment), and then you have to do as you've shown in your image.  But that should be extremely rare in any real-world application.


Sam B

Inventor Pro 2025 | Windows 11 Home 23H2
autodesk-expert-elite-member-logo-1line-rgb-black.png