Message 1 of 8
Change lofted flange output type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using Inventor 2019, I have a sheet metal part with a lofted flange that creates a simple cone. I want to create iLogic that changes the lofted flange "output type" trait back and forth between Die Formed and any kind of Press Brake. I created the following code, which successfully changes from Press Brake to Die Formed, but it fails to change from Die Formed to Press Brake.
Imports Inventor
Sub Main
Dim oCone As LoftedFlangeFeature = Feature.InventorFeature("PlateCone")
Dim oConeDef As LoftedFlangeDefinition = oCone.Definition.Copy
Dim bChange As Boolean = False
If PressBrake AndAlso oConeDef.OutputType = LoftedFlangeOutputTypeEnum.kDieFormedLoftedFlange Then
oConeDef.SetOutputType(LoftedFlangeOutputTypeEnum.kPressBrakeChordToleranceLoftedFlange, "0.1 in")
bChange = True
ElseIf Not PressBrake AndAlso Not oConeDef.OutputType = LoftedFlangeOutputTypeEnum.kDieFormedLoftedFlange Then
oConeDef.SetOutputType(LoftedFlangeOutputTypeEnum.kDieFormedLoftedFlange)
bChange = True
End If
If bChange Then
oCone.Definition = oConeDef
InventorVb.DocumentUpdate()
End If
End Sub
"PressBrake" is a boolean parameter.
Thanks.