Hi,
im back, this my code. Before im use "AddDrilledByThroughAllExtent", now difference method for create Tapped Hole.
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oDef As PartComponentDefinition
Set oDef = oDoc.ComponentDefinition
Dim oHoleCenters As Object
Set oHoleCenters = oDef.WorkPoints.Item("COG")
Dim oCenterPlacementDef As PointHolePlacementDefinition
Set oCenterPlacementDef = oDef.Features.HoleFeatures.CreatePointPlacementDefinition(oHoleCenters, oDef.WorkAxes.Item(1))
Dim oTappedHole As HoleTapInfo
Set oTappedHole = oDef.Features.HoleFeatures.CreateTapInfo(True, "ISO Metric Profile", "M8x1.25", "6H", False, "24mm")
'Call oDef.Features.HoleFeatures.AddDrilledByThroughAllExtent(oCenterPlacementDef, "10mm", kPositiveExtentDirection) 'old
Call oDef.Features.HoleFeatures.AddDrilledByDistanceExtent(oCenterPlacementDef, oTappedHole, "30mm", kPositiveExtentDirection, False, "118")
Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.
Autodesk Inventor Professional Certified 2014