[CommandMethod("TEST")]
public static void Test()
{
var ed = Application.DocumentManager.MdiActiveDocument.Editor;
var peo
= new PromptEntityOptions
("\nSelect Line: "); peo.SetRejectMessage("\nSelected object is not a Line.");
peo
.AddAllowedClass(typeof(Line
),
true); var per = ed.GetEntity(peo);
if (per.Status == PromptStatus.OK)
{
using (var tr
= new OpenCloseTransaction
()) {
var line = (Line)tr.GetObject(per.ObjectId, OpenMode.ForRead);
ed.WriteMessage($"\nAngle = {Converter.AngleToString(line.Angle)}");
}
}
}