Message 1 of 4
UOM strikes again
Not applicable
07-05-2006
09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings All!
I'm attempting to determine the value of a specific table parameter.
Given: the IPT file kdefaultdisplaylengthunits = inches
Various results of expression values ...
?oTableParams.Item("tapholediameter").Expression = "0.375 in"
?oTableParams.Item("tapholediameter").Units = "in"
?oTableParams.Item("tapholediameter").Value = .9525 (I see Inventor stores the value preconverted to "cm", fine and dandy!)
'Now I want to return the value in inches ....
oUOM.GetValueFromExpression(oTableParams.Item("tapholediameter").Value,kinchlengthunits) = 2.41935
Why is the value returned converted again to "cm", not converted to "in"?
.375 in * 25.4 / 10 = .9525 cm
.9525cm / 25.4 * 10 = .375 in
.9525 * 25.4 / 10 = 2.41935 cm
Now this is interesting!
Thanks,
Brian
I'm attempting to determine the value of a specific table parameter.
Given: the IPT file kdefaultdisplaylengthunits = inches
Various results of expression values ...
?oTableParams.Item("tapholediameter").Expression = "0.375 in"
?oTableParams.Item("tapholediameter").Units = "in"
?oTableParams.Item("tapholediameter").Value = .9525 (I see Inventor stores the value preconverted to "cm", fine and dandy!)
'Now I want to return the value in inches ....
oUOM.GetValueFromExpression(oTableParams.Item("tapholediameter").Value,kinchlengthunits) = 2.41935
Why is the value returned converted again to "cm", not converted to "in"?
.375 in * 25.4 / 10 = .9525 cm
.9525cm / 25.4 * 10 = .375 in
.9525 * 25.4 / 10 = 2.41935 cm
Now this is interesting!
Thanks,
Brian