Message 1 of 7
Trying to round up parameters with the unit type mm in factory layouts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to figure out how to round up parameters which are in mm. I have the following code which works in my multibody part/asset builder. But when i publis it and put in the factory enviroment i have pin point it doesn't go through the loop i made.
Dim UserParams As UserParameters UserParams = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters For Each Item In UserParams If Item.Units = "mm" Then Dim Converter As Integer = Item.value * 10 Parameter(Item.name) = Ceil(Converter) End If Next RuleParametersOutput InventorVb.DocumentUpdate()
Combined with that finding and the fact that i don't see "mm" behind the numbers in the factory properties, makes me think the parameters are unitless there or something, which makes this code useless. Does anyone knows a way to make this work?