03-21-2018
07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-21-2018
07:39 AM
Hello together,
I want to Change a Holedefinition of a Clearance Hole.
I can query the current size. In API docu it is descript as Read-write,
but I can't set a new value. Open the attached file or any part with
a clearance hole and start the Sub below. The first Messagebox shows
the Size but it results in an error when I try to set a new value.
What is wrong?
Sub subWNHolefeatureUpdate()
Dim oWNPartDoc As PartDocument
Set oWNPartDoc = ThisApplication.ActiveDocument
Dim oWNHoleFeature As HoleFeature
For Each oWNHoleFeature In oWNPartDoc.ComponentDefinition.Features.HoleFeatures
MsgBox oWNHoleFeature.ClearanceInfo.FastenerSize
On Error Resume Next
oWNHoleFeature.ClearanceInfo.FastenerSize = "M6"
MsgBox Err.Description
Next
End SubBest Regards
Wolfgang
Solved! Go to Solution.