Sheet Metal Flange Direction API

Sheet Metal Flange Direction API

Curtis_W
Consultant Consultant
598 Views
2 Replies
Message 1 of 3

Sheet Metal Flange Direction API

Curtis_W
Consultant
Consultant

I must be overlooking it, but can anyone point me to the API method to flip a sheet metal flange feature?
I'm just looking to programmatically push the"flip direction" buttons as shown.
See attached 2025 file with small example ilogic rule/form in case that helps.


Thanks in advance!

 

Screenshot 2026-02-23 172658.png

 

Screenshot 2026-02-23 175112.pngScreenshot 2026-02-23 175133.png

 EESignature

0 Likes
Accepted solutions (1)
599 Views
2 Replies
Replies (2)
Message 2 of 3

JhoelForshav
Mentor
Mentor
Accepted solution

Hi Curtis,
This property was really hidden deep in there!
I found that you can use FlangeDefinition.SetDistanceHeightExtent. Simple example from your code:

Dim oSheetMetalDoc As PartDocument
oDoc = ThisDoc.Document
' Set a reference to the component definition.
Dim oCompDef As SheetMetalComponentDefinition
oCompDef = oDoc.ComponentDefinition

' Set a reference to the sheet metal features collection.
Dim oSheetMetalFeatures As SheetMetalFeatures
oSheetMetalFeatures = oCompDef.Features

Dim oFlangeFeature As FlangeFeature = Feature.InventorFeature("Flange1")
Dim oFlangeDefinition As FlangeDefinition = oFlangeFeature.Definition

If FlangeType = "TypeX" Then
oFlangeDefinition.SetDistanceHeightExtent(oFlangeDefinition.HeightExtent.Distance, PartFeatureExtentDirectionEnum.kPositiveExtentDirection, oFlangeDefinition.HeightExtent.HeightDatumType)
Else
oFlangeDefinition.SetDistanceHeightExtent(oFlangeDefinition.HeightExtent.Distance, PartFeatureExtentDirectionEnum.kNegativeExtentDirection, oFlangeDefinition.HeightExtent.HeightDatumType)
End If

I've edited this reply two times now to clean it up a bit...

Message 3 of 3

Curtis_W
Consultant
Consultant

Thanks @JhoelForshav, that's perfect!

 EESignature