Is there a function to retrieve the unitless version of a user parameter?

Is there a function to retrieve the unitless version of a user parameter?

bassbonematt
Enthusiast Enthusiast
495 Views
4 Replies
Message 1 of 5

Is there a function to retrieve the unitless version of a user parameter?

bassbonematt
Enthusiast
Enthusiast

When creating user parameters, I often need to use exponents, square roots, etc., and these math functions either require unitless input, or when given unit-ed input, the resulting output no longer matches the unit of the parameter I'm defining, e.g. if x=2 in., x^2 results in 4 in^2, which means the unit for the parameter must be in^2.

 

Is there a function to retrieve the unitless version of a parameter? That would solve this problem, but if you have other tips to work around this, I'd love to hear them! Right now, I end up defining two different versions of the same parameter--one with a unit and one that's no unit. That kinda sucks.

0 Likes
Accepted solutions (1)
496 Views
4 Replies
Replies (4)
Message 2 of 5

g-andresen
Consultant
Consultant
Accepted solution

Hi,

for your example: 4 in / 1 in = 4

 

günther

Message 3 of 5

bassbonematt
Enthusiast
Enthusiast

While that's kinda clunky, it's a step better than what I had been doing. Thank you! I would still like to see Autodesk implement a function to retrieve the unitless value of a parameter, though, as that would be even cleaner.

0 Likes
Message 4 of 5

g-andresen
Consultant
Consultant

Hi,

in such a case I define a user parameter „ Unit“  > value = 1in

günther

0 Likes
Message 5 of 5

HughesTooling
Consultant
Consultant

You can just divide by the units, no need to add the 1.

Clipboard11.png

Mark

Mark Hughes
Owner, Hughes Tooling
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