string format = "A.1"; // initial default value
[CommandMethod("TestforCombobox")]
public void ShowForm2() // instance method (non static)
{
Document doc = AcAp.DocumentManager.MdiActiveDocument;
Editor ed = AcAp.DocumentManager.MdiActiveDocument.Editor;
Database db = doc.Database;
Dictionary
<string,
int> data
= new Dictionary
<string,
int>() {{ "TAG1",
0 },
{ "TAG2",
2 }};
using (TheForm dialog
= new TheForm
(format
)) // pass the current format value to the form {
DialogResult MyTestForAttributes = AcAp.ShowModalDialog(dialog);
if (MyTestForAttributes == DialogResult.OK)
{
format = dialog.Format; // update the format value from the form
MessageBox.Show("OK");
}
} // Using TheForm
}