[CommandMethod("PML")]
public void PML()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
if (doc == null) return;
Editor ed = doc.Editor;
PromptEntityOptions peOpt =
new PromptEntityOptions("\nВыберите MLEADER: ");
peOpt.SetRejectMessage("Это не MLEADER!");
peOpt.AddAllowedClass(typeof(MLeader), false);
PromptEntityResult peRes = ed.GetEntity(peOpt);
if (peRes.Status != PromptStatus.OK) return;
using (MLeader ml = peRes.ObjectId.Open(OpenMode.ForRead) as MLeader)
{
ed.WriteMessage("\nml.GetFirstVertex(0) = {0}", ml.GetFirstVertex(0));
}
}