Create Flat Patterns for all Sheet Metal Parts in an Assembly

Create Flat Patterns for all Sheet Metal Parts in an Assembly

andrewdroth
Advisor Advisor
310 Views
1 Reply
Message 1 of 2

Create Flat Patterns for all Sheet Metal Parts in an Assembly

andrewdroth
Advisor
Advisor

Does anyone have an iLogic snippet for creating flat patterns for all the sheet metal parts within an assembly?

 

 


Andrew Roth
rothmech.com

YouTube IconLinkedIn Icon


IV2025 Pro
Apple IIe Workstation
65C02 1.023 MHz, 64 KB RAM
Apple DOS 3.3
0 Likes
311 Views
1 Reply
Reply (1)
Message 2 of 2

Sergio.D.Suárez
Mentor
Mentor

Hi, try this simple code to see if it works

 

Dim openDoc As AssemblyDocument
openDoc = ThisDoc.Document
Dim doc As Document
For Each doc In openDoc.AllReferencedDocuments
	If doc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
		Dim oDef As SheetMetalComponentDefinition = doc.ComponentDefinition
		If oDef.HasFlatPattern = False Then 
			oDef.Unfold
			oDef.FlatPattern.ExitEdit
			doc.close
		End If
	End If
Next

 I hope it can be useful, greetings


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes