iLogic: Show Flat Pattern Orientation

Guest Post by Jelte de Jong

At the company that I work for, we make products that are almost entirely composed of sheet metal parts. We cut and bend our products ourselves, we export our flat patterns out, to be used in our CAM software. When preparing flat patterns for export, I sometimes get confused, as it can be difficult to see which faces is the top side is of a sheet, or which bends are up or down.

For example see the sheet in the picture above. It looks like this sheet is symmetric and it would not matter how the sheet is orientated. But the hole is not in the middle of the sheet. For example adding “Cosmetic centerlines” can be difficult in this situation. (I need to tell if the new bends are up or down.)

This iLogic rule helps me see the orientation of the sheet. This is done in the following manner. It colours the top side of the sheet green. It colours “down” bends red and “up” bends  blue. (To remember what is up: The blue arrow of the “Coordinate system symbol” is pointing in the direction blue bends are set to.)

Below is an animated GIF showing how the tool works:

Here is the iLogic code:

'iLogic code by Jelte de Jong - >
'Originally Published at

Dim doc As PartDocument = ThisDoc.Document
Dim def As SheetMetalComponentDefinition = doc.ComponentDefinition
Dim oTr As TransientObjects = ThisApplication.TransientObjects

If (def.HasFlatPattern = False) Then Return

Dim topFace As HighlightSet = doc.HighlightSets.Add()
topFace.Color = oTr.CreateColor(0, 255, 0, 0.1)

Dim upBendEdges As HighlightSet = doc.HighlightSets.Add()
upBendEdges.Color = oTr.CreateColor(0, 0, 255)

Dim downBendEdges As HighlightSet = doc.HighlightSets.Add()
downBendEdges.Color = oTr.CreateColor(255, 0, 0)

For Each res As FlatBendResult In def.FlatPattern.FlatBendResults
    If (res.IsDirectionUp) Then
    End If

        "Press esc or select anything.")

About the Author:

Jelte de Jong works for a company that creates custom heat exchangers. He has used Inventor for over 10 years. Jelte has worked mostly as a mechanical engineer, but in recent years he has combined his hobby (programming) with his professional life. He now works as a software/mechanical engineer. His main task is supporting the drawing office by creating and maintaining configurable models and Inventor add-ins.

Find Jelte de Jong here:

Blog | Autodesk Forum | LinkedIn | Autodesk App Store

Comments are closed.

Create a website or blog at

Up ↑

%d bloggers like this: