如果我在方法
中按下“Escape”,就会收到此消息
- try
- {
- PromptEntityOptions options = new PromptEntityOptions("\nSelect a Surface: ");
- options.AllowNone = false;
- options.SetRejectMessage("\nThe selected object is not a Surface.");
- options.AddAllowedClass(typeof(CivSurface), false);
-
- PromptEntityResult result = ed.GetEntity(options);
- if (result.Status == PromptStatus.OK)
- {
- this.SurfaceId = result.ObjectId;
- }
- if (ObjectId.Null == SurfaceId)
- {
- ed.WriteMessage("\nNo TIN Surface object was selected.");
- }
- }
- catch(Exception ex)
- {
- ed.WriteMessage("\nClose Program");
- }
|