So I have got it to do kind of what I want but I’m getting an error on the line noted below. But it does what I tell it to do. It just doesn’t continue on with the script after that if then statement.
Dim bodies1 As Bodies
Set bodies1 = partl.Bodies
Dim bodyl As Body
Set body1 = bodies1.Item("PartBody")
Dim shapes1 As Shape
Set shapes1 = body1Shapes
dim holel as shape
set holel=shapes1.ltem("1/2-13 KEENSERT")
dim hole2 as shape
set hole2=shapes1.Item("3/8-16 KEENSERT")
Dim oPatt(2) as AnyObject
For i= 1 To 50
‘Errors out on line below
set oPatt(0) = shapes1.Item("RectPattern.” & (i))
if oPatt(0). Item ToCopy.name = hole1.name then
oPatt(0).name = "1/2-13 KSERT PATTERN*
End if
Next