- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created the code in VBA for a test and it works perfectly, Check out the below screencast and code as well. The code is in VBA, so please note that you need to convert it to make it work in VB.Net or C#.
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveEditDocument
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
Dim oFeat As PartFeature
FCount = 1
Dim oFaceCol As FaceCollection
Set oFaceCol = ThisApplication.TransientObjects.CreateFaceCollection
For Each oFeat In oCompDef.Features
If InStr((oFeat.Name), "Patch") Then
oFaceCol.Clear
For Each oFace In oFeat.SurfaceBodies.Item(1).Faces
Call oFaceCol.Add(oFace)
Dim oThickFeat As ThickenFeature
Set oThickFeat = oCompDef.Features.ThickenFeatures.Add(oFaceCol, "0.4", kSymmetricExtentDirection, kNewBodyOperation, True)
oThickFeat.Name = "Thicken-Partition" & FCount
FCount = FCount + 1
Next
End If
Next
End Sub
Regards,
Dutt Thakar