Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get my iLogic I've been using to output the Length custom property to ft-in. Right now it sets everything in inches rounded to the 1/16".
Any ideas? Any help would be GREATLY appreciated.
Thanks.
iLogicVb.RunRule("TOGGLEWORKFEATURES")
InventorVb.DocumentUpdate()
SPECAdder = 0
Smallest = Measure.ExtentsLength
Middle = 0
Largest = 0
If Measure.ExtentsWidth > Measure.ExtentsLength Then
Middle = Measure.ExtentsWidth
Else
Smallest = Measure.ExtentsWidth
Middle = Measure.ExtentsLength
End If
If Measure.ExtentsHeight > Middle Then
Largest = Measure.ExtentsHeight
Else
If Measure.ExtentsHeight > Smallest Then
Largest = Middle
Middle = Measure.ExtentsHeight
Else
Largest = Middle
Middle = Smallest
Smallest = Measure.ExtentsHeight
End If
End If
Largest = Largest + SPECAdder
'iProperties.Value("Project", "Stock Number") = Round(Largest, 1) & "x" & Round(Middle ,1) & "x" & Round(Smallest , 1) & " "
iProperties.Value("Custom", "LENGTH") = RoundToFraction(Largest, 1/16, RoundingMethod.RoundUp)
iProperties.Value("Custom", "WIDTH") = RoundToFraction(Middle, 1/16, RoundingMethod.RoundUp)
iProperties.Value("Custom", "HEIGHT") = RoundToFraction(Smallest, 1/16, RoundingMethod.RoundUp)
iProperties.Value("Custom", "SECTION DIMS") = CStr(RoundToFraction(Smallest, 1 / 16, RoundingMethod.RoundUp)) + " X " + CStr(RoundToFraction(Middle, 1 / 16, RoundingMethod.RoundUp))
'iProperties.Value("Custom", "LENGTHMM") = iProperties.Value("Custom", "LENGTH") * 25.4
'iProperties.Value("Custom", "WIDTHMM") = iProperties.Value("Custom", "WIDTH") * 25.4
'iProperties.Value("Custom", "HEIGHTMM") = iProperties.Value("Custom", "HEIGHT") * 25.4
This is the TOGGLEWORKFEATURES iLogic
For Each oWorkPlane In ThisDoc.Document.ComponentDefinition.WorkPlanes
oWorkPlane.Visible = False
Next
For Each oWorkAxis In ThisDoc.Document.ComponentDefinition.WorkAxes
oWorkAxis.Visible = False
Next
For Each oWorkPoint In ThisDoc.Document.ComponentDefinition.WorkPoints
oWorkPoint.Visible = False
Next
Solved! Go to Solution.