- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Yes, I believe this can be done, as long as you supply the correct corresponding string data, that matches what's in the spreadsheet it references for the other size. It's in the HoleFeature's 'ClearanceInfo' property, which is a read/write property. I don't recall if you can just change the data within the existing HoleClearanceInfo object, or if you have to create a new HoleClearanceInfo object, then supply that in its place. So, I'm showing both ways in the rule, with the new object process commented out for now.
Here is a fairly simple iLogic rule that attempts to change the specified fastener size for the clearance hole to fit.
Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oHoleFeats As HoleFeatures = oPDef.Features.HoleFeatures
Dim oHole As HoleFeature = oHoleFeats.Item(1)
'then either somethine like this:
If oHole.ClearanceInfo.FastenerSize = "#12" Then
oHole.ClearanceInfo.FastenerSize = "#08"
End If
'or something like this:
'Dim oHCInfo As HoleClearanceInfo = oHoleFeats.CreateClearanceInfo("Ansi Unified Screw Threads", "Flat Head Machine Screw (82)", "#08", "Normal")
'oHole.ClearanceInfo = oHCInfo
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS)
.
If you want and have time, I would appreciate your Vote(s) for My IDEAS
or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)