Curtis,
We plugged this into VBA with some modification and it worked well, but we're having problems when trying different base features or change the orientation of the base feature. It seems to be tempermental to the type of geometry being patterened, where as a sculpt pattern will error, but the underlying surface will work. A simple extrusion on a plane parallel to the axis of rotation also generates and error.
See attached modified code (in vba) and ref part file.
Thanks,,
Rob
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 5222 StartFragment: 314 EndFragment: 5190 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
Dim oCdef As ComponentDefinition
oCdef = ThisDoc.Document.ComponentDefinition
Dim objCol As ObjectCollection
objCol = ThisApplication.TransientObjects.CreateObjectCollection
'Feature to be patterned
objCol.Add (oCdef.Features("Extrusion4"))
'convert degrees to radians
oDeg = 360 * 0.0174532925
'create pattern'....CircularPatternFeatures.Add(Features in Pattern, Axis, NaturalAxisDirection, Count, Angle, FitWithinAngle)
oCdef.Features.CircularPatternFeatures.Add(objCol, oCdef.WorkAxes.Item("Z Axis"), False, 3, oDeg , True)