- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How to change edge collection in ChamferEdges
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 Chamfer
Result After Change
Autodesk Inventor Professional Certified 2014