Formula in Parameters - not working

Formula in Parameters - not working

Dennis-Ash
Community Visitor Community Visitor
1,570 Views
5 Replies
Message 1 of 6

Formula in Parameters - not working

Dennis-Ash
Community Visitor
Community Visitor

Hi Guys, 

 

I have found a bit of a bug when entering formulas into the Parameters specifically "sqrt"

The "sqrt" function will only accept numbers and does not allow you to reference another formula in the list, example.

I have a parameter called "H1" it is an expression that gives a result of 9mm

sqrt(H1) - is not valid

sqrt(9) gives a result of 3

it is a little frustrating when setting up a fully parametric model because it means each time the H1 expression changes I need to manually update the number in the sqrt function.

 

Am I doing something wrong or is this a bug in the system? 

0 Likes
1,571 Views
5 Replies
Replies (5)
Message 2 of 6

jeff_strater
Community Manager
Community Manager

I'd say it is a "quirk" more than a bug.  Fusion is very picky about units.  "sqrt(9 mm)" will fail, because the resulting units would be "square root of millimeter".  You can make it work (whether it is referring to another parameter or a constant) by adding "/1mm" so that the units cancel out.  In your case:  "sqrt(H1 / 1 mm)" should work.


Jeff Strater
Engineering Director
Message 3 of 6

jbrett
Explorer
Explorer

Thank you for that "/1mm" tip... I was hitting my head against the wall for a while trying to find any reference to it in the product documentation.

 

Perhaps that could be added to the "parameters reference" page of the F360 product documentation... it is pretty important and not really an intuitive thing.

 

Perhaps the better solution is to forward it to the software update team so that it provides a useful error message?

 

Anyway... at least I eventually found this post.

 

Jason

0 Likes
Message 4 of 6

jhackney1972
Consultant
Consultant

I propose to you another method of handling units.  Take a look at the Screencast.  This method of not using units in the parameter table works for most function except those requiring units such as ASIN or ATAN.  If it is not clear, when I place the dimension, in the sketch, and type "C" to get the variable then is when I type, after the variable, a "*1" (without the quotes). Fusion will automatically multiple the variable by 1 unit of the specified units of the model, in my case inches.   The nice thing about this method, you do not have to worry about units, generally, within your entire parameter table.

 

 

John Hackney, Retired
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 5 of 6

jbrett
Explorer
Explorer

Thanks! That's another tip that really belongs in the documentation, but I'm glad I found it here.

 

A bit late, as I've already started building up my parameter table and it seems that I can't go back and edit units... but next time I'll try and go unitless as much as possible.

 

Jason

0 Likes
Message 6 of 6

TheCADWhisperer
Consultant
Consultant

@jbrett wrote:

Thanks! That's another tip that really belongs in the documentation….


Really though this goes back to basic freshman  HS math class where the teacher (at least mine did) constantly admonished, “Do not ignore the units, properly handle the units.”  49 years later I am still suggesting to my students that they write out equations long-hand including the canceling of units to understand how ANY CAD software requires the same nomenclature.

0 Likes