Flipping a flat pattern in sheet metal part

Flipping a flat pattern in sheet metal part

Anonymous
Not applicable
1,382 Views
10 Replies
Message 1 of 11

Flipping a flat pattern in sheet metal part

Anonymous
Not applicable

When I enter a drawing made from a sheet metal part, inventor always defaults the flat pattern to have all the bends going down.  I actually need the bends coming in as 'up' instead. Is there any way to automate this ?

0 Likes
1,383 Views
10 Replies
Replies (10)
Message 2 of 11

bradeneuropeArthur
Mentor
Mentor

You know that you can change that in the flat-pattern definition within inventor!?

bradeneuropeArthur_0-1614755776893.png

Or do you need it with coding?

And do you need it in i-logic; VBA; Vb.net; or else?

 

Regards

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 11

Anonymous
Not applicable

Yes, I do it manually every time as of now. Trying to automate processes for my company.  Preferably ilogic.  Will try to incorporate this with a code that streamlines most of the process of making drawings.

0 Likes
Message 4 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Dim a As Inventor.PartDocument = ThisDoc.Document
'Dim su As Inventor.DocumentTypeEnum = a.DocumentSubType

If a.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
	Dim s As Inventor.SheetMetalComponentDefinition = a.ComponentDefinition
	Dim f As Inventor.FlatPattern = s.FlatPattern
	'f.FlatPatternOrientations.ActiveFlatPatternOrientation.FlipAlignmentAxis
	Dim fl As Inventor.FlatPatternOrientation = f.FlatPatternOrientations.Item(1)
	fl.FlipBaseFace= True
	
	'MsgBox ("")
	End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Or use this to flip it back an forward:

 

Dim a As Inventor.PartDocument = ThisDoc.Document


If a.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
	Dim s As Inventor.SheetMetalComponentDefinition = a.ComponentDefinition
	Dim f As Inventor.FlatPattern = s.FlatPattern

	Dim fl As Inventor.FlatPatternOrientation = f.FlatPatternOrientations.Item(1)
	If fl.FlipBaseFace = False Then
		fl.FlipBaseFace = True
		ElseIf fl.FlipBaseFace = True
			fl.FlipBaseFace= False
		End If

	End If

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 6 of 11

Anonymous
Not applicable

Looks great, would you happen to know if this rule can be run from a drawing ?  It is usually in the drawing where my coworkers notice that the part needs to be flipped. (The majority of the bends need to be up instead of down).

0 Likes
Message 7 of 11

bradeneuropeArthur
Mentor
Mentor

sure it can hang on..

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 8 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Dim dwg As Inventor.DrawingDocument = ThisDrawing.Document

Dim v As Inventor.DrawingView = dwg.ActiveSheet.DrawingViews.Item(1)
'v.ReferencedDocumentDescriptor.ReferencedDocument
Dim a As Inventor.PartDocument = v.ReferencedDocumentDescriptor.ReferencedDocument 'ThisDoc.Document


If a.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then

	Dim s As Inventor.SheetMetalComponentDefinition = a.ComponentDefinition
	Dim f As Inventor.FlatPattern = s.FlatPattern

	Dim fl As Inventor.FlatPatternOrientation = f.FlatPatternOrientations.Item(1)
	If fl.FlipBaseFace = False Then
		fl.FlipBaseFace = True
		ElseIf fl.FlipBaseFace = True
			fl.FlipBaseFace= False
		End If
dwg.Update
	End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution

More user friendly with a Picker selection from the user:

Dim dwg As Inventor.DrawingDocument = ThisDrawing.Document

Dim v As Inventor.DrawingView '= dwg.ActiveSheet.DrawingViews.Item(1)
v = ThisApplication.CommandManager.Pick(Inventor.selectionfilterenum.kDrawingViewFilter,"Select a Flat Pattern View")
Dim a As Inventor.PartDocument = v.ReferencedDocumentDescriptor.ReferencedDocument 'ThisDoc.Document


If a.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then

	Dim s As Inventor.SheetMetalComponentDefinition = a.ComponentDefinition
	Dim f As Inventor.FlatPattern = s.FlatPattern

	Dim fl As Inventor.FlatPatternOrientation = f.FlatPatternOrientations.Item(1)
	If fl.FlipBaseFace = False Then
		fl.FlipBaseFace = True
		ElseIf fl.FlipBaseFace = True
			fl.FlipBaseFace= False
		End If
dwg.Update
	End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 10 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Next the error will occur when the View is no Flat Pattern view:

Now you receive a message if it is not:

Dim dwg As Inventor.DrawingDocument = ThisDrawing.Document

Dim v As Inventor.DrawingView '= dwg.ActiveSheet.DrawingViews.Item(1)
v = ThisApplication.CommandManager.Pick(Inventor.selectionfilterenum.kDrawingViewFilter, "Select a Flat Pattern View")

If v.IsFlatPatternView = True Then
Dim a As Inventor.PartDocument = v.ReferencedDocumentDescriptor.ReferencedDocument 'ThisDoc.Document


If a.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then

	Dim s As Inventor.SheetMetalComponentDefinition = a.ComponentDefinition
	Dim f As Inventor.FlatPattern = s.FlatPattern

	Dim fl As Inventor.FlatPatternOrientation = f.FlatPatternOrientations.Item(1)
	If fl.FlipBaseFace = False Then
		fl.FlipBaseFace = True
		ElseIf fl.FlipBaseFace = True
			fl.FlipBaseFace= False
		End If
dwg.Update

	End If
Else 
	MsgBox("This View Contains no Flat Pattern")
	End If

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 11 of 11

Anonymous
Not applicable

Thanks, code will be used !