- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
i found this rule and it helped me a lot (bottom) but now we changed to another punchmachine and now we need to make a big hole with a pre punch and headpunch tightens the hole to the correct diameter when making the countersink. So what i'm looking for now is a rule that changes a countersink hole to a regular hole with the diameter of the biggest diameter .
For example we make holes VS 4,8 and we pre punch them with diameter 7 and head punch them with 9,4 under 45° . the result is a countersunk hole with inner diameter 4,8 . so in the ipt file we need a countersink hole with inner diameter 4,8 and outer diameter 7, than it looks OK for the architects and also our machine program can do its thing.
Is there a way to change the rule below, because the rule below deletes the countersink but changes it to the smallest diameter (innerdiameter) and i need the biggest diameter.
If the person who made the code below reeds this thank you , i don't know where i fount it but thank you. I hope it is possible with minor adjustments.
I'm a beginner with i logic but allready know how usefull it is and i really hope somebody can help me out with this.
Thank in advance
Dim a As Application
a = ThisApplication
Dim b As PartDocument
b = a.ActiveDocument
Dim c As HoleFeature
c = b.ComponentDefinition.Features.HoleFeatures.Item(1)
Dim trm As TransactionManager
trm = a.TransactionManager
Dim tr As Transaction
tr = trm.StartTransaction(b, "Undo this")
'Suppress all chamfers and fillets
Dim oEachF As PartFeature
'iterare each feature
'Make drilled holes from countersinkholes and counterboreholes
For Each c In b.ComponentDefinition.Features.HoleFeatures
If c.HoleType = kCountersinkHole Then
c.SetDrilled
End If
Next
For Each c In b.ComponentDefinition.Features.HoleFeatures
If c.HoleType = kCounterBoreHole Then
c.SetDrilled
End If
Next
tr.End
Solved! Go to Solution.