Suppressing all chamfer or fillets with iLogic

By Xiaodong Liang

Question:
Is it possible to create a rule to suppress all filltes or chamfers in a part by an iLogic rule?

Solution:
The code below self explains how to suppress the specific features.

‘get part document

doc = ThisDoc.Document

‘get part definition

oDef = doc.ComponentDefinition

 

Dim oEachF As PartFeature

‘iterare each feature

For Each oEachF In oDef.Features

    ‘if it is a chamfer or fillet

    If TypeOf oEachF Is ChamferFeature Or TypeOf oEachF Is FilletFeature Then

        ‘suppress it

        oEachF.Suppressed = True

    End If

Next

 

<

p style=”line-height: normal;margin: 0cm 0cm 0pt” class=”MsoNormal” align=”justify”> 


Comments

One response to “Suppressing all chamfer or fillets with iLogic”

  1. Thank you very much for the code.
    It works great.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading