Again, I believe that setting up your Sheet Metal Styles would be the best route for this situation, but if we're going the iLogic rule route, here are a couple thoughts.
Have you considered using an expression (equation) that sets the Bend Radius based on the thickness, like (Thickness * 1.5) or (Thickness / 2), instead of a specific number?
If you went the equation route, then perhaps you would only need to change the equation when changing material type, instead of each thickness variation.
But if you already have an established thickness vs bend radius chart that you go by, try something like this to accomplish your task.
It starts out by checking to make sure the active document's type is Part document, and the document's SubType Name is SheetMetal. It then defines and sets the value of the SheetMetalComponentDefinition variable. It then checks the current value of the Thickness parameter, then sets either the Value or Expression of the BendRadius parameter, based on the thickness value.
If you have a fairly long list of thicknesses and bend radius value pairs (in an Excel spreadsheet), and you're set on using that, I would suggest using the value of the thickness parameter to match one of the values in the Thickness column of that Excel file, then capturing that row, then retrieve the corresponding BendRadius value to use locally to set the Parameter's value.
If ThisApplication.ActiveDocumentType = DocumentTypeEnum.kPartDocumentObject And _
ThisApplication.ActiveDocument.PropertySets.Item("Design Tracking Properties").Item("Document SubType Name").Value = "Sheet Metal" Then
Dim oCD As SheetMetalComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition
If oCD.Thickness.Value = .125 Then
oCD.BendRadius.Value = .1875
'or
'oCD.BendRadius.Expression = "Thickness * 1.5"
ElseIf oCD.Thickness.Value = .25 Then
oCD.BendRadius.Value = .375
'or
'oCD.BendRadius.Expression = "Thickness * 1.5"
End If
End If
I hope this helps.
If this solves your problem, or answers your questions, please click 'Accept As Solution".
Or, if this helps you reach your goal, please click 'LIKES" 👍.
Also, if you're interested, here are a few of the 'Ideas' I'd like to get implemented.
If you agree with any of them, please vote for them.
- Add more capabilities to the 'Customize' dialog box (exe. Add Tab & Add Panel) Click Here
- Constrain & Dimension Images In Assembly Sketches & Drawing Sketches (TitleBlocks & SketchedSymbols) Click Here
- Save Section View Status In DesignViewRepresentation (So It Can Be Used In The Drawing) Click Here
- Add SolidBodies Folder In iLogic Rule Editor Model Tab Click Here
- Convert All Views To Raster Before Autosave Stores To 'OldVersions' Folder Click Here
- SetDesignViewRepresentation - Fix limitations for DrawingView of a Part Click Here
- Create DocumentSubTypeEnum Click Here
- Add kRevisionTag or kDrawingRevisionTag to ObjectTypeEnum Click Here
Inventor 2020 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum
Wesley Crihfield

(Not an Autodesk Employee)