by Clint Brown
I was asked recently if it is possible to extract the extents of a flat pattern, and write the sizes to back to either a Custom iProperty or Parameter. The idea is that this will give the user a "blank" size, which could be listed in a BoM, and could be used for costing etc.
The Code itself was pretty easy to put together, as I have previously done some work on sheet metal components (see link in the code), so it was pretty much a job of re-purposing some older code. What seemed like the trickiest part was understanding the Length Width and Thickness, and figuring out how to correctly assign these to the correct Parameter or iProperty, I've explained this in the video below, and as you will see, it's pretty straightforward.
The idea here, is to paste this code into your Sheet metal template, and to run it once you have completed your model.
Note that the Parameter code is Commented out in this example, so this code only writes back to the iProperties, if you create the parameters and un-comment the 3 lines referencing the parameters, the code will write back to these.
Please test it out and let me know if you find it useful.
The Code is available by downloading the attached PDF.