Inventor General

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

Inventor parameter.value in cm instead of default units

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

Hello,

 

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)
MsgBox(UserParams.Item("Testparam").Value)

 

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,

 

Arnold

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube