How to Automatically include part number on DXF files saved from Flat Pattern

How to Automatically include part number on DXF files saved from Flat Pattern

rankinkane
Contributor Contributor
260 Views
2 Replies
Message 1 of 3

How to Automatically include part number on DXF files saved from Flat Pattern

rankinkane
Contributor
Contributor

Hi All,

 

I would like to be able to create a rule where I can add the part number as geometry to the DXF file when I export it from a flat pattern. I have had requests from clients for this so they can laser etch the part number on the part so the parts can be identified when removing from the laser cutter. Very helpful when cutting out dozens of similar looking parts with different part numbers from one sheet.

 

The Flat pattern inside of inventor would look something like this, with text converted to geometry ready for export

rankinkane_0-1712630161969.png

 

And this is what it would look like once exported to DXF and opened in autocad.

rankinkane_1-1712630237986.png

 

I have worked out how to do it manually but I would like to be able to add the part number automatically so that when I am Exporting my DXF files I can Select the "unconsumed sketches" and the Part number will be added to the DXF file.

rankinkane_2-1712630496260.png

 

I think I will need some ilogic code to get this done. I found some ilogic to retrieve the part number from the iproperties and add it to a user parameter, ultimately I would like to just be able to run the rule and do a "save as" on the flat pattern (If possible)

I have dabbled in ilogic before but very much a novice.

 

Any help on this subject would be greatly appreciated.

 

 

0 Likes
261 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor

Hi @rankinkane.  Since you said you have only dabbled with iLogic, I was not sure if you already have an iLogic rule for exporting the sheet metal part's flat pattern to DXF with your settings yet.  There are lots of examples of codes for exporting flat patterns to DXF here on this forum, but pretty much all of them are a bit different from each other, due to different settings being used for the export options.  Attached is a text file containing some iLogic code you could try using for the export process.

 

The attached code does not yet include anything for adding the part number yet, because that is a whole other complex task, and may need to be added into this code as an additional routine later, if this code works OK for you.  We would sort of need be super familiar with your parts, and possibly have an example, to be able to write code for a task like that.  For instance, we do not know which WorkPlane or model face to create the sketch on, where on that face to place which corner (or center) of the text, or which orientation on the face.  How big to make the text, which font(s), and so on.  Lots of details involved.  And doing all that by code needs to be super specific.  I have also heard of folks using a Mark feature to add a 'tag' or part number to their flat parts.  That may export to a different layer though.  I do not recall using that route yet myself, so I do not recall the results.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

rankinkane
Contributor
Contributor

Hi @WCrihfield ,

Thanks very much for the reply. I will have a look at the text and see if I can make sense of it.

Currently we don't have any ilogic for exporting DXF files, it's all done manually by right clicking the flat pattern within the part and selecting "save as". From there select the .dxf file type, click save, then select the layers to export (bend lines, inner outer profiles etc).

It would be nice to make this process more automated but depending on where the files are getting sent to the layers exported will change (sent to Laser cutter, Water jet, Router etc). I assume we could set different rules for different layer profiles?

I would like to be able to automatically add the part number by selecting a layer when exporting as a single line of text. This would be added to the top left corner of the part with 6mm text, single line font. As mentioned before this would rarely be added to files being sent to the water jet but be sent to the laser cutter most of the time (depending on the job).

 

Regards

 

Kane Rankin

0 Likes