Driveworksexpress file naming formula help needed!?!?

We use aluminum extrusion to build automated assembly systems and I would like to use driveworksexpress to automate the build of extrusion models in different lengths.  In addition to the length I would also like my form to contain a drop down to specify tapped ends so the options would be 0,1, and 2 ends tapped.  We use three basic shapes of extrusion; 40x40, 40x80, and 80x80.  We use the part number to drive the production of these parts so no drawing is needed.  Ie: part number "EXT-480-20340" is extrusion (EXT), size 40x80 (480), two ends are tapped (2), and the length is 340 (0340).  I have made a model that has a form for length, tapped ends, and extrusion type, but I am having trouble getting it to format the file name correctly.  I have named the part EXT, and I can use if statements to add "-440-", "-480-", and "-480-", I need some help adding additional notation based on the tapped ends, and length variables?  Can anyone help me?

SolidworksParts And Features