Message 1 of 8
Help with ilogic rule number type format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I made this rule to get the overall part dimensions but for the parameter "Comprimento" (Length) it's coming with incorrect decimal values.
This part is 500 mm long, all the other dimensions are correct, what I'm doing right? I'm new to inventor and a newbie in programming, there is an image of my parameters.
If you look at "Espessura" (Thickness) and "Largura" (Width) it's displaying right.
thanks!
oDoc = ThisDoc.Document If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" 'Verifica se é do tipo sheet metal e calcula as dimensões e organiza-as Comprimento = Max(SheetMetal.FlatExtentsLength, SheetMetal.FlatExtentsWidth) Largura = Min(SheetMetal.FlatExtentsLength, SheetMetal.FlatExtentsWidth) Espessura = Thickness End If If oDoc.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}" 'Verifica se é do tipo normal e calcula as dimensões e organiza-as Float= z Float = a Float = b Float = c a = Measure.ExtentsLength b = Measure.ExtentsHeight c = Measure.ExtentsWidth If a>b Then z = a a = b b = z End If If a>c Then z = a a = c c = z End If If b>c Then z = b b = c c = z End If Comprimento = c Largura = b Espessura = a End If
Manuel Campos Costa