Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi,

 

You have to create new HoleClearanceInfo and then replace target ClearanceInfo with new one.

 

Sub main()
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oHoleF As HoleFeatures
    Set oHoleF = oDoc.ComponentDefinition.Features.HoleFeatures
    
    Dim oHole As HoleFeature
    Set oHole = oHoleF.Item(3)
    
    Dim oOriginal As HoleClearanceInfo
    Set oOriginal = oHole.ClearanceInfo
    
    Dim oChanged As HoleClearanceInfo
    Set oChanged = oHoleF.CreateClearanceInfo(oOriginal.FastenerStandard, oOriginal.FastenerType, "M10", oOriginal.FastenerFitType)
    oHole.ClearanceInfo = oChanged
    MsgBox (oHoleF.Item(1).ClearanceInfo.FastenerType)
End Sub

See also :

https://modthemachine.typepad.com/my_weblog/2019/07/new-apis-in-inventor-20201.html

 

Ah, it is written in the above blog that this API is added to Inventor 2020.1.

If you use Inventor 2019, it will be difficult to change the parameter...

 

=====

Freeradical

 Hideo Yamada

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp