01-16-2020
05:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-16-2020
05:33 AM
I need some help.
I want to collect all tolerances used in a drawing view.
Collecting the drawing tolerances for DrawingDimensions works fine. But it is a problem to get the tolerances defined for holefeatures in parts model.
HoleThreadNote first = sheet.DrawingNotes.HoleThreadNotes.Cast<HoleThreadNote> ().First ();
string a = first.Text.Text;
// a = "n3,00 H7 DURCH"
string a = first.Text.Text;
// a = "n3,00 H7 DURCH"
string holTol = first.Tolerance.HoleTolerance;
// holTol = "";
// holTol = "";
string shaftTol = first.Tolerance.ShaftTolerance;
// shaftTol = "";
// shaftTol = "";
Is there another method to get the "model" tolerances? Only possible by parsing the text string?
Thank you!
Regards
Petra
Solved! Go to Solution.
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
01-20-2020
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report