private void toolStripMenuItem1_Click(object sender, EventArgs e) { try { IPolyline chain_geom = new PolylineClass(); ISegmentCollection path1 = new PathClass(); foreach (Range r in Errors.CenterlineChains[select_chain_name]) { ISegmentCollection segcoll = r.Shape as ISegmentCollection; path1.AddSegmentCollection(segcoll); } object obj = Type.Missing; IGeometryCollection gCollection = chain_geom as IGeometryCollection; gCollection.AddGeometry((IGeometry)path1, obj, obj); chain_geom = (IPolyline)gCollection; FlashGeometry(chain_geom); } catch { } }