Ceil Function not working

Ceil Function not working

Anonymous
Not applicable
1,084 Views
4 Replies
Message 1 of 5

Ceil Function not working

Anonymous
Not applicable

Hi, 

 

Im having a problem getting my equation to give me the next highest number of inches. I understand ceil wants unitess and this whole problem is based around units, but after reading other posts about this issue and trying to replicate their solutions, i am still not getting the result i need. heres the scenerio:

 

- I have a linked parameter "Height" which is in inches

 

- i need to change the length parameter of an object to be 70% larger than "Height"

 

- I have input into the length parameter (Height*1.70 ul)

 

- I want the result to be the next highest whole number

 

once i type "ceil" at the front of the equation, it gets highlighted red and says "Warning: Unit Specifiction Mismatched"

 

My result needs to be a length in inches.

 

Also the object whos length is determined by this formula is an angle from the content center. I am not sure if that makes any difference but I thought I would add that information. There are many default parameters for object from the content center so im thinking i could possibly have my equation in the wrong feild.

 

Anways, any help is appreciated! 

 

Thanks 

Sandro

0 Likes
1,085 Views
4 Replies
Replies (4)
Message 2 of 5

JDMather
Consultant
Consultant

@Anonymous wrote:

 

- I have input into the length parameter (Height*1.70 ul) 

Sandro


This doesn't make sense?

How would this cancel out the units.

 

10 inches*1.7 ul = 17 inches, not 17 ul

 

Your equation must be written to cancel out the units, do the ceil and then reapply the units.

 

When generating formulas I like to do it as I was taught in HS.

Write it out by hand in pencil and cross through units as they are canceled and show remaining units.

I remember how our HS teacher used to rant on and on about how you can't just ignor the units....


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes
Message 3 of 5

Anonymous
Not applicable
I understand that that is the issue.

I just don't know how to write the equation out.

in your equation, I want that 17in not 17ul
0 Likes
Message 4 of 5

Anonymous
Not applicable
actually i think ive figured this out.

I wrote the equation as

(ceil((Height*1.7ul)/1in))*1in

seems to work, not sure if any of that is unnecessary, but the end result works so ill probably keep it that way.
0 Likes
Message 5 of 5

JDMather
Consultant
Consultant

Looks to me like you got it.

Good job!


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes