Inventor General Discussion

Inventor General Discussion

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

Inventor parameter.value in cm instead of default units

158 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,



Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.