Contour Flange offset direction

Contour Flange offset direction

breinkemeyer
Enthusiast Enthusiast
718 Views
6 Replies
Message 1 of 7

Contour Flange offset direction

breinkemeyer
Enthusiast
Enthusiast

Is there a method or property in the contour flange feature or definition that controls the offset side of the flange?  I see it when I manually edit the flange, but don't see it in the API.

0 Likes
Accepted solutions (2)
719 Views
6 Replies
Replies (6)
Message 2 of 7

blandb
Mentor
Mentor

May want to try this in the iLogic forum, may get better results there?

Autodesk Certified Professional
0 Likes
Message 3 of 7

blandb
Mentor
Mentor

scratch that wrong post, my apologies lol

Autodesk Certified Professional
0 Likes
Message 4 of 7

JelteDeJong
Mentor
Mentor
Accepted solution

I think you are looking for the "ExtentDirection" property. As an example run the following iLogic rule. Select the Contour Flange feature. And check that it's changing.

Dim f As ContourFlangeFeature = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFeatureFilter, "")

If (f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kNegativeExtentDirection) Then
    f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kPositiveExtentDirection
Else
    f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kNegativeExtentDirection
End If 

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 5 of 7

breinkemeyer
Enthusiast
Enthusiast

That did the trick, thanks!

0 Likes
Message 6 of 7

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@kacper.suchomski , see example for this without the Pick selection. 

 

hope that helps, Curtis

 

Dim oDoc As PartDocument = ThisDoc.Document
Dim f As ContourFlangeFeature 

f = oDoc.ComponentDefinition.Features.Item("Contour Flange1")

If (f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kNegativeExtentDirection) Then
    f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kPositiveExtentDirection
Else
    f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kNegativeExtentDirection
End If 

 

EESignature

Message 7 of 7

kacper.suchomski
Mentor
Mentor

Wow! Thanks!

 

I slightly modified the code because I wanted it to be dependent on the text parameter - Size - "Outer" / "Inner" / "Middle"

 

Dim oDoc As PartDocument = ThisDoc.Document
Dim f As ContourFlangeFeature

f = oDoc.ComponentDefinition.Features.Item("Contour Flange1")

If Size = "Out" Then
	f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kPositiveExtentDirection
Else If Size = "Inn" Then
	f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kNegativeExtentDirection
Else
	f.Definition.ExtentDirection = PartFeatureExtentDirectionEnum.kSymmetricExtentDirection

End If 

 

This is to define how the handle size will be oriented in relation to the dimensions.

 


Kacper Suchomski

EESignature


YouTube - Inventor tutorials | LinkedIn | Instagram

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.