I'm using this code for testing, I didn't write it.
To test, load the code and click on an empty area of the drawing.
Note the prompt "Nothing Selected."
I need to translate or not show this to the user.
Thanks
[CommandMethod("S2T")]
static public void UpdateTableFromSpreadsheet()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
PromptEntityOptions opt = new PromptEntityOptions("\nSelect table to update: ");
opt.SetRejectMessage("\nEntity is not a table.");
opt.AddAllowedClass(typeof(Table), false);
PromptEntityResult per = ed.GetEntity(opt);
if (per.Status != PromptStatus.OK)
{
return;
}
Transaction tr = db.TransactionManager.StartTransaction();
}