Inventor General Discussion

Inventor General Discussion

Valued Contributor
Posts: 60
Registered: ‎12-20-2012
Message 1 of 1 (171 Views)

Inventor parameter.value in cm instead of default units

171 Views, 0 Replies
11-27-2013 08:23 AM



I am exporting many parameters to my skeleton model

If I export a parameter with value 1mm, the result is 0.1


I made a quickfix by making all my parameters unitless, but this is not how i would like it.


I am testing a bit in ilogic to fix this, because i want to use degrees and milimeters instead of unitless.


Dim oDoc As Document = ThisDoc.Document
Dim UserParams As UserParameters = oDoc.ComponentDefinition.Parameters.UserParameters
Dim UserParam As UserParameter

UserParams.AddByExpression("Testparam", "1", UnitsTypeEnum.kDefaultDisplayLengthUnits)


My default length unit is 'mm' and 1 mm becomes 0.1mm when I sent it to my skeleton.



My question:


How can I make it possible that the parameter.Value = 1 regardless of wheter the parameter is mm, cm, inches or whatever?



Thanks in advance,



Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.