private void attachpointListBox_MouseDoubleClick(object sender, MouseEventArgs e) { int index = attachpointListBox.IndexFromPoint(e.Location); if (index != System.Windows.Forms.ListBox.NoMatches) { BrgAttachpoint att = new BrgAttachpoint(); att.NameId = BrgAttachpoint.GetIdByName((string)attachpointListBox.Items[index]); Maxscript.NewDummy("newDummy", att.GetMaxName(), att.GetMaxTransform(), att.GetMaxPosition(), att.GetMaxBoxSize(), att.GetMaxScale()); } }