Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
HideoYamada
in reply to: Hillebrand

Hi,

 

This code get Tolerance object that is corresponding to HoleThreadNote.

 

Sub test()
    Dim oSheet As Sheet
    Set oSheet = ThisApplication.ActiveDocument.ActiveSheet
    Dim oHoleThreadNote As HoleThreadNote
    Set oHoleThreadNote = oSheet.DrawingNotes.HoleThreadNotes(1)
    
    Dim oFace As Face
    For Each oFace In oHoleThreadNote.Intent.Geometry.ModelGeometry.Faces
        If TypeOf oFace.CreatedByFeature Is HoleFeature Then
            Dim oHoleFeature As HoleFeature
            Set oHoleFeature = oFace.CreatedByFeature
            Dim oTolerance As Tolerance
            Set oTolerance = oHoleFeature.HoleDiameter.Tolerance
            Debug.Print oTolerance.HoleTolerance
            Exit For
        End If
    Next oFace
    
End Sub

oHoleThreadNote.Intent.Geometry.ModelGeometry is pointing the edge in the part model.

 

=====

Freeradical

 Hideo Yamada

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp