How to change the CornerReliefShape of a sheet metal corner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I meet with a problem about the CornerReliefShape recently.
I want to change all the CornerReliefShape to "ArcWeld" for all the corners in the one sheet metal with vba.
But when i try to change the vaule of the CornerReliefShape directly ,the programe cause a error.
Here is my vba code ,someone can help me?
Many thanks!
VBA Code:
Public Sub test()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
Dim oSheetMetalCompDef As SheetMetalComponentDefinition
Set oSheetMetalCompDef = oPartDoc.ComponentDefinition
Dim oFeature As PartFeature
For Each oFeature In oSheetMetalCompDef.Features
Select Case oFeature.Type
Case kCornerFeatureObject
Dim oCornerFeature As CornerFeature
Set oCornerFeature = oFeature
oCornerFeature.Parameters.Item(1).Value = 0.78
oCornerFeature.Parameters.Item(5).Value = 0.65
oCornerFeature.Definition.CornerOptions.CornerReliefShape = kArcWeldCornerReliefShape
End Select
Next
End Sub