明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1625|回复: 4

[求助]如何连续拾取多个点?? 已解决

[复制链接]
发表于 2009-10-9 17:15 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2009-10-10 9:06:57 编辑

 已解决如何在用鼠标连续拾取多个点后再进行其他操作??

发表于 2009-10-9 17:27 | 显示全部楼层

循环语句

 楼主| 发表于 2009-10-9 17:34 | 显示全部楼层
用循环语句的话,那循环的终止条件是什么,我是想在鼠标右键或者回车的时候结束循环的,这个时候循环该怎么写,飞狐大大能写下代码参考下不??
发表于 2009-10-9 21:00 | 显示全部楼层

        [CommandMethod("m1")]
        static public void MSelectPoint()
        {

            PromptPointOptions opt = new PromptPointOptions("\nselect a point:");
            opt.AllowNone = true;
           
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            PromptPointResult res = ed.GetPoint(opt);
            List<oint3d> pnts = new List<oint3d>();
            while(res.Status == PromptStatus.OK)
            {
                pnts.Add(res.Value);
                res = ed.GetPoint(opt);
            }

        }

 楼主| 发表于 2009-10-10 09:02 | 显示全部楼层
已解决  谢谢!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-18 15:29 , Processed in 0.207103 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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