public override void OnClick() { frmCreateGraphicTrackOptions optionsForm = new frmCreateGraphicTrackOptions(); IGeometry selectedPath = GetSelectedLineFeature(); IElement lineElement = (IElement)GetSelectedLineElement(); IElement selectedElement = GetSelectedPointElement(); optionsForm.lineFeature = selectedPath; optionsForm.lineGraphic = (ILineElement)lineElement; optionsForm.pointGraphic = selectedElement; optionsForm.AnimationExtension = animExt; optionsForm.RefreshPathSourceOptions(); optionsForm.ShowDialog(); }