Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to change edge collection in ChamferEdges

dgreatice
Collaborator

How to change edge collection in ChamferEdges

dgreatice
Collaborator
Collaborator

Hi,

 

I trying to change edge from chamfer feature using ChamferedEdges.RemoveObject(EdgeCol) but nothing change, can anyone help me.

 

Public Sub ChangeEdgeChamfer()
    Dim oApp As Application
    Dim oPD As PartDocument
    Dim oPCD As PartComponentDefinition
    Dim oFeats As PartFeatures
    Dim oChamferFeat As ChamferFeature
    Dim oChamferDef As ChamferDefinition
    Dim oEdgeCol As EdgeCollection
    Dim oFace As Face
   
    Set oApp = ThisApplication
    Set oPD = oApp.ActiveDocument
    Set oPCD = oPD.ComponentDefinition
    Set oFeats = oPCD.Features
    Set oChamferFeat = oFeats.ChamferFeatures.Item(2)
   
    Set oEdgeCol = oApp.TransientObjects.CreateEdgeCollection
   
    oChamferFeat.SetEndOfPart (True)
   
    Set oChamferDef = oChamferFeat.Definition
    Set oFace = oChamferDef.Face
    'get edge with radius 500mm
    Call oEdgeCol.Add(oFace.Edges.Item(4))
    'change exisiting edge with radius 506mm with new edge
    Call oChamferDef.ChamferedEdges.RemoveByObject(oEdgeCol)
   
    oChamferFeat.SetEndOfPart (False)
End Sub

 

Existing Top ChamferExisting Top Chamfer         Result After ChangeResult After Change

 

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Reply
304 Views
1 Reply
Reply (1)

dgreatice
Collaborator
Collaborator

Need Help,

 

 

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes