• Blog posts

    Bio

    By Luke Davenport 

    There’s loads of handy iLogic code for sheet metal kicking about on the Interpipes. Not least on Cadline Community:

    https://www.cadlinecommunity.co.uk/hc/en-us/articles/201895031-Extracting-Inventor-Sheet-Metal-Extents-via-iLogic 

    https://www.cadlinecommunity.co.uk/hc/en-us/articles/201814461-Autodesk-Inventor-iLogic-Set-Active-Sheet-metal-Rule-in-Assembly 

    And today’s topic may very well have been covered somewhere in cyberspace. But seeing as there are two typical ways to calculate the area of a sheet metal flat pattern, I thought I’d put both of them in a handy rule for easy access.

    So the two methods are:

    1. Find the actual area of the flat pattern face. (Activate the flat pattern inside the part, then right click Measure -> Measure Area -> Pick the face)

    2. Find the ‘extents’ area of the flat pattern face. (Inventor maintains a ‘bounding rectangle’ around the flat pattern, the area of which can be obtained with – Right click on flat pattern -> Extents -> Sheet Extents Area)

    Just be aware with this method – if the flat pattern is not aligned to the XYZ planes then the ‘Sheet Extent Area’ above will be larger than it should be, as the bounding rectangle will have to stretch.

    Most of the time Inventor will align the flat pattern automatically, but if it hasn’t, you can sort this out manually by editing the flat pattern definition and rotating as shown below.

    So by definition, the ‘actual’ area of the flat pattern will always be less than or equal to the ‘extents’ area.

    Let’s get some iLogic going. So the rule below (when run from an assembly file) will do the following:

    1. Create or update 2 custom iProperties in each sheet metal part in the active assembly

    a) 'SheetMetalActualArea', equal to the face area of the flat pattern (holes are taken into account)

    b) 'SheetMetalExtentsArea', equal to the Length x Width of the bounding rectangle of the flat pattern

    A couple of notes if I may:

    1) If you’d prefer some code to run from each part file instead of the top level assembly, then let me know, I’d be happy to blog this also, or you can try your hand with a little editing.

    2) The section of the code below allows you to pick the units for the area. Just comment out (with an apostrophe) the lines you don’t need. In the example below I have chosen to use m^2 (square metres) as the units.

    3) The section of the code below allows you to choose the quantity of decimal places you want for the area. Edit this as required.

    4)As always, be careful when copying and pasting the code to avoid introducing any unwanted empty/blank lines, as the iLogic will say no.

    Download the code HERE