Message 1 of 4
setting fastener size using API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sub main() Dim oDoc As PartDocument Set oDoc = ThisApplication.ActiveDocument Dim oHoleF As HoleFeatures Set oHoleF = oDoc.ComponentDefinition.Features.HoleFeatures oHoleF.Item(3).ClearanceInfo.FastenerSize = "M10" MsgBox (oHoleF.Item(3).ClearanceInfo.FastenerType)
Hello, I am new to the API
through this code, I am trying to set the fastener size to be a specific value based on a specific parameter. the programming/API Help informed that the "FastenerSize" is a read-write property to set or get the fastener size so how can I use this method to set the fastener size, Although using this code introduces error for me " Run-time error 445, Object doesn't support this action".
noting that this is the only thing in the hole feature that will change as shown in the figure below and all other choices will be constant with a different configuration of the model.
thanks