Please tell me how to make tab countsink visible in a drawing.

Please tell me how to make tab countsink visible in a drawing.

tkddud711
Advocate Advocate
462 Views
8 Replies
Message 1 of 9

Please tell me how to make tab countsink visible in a drawing.

tkddud711
Advocate
Advocate

If you model a tab as shown below, a tab is created with countsink.
If you draw M3,M4,M5,M6,M8,M10,M12, you will draw circles of Φ3,Φ4,Φ5,Φ6,Φ8,Φ10,Φ12 in the plan view.
I would like to hide the countsink circle drawn on the floor plan.
Is it possible?

tkddud711_0-1701391145136.png

 

Before.jpgafter.jpg

0 Likes
463 Views
8 Replies
Replies (8)
Message 2 of 9

dgreatice
Collaborator
Collaborator

Public Sub HideChamferEdge()
Dim oApp As Application
Dim oDD As DrawingDocument
Dim oSht As Sheet
Dim oDV As DrawingView
Dim oDC As DrawingCurve
Dim oDCS As DrawingCurveSegment
Dim oOC1 As ObjectCollection
Dim oOC2 As ObjectCollection
Dim oFeat1 As PartFeature
Dim oFeat2 As PartFeature
Dim oCheckDCS1 As DrawingCurveSegment
Dim oCheckDCS2 As DrawingCurveSegment
Dim oCheckDCS3 As DrawingCurveSegment
Dim oF1 As Face
Dim oF2 As Face
Dim oE As Edge

Set oApp = ThisApplication
Set oDD = oApp.ActiveDocument
Set oOC1 = oApp.TransientObjects.CreateObjectCollection
Set oOC2 = oApp.TransientObjects.CreateObjectCollection

For Each oSht In oDD.Sheets
For Each oDV In oSht.DrawingViews
For Each oDC In oDV.DrawingCurves
If oDC.ProjectedCurveType = kCircleCurve2d Then
Call oApp.CommandManager.DoPreSelect(oDC.Segments(1))
For Each oF1 In oDC.ModelGeometry.Faces
If oF1.CreatedByFeature.Type = kChamferFeatureObject Then
For Each oE In oF1.Edges
For Each oF2 In oE.Faces
If oF2.CreatedByFeature.Type = kHoleFeatureObject Then
Set oDCS = oDC.Segments(1)
Call oOC1.Add(oDCS)
End If
Next
Next
ElseIf oF1.CreatedByFeature.Type = kMirrorFeatureObject Or _
oF1.CreatedByFeature.Type = kRectangularPatternFeatureObject Or _
oF1.CreatedByFeature.Type = kCircularPatternFeatureObject Then

For Each oFeat1 In oF1.CreatedByFeature.ParentFeatures
If oFeat1.Type = kChamferFeatureObject Then
For Each oFeat2 In oF1.CreatedByFeature.ParentFeatures
If oFeat2.Type = kHoleFeatureObject Then
Set oDCS = oDC.Segments(1)
Call oOC1.Add(oDCS)
End If
Next
End If
Next
End If
Next
End If
Next
Next
Next
Set oDCS = Nothing

For Each oCheckDCS1 In oOC1
Call oApp.CommandManager.DoPreSelect(oCheckDCS1)
For Each oF1 In oCheckDCS1.Parent.ModelGeometry.Faces
For Each objectcol In oF1.[_CreatedByFeatures]
If objectcol.Type = kHoleFeatureObject Then
Call oOC2.Add(oCheckDCS1)
Exit For
End If
Next
Next
Next

For Each oCheckDCS2 In oOC2
Call oApp.CommandManager.DoSelect(oCheckDCS2)
i = 0
For Each oCheckDCS1 In oOC1
i = i + 1
If oCheckDCS1 Is oCheckDCS2 Then
Call oOC1.Remove(i)
End If
Next
Next

For Each oCheckDCS1 In oOC1
oCheckDCS1.Visible = False
Next
End Sub

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 3 of 9

tkddud711
Advocate
Advocate

First of all, thank you for replying.
I ran it in vba, but nothing works.
how do you run it?

0 Likes
Message 4 of 9

dgreatice
Collaborator
Collaborator

VBA macro works fine for me, but its not i-Logic code.

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 5 of 9

tkddud711
Advocate
Advocate

INVENTOR 2023 is in use, and I ran the macro, but nothing happens on the drawing sheet.
What's wrong?

0 Likes
Message 6 of 9

dgreatice
Collaborator
Collaborator

already test in inventor 2023, and working well too. can u share you files?

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 7 of 9

dgreatice
Collaborator
Collaborator

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 8 of 9

tkddud711
Advocate
Advocate

First of all, thank you for replying.
As I checked, I want to hide the chamfered lines in the hole properties, rather than creating a tab and chamfering it.
Please refer to images and files.

Is it possible?
2022-12-08_09-51-23.jpg

0 Likes
Message 9 of 9

dgreatice
Collaborator
Collaborator

lol, you not define clearly. countersink is not same with chamfer.

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes