You can convert the integer to an ElementId with doc.ActiveView.SetElementOverrides(ElementId(i.Id), ogs). You’ll need to start and end transaction as well.
You can convert the integer to an ElementId with doc.ActiveView.SetElementOverrides(ElementId(i.Id), ogs). You’ll need to start and end transaction as well.