public static void OpenEaPropertyDlg(this EA.Repository rep, int id, EaType type) { string dlg; switch (type) { case EaType.Package: dlg = "PKG"; break; case EaType.Element: dlg = "ELM"; break; case EaType.Attribute: dlg = "ATT"; break; case EaType.Operation: dlg = "OP"; break; case EaType.Diagram: dlg = "DGM"; break; default: dlg = String.Empty; break; } IWin32Window mainWindow = InternalHelpers.GetMainWindow(); if (mainWindow != null) { string ret = rep.CustomCommand("CFormCommandHelper", "ProcessCommand", "Dlg=" + dlg + ";id=" + id + ";hwnd=" + mainWindow.Handle); } }