Message 1 of 1
ilogic : A method of recognizing and displaying the size of a model by shape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I use ilogic to display the size of the model in the stock number.
Horizontal, vertical and height display of square shape.
Horizontal, vertical, height and thickness of sheet metal.
Diameter and length of cylinder shape.
The above three types of rules to see the shape of the model is selected.
By the way, I want to find ilogic to recognize and express automatically.
I'll put the .ipt file in the attachment.
The version is inventor 2020.
Translated into Google Translator, the grammar may not be correct.
Help me ~
rules
1.
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) & " "
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) & "x" & Round(Thickness, 1) & "t" iProperties.Value("Custom", "thickness") = Round(Thickness , 1) & "t"
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(Smallest, 1) & "x" & Round(Largest, 1) & "L"