Message 1 of 11
How many holes in a part?

Not applicable
06-21-2010
02:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking to find how many holes there are in a part ( and then what their diameters are).
I tried using
Dim oPartDoc As Document
Set oPartDoc = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
MsgBox "there are " & oCompDef.Features.HoleFeatures.Count & " holes"
but this falls down if a hole feature created more than one hole at the same time.
I'm open to suggestions for some better code.
Thanks