Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi, try this code. I think you can put the name of the operation instead of the item number, try it and then tell us. I hope the code is useful for you. regards

 

Dim oPD As PartDocument = ThisDoc.Document
Dim oPCD As PartComponentDefinition = oPD.ComponentDefinition
Dim Xaxis As Object = oPCD.WorkAxes.Item(1)' Select X Axis

Dim oTop As PartFeature = oPCD.Features.Item(1) ' Select Feature form item number 

Dim oBjCol As ObjectCollection
oBjCol = ThisApplication.TransientObjects.CreateObjectCollection
	Call oBjCol.Add(oTop)

oRecFeat = oPCD.Features.RectangularPatternFeatures.Add(oBjCol,Xaxis,True, 5, 1, kDefault, , , , , , , , kAdjustToModelCompute, kAdjustToDirection1)

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn