Rule for assembly to flat pattern dxf

Rule for assembly to flat pattern dxf

reine_den_andra
Contributor Contributor
110 Views
1 Reply
Message 1 of 2

Rule for assembly to flat pattern dxf

reine_den_andra
Contributor
Contributor

Hi all!

Is it possible to make a rule where you can export all files in an assembly to flat-pattern-DXF and end up in a specific folder?

Assuming the details are drawn in sheet metal of course.

 

(without opening each file separately and selecting flat pattern)

 

/Reine

0 Likes
111 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @reine_den_andra.  Technically speaking, yes, it is possible.  However, there are a lot of small details involved in that overall process that would need to be specified or planned for.  Since there are a lot of people from all over the world on these forums, there are also a lot of different wants, needs, requirements, & styles.

  • How will the one running the rule want/need to specify the 'Path' & 'File Name' for each DXF file?
    • By 'hard coding' the path &/or file name into the rule's code somewhere
    • By showing file dialogs in one or more occasions during the process
    • By extracting path &/or file name from either the main assembly, &/or each part involved
    • A mix of multiple of the above (all details would need to be clearly specified)
    • What all should the DXF file's name include (assembly's file name, assembly's part number, part's file name, part's part number, stock number, revision level, other iProperty values, any parameter values, any custom text not based on those sources, such as "Flat Pattern")?
  • If the code encounters a sheet metal part, but it has never had a flat pattern generated before, should that part then be skipped, or should the code attempt to generate that flat pattern, then proceed?
    • When manually generating a flat pattern, we have the opportunity to specify which face with be the 'base face' (stationary), to influence the orientation of the resulting flat pattern.  If you need to be able to specify that face in each case, then there would need to be extra code in there for accommodating that need.
  • Then there are all the many possible variations in how the part's geometry gets converted / interpreted to generate the resulting DXF.  There are a lot of possible options / settings involved in that final step...far to many to ask about each one here.

Next, this type of request is pretty common on this forum, meaning there are a lot of other forum topics about nearly the same exact thing, which already have lots of replies and even accepted solutions available, so it would be very beneficial to you, and for us, if you used the search functionality of this forum to find those previous discussions / topics, and review them first, because one of them may have already answered all your questions, and provided usable code examples.

Attached is a text file containing some code that can be copied & pasted into a new iLogic rule, as an example.  You will very likely want to closely review every line of code within it first, and will likely want to change some things to suit your needs better, but it should get you started. 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes