11-10-2019
08:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-10-2019
08:12 AM
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 SubSee 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...
=====
Hideo Yamada