HFSS Scripting: running a script multiple times gives naming conflicts
I figured out a solution. I create an array of model objects, then each time in the code that a new model object is created it gets added to the array. If I need to reference the part later in the code I can just refer to the array location as shown below.
oEditor.CreateRectangle Array("NAME:RectangleParameters", _
"XStart:=", "0mils", _
"YStart:=", "0mils", _
"ZStart:=", "strMinRadius", _
"Width:=", "strLeadWidth", _
"Height:=", "strLeadThickness", _
"WhichAxis:=", "X"), _
Array("NAME:Attributes", _
"Name:=", "ArchRect1")
objectArray(1) = oEditor.GetObjectName(oEditor.getNumObjects() - 1)
oEditor.SweepAroundAxis Array("NAME:Selections", _
"Selections:=", objectArray(1)), _
Array("NAME:AxisSweepParameters", _
"DraftAngle:=", "0", _
"DraftType:=", "Natural", _
"SweepAxis:=", "Y", _
"SweepAngle:=", "strAngle * Pi/180")