01-18-2020
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-18-2020
11:43 PM
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 SuboHoleThreadNote.Intent.Geometry.ModelGeometry is pointing the edge in the part model.
=====
Hideo Yamada