明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1536|回复: 2

请教!看了C#手册后的问题

[复制链接]
发表于 2009-10-20 16:42 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2009-10-20 19:32 | 显示全部楼层
  1.         [CommandMethod("ttss")]
  2.         public static void tt()
  3.         {
  4.             Document doc = Application.DocumentManager.MdiActiveDocument;
  5.             Database db = doc.Database;
  6.             Editor ed = doc.Editor;
  7.             PromptPointOptions opt = new PromptPointOptions("\nselect a point:");
  8.             opt.Keywords.Add("Aaaa");
  9.             opt.Keywords.Add("Bbbb");
  10.             PromptPointResult res = ed.GetPoint(opt);
  11.             switch (res.Status)
  12.             {
  13.                 case PromptStatus.Keyword:
  14.                     ed.WriteMessage("\nyou select a keyword:{0}", res.StringResult);
  15.                     break;
  16.                 case PromptStatus.OK:
  17.                     ed.WriteMessage("\nyou select a point:{0}", res.Value);
  18.                     break;
  19.             }
  20.         }
复制代码
发表于 2009-10-21 12:28 | 显示全部楼层
这么麻烦啊,感觉比vb麻烦点,呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-21 05:14 , Processed in 0.163982 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表