Anonymous
in reply to:
Anonymous
07-12-2016
07:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-12-2016
07:11 AM
Hi Udo.eckardt,
Welcome to the Comumunity!!
I hope the following code will be helpful for your requirement.
SyntaxEditor Code Snippet
Dim oPart As Document oPart = ThisApplication.ActiveDocument Dim oHoleFeature As HoleFeature For Each oHoleFeature In oPart.ComponentDefinition.Features.HoleFeatures Dim oHoleType As String If oHoleFeature.HoleType = 21507 Then oHoleType = "CounterBoreHole" ElseIf oHoleFeature.HoleType = 21506 Then oHoleType = "CounterSinkHole" ElseIf oHoleFeature.HoleType = 21505 Then oHoleType = "DrilledHole" ElseIf oHoleFeature.HoleType = 21508 Then oHoleType = "SpotFaceHole" End If MsgBox ("Counter bore Diameter: " & oHoleFeature.CBoreDiameter.Value & vbNewLine & _ "Counter Bore Depth: " & oHoleFeature.CBoreDepth.Value & vbNewLine & _ "Hole Type: " & oHoleType & vbNewLine & _ "Hole Name:" & oHoleFeature.Name & "") Next