Auto Unfold
Have you ever gone to place a drawing view of some sheet metal and the flat pattern option is greyed out?
This little ditty I composed slips straight in your iLogic rule and simply unfolds the part and folds it back up again, creating a flat pattern in the process.
Stick it on a trigger just before save in your template file and never have to worry about this happening again!
Dim oDoc As PartDocument oDoc = ThisDoc.Document Dim State As SheetMetalComponentDefinition State=oDoc.ComponentDefinition If State.HasFlatPattern = False Then State.Unfold ThisDoc.Document.ComponentDefinition.FlatPattern.ExitEdit End If
Hello!
ReplyDeleteWhat about unfolding every single part in assembly. Let's say I have an assembly with 10 sheet metal parts in it. And I would like each one unfolded with one click iLogic. Do you have any iLogic code for that?
You can do this, you just need to set up a loop that goes through every leaf component, checks if it's a sheet metal part, open it in the background, unfold and save and then close.
DeleteHey thank you for that. Do you maybe know the code for this ?
DeleteNo sorry, there's this that might help:
Deletehttps://forums.autodesk.com/t5/inventor-programming-ilogic/loop-on-all-parts-and-then-after-its-occurrences/td-p/10574794