- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Georg,
To compare the type of holes you could use the Holetype api.
A simple way would be to filter out the type in the for loop itself.
For Each oHoleFeat In oDoc.ComponentDefinition.Features.HoleFeatures
If oHoleFeat.HoleType = HoleTypeEnum.kDrilledHole Then 'Filter out the drilled holes
Debug.Print ("X:" & oHoleFeat.HoleCenterPoints.Item(1).X)
Debug.Print ("Y:" & oHoleFeat.HoleCenterPoints.Item(1).Y)
Debug.Print ("Z:" & oHoleFeat.HoleCenterPoints.Item(1).Z)
Debug.Print ("Durchmesser:" & oHoleFeat.HoleDiameter.Expression)
Debug.Print ("Bohrungstiefe:" & oHoleFeat.Extent.Distance.Expression)
End if
Next
Similarly you can filter out the various types by referring below.
kCounterBoreHole | : | Hole is counterbored. |
kCounterSinkHole : | Hole is countersunk. | |
kDrilledHole : | Hole is drilled (no countersink or counterboring). | |
kSpotFaceHole : | Hole is spotfaced. |
Regards,
Sajith

Sajith Subramanian
Autodesk Developer Network