How do I control flip bend direction with iLogic

How do I control flip bend direction with iLogic

gma
Advocate Advocate
833 Views
2 Replies
Message 1 of 3

How do I control flip bend direction with iLogic

gma
Advocate
Advocate

HI,

 

How do i flip my bend direction with an iLogic code. (Left/Right)

 

Thanks in advance

 

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

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @gma 

The bend feature has the boolean property BendInSketchNormalDirection. You can change it like this 🙂

Dim oDoc As PartDocument = ThisDoc.Document
oDoc.ComponentDefinition.Features.BendPartFeatures.Item(1).BendInSketchNormalDirection = False 'False/True

If the feature is named "Vinkel" as in your picture. This rule will flip the direction everytime you run it 🙂

Dim oDoc As PartDocument = ThisDoc.Document
Dim oBend As BendPartFeature = oDoc.ComponentDefinition.Features.BendPartFeatures.Item("Vinkel")
If oBend.BendInSketchNormalDirection
	oBend.BendInSketchNormalDirection = False
Else
	oBend.BendInSketchNormalDirection = True
End If
Message 3 of 3

gma
Advocate
Advocate

Thank you very much.

My problem is solved.

 

Regards

GMA

0 Likes