明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2302|回复: 1

[基础] 执行下面的函数到▲句出现错误,错误提示为eInvalidInput,是什么问题

[复制链接]
发表于 2014-10-15 11:11 | 显示全部楼层 |阅读模式
执行下面的函数到▲句出现错误,错误提示为:
“Autodesk.AutoCAD.Runtime.Exception”类型的异常在 AcdbMgd.dll 中发生,但未在用户代码中进行处理
其他信息: eInvalidInput
        [CommandMethod("yyyyy")]
        public void yyyy()
        {
            Point3d A = new Point3d(578816.545, 3871920.823, 68.146);
            Point3d B = new Point3d(578817.923, 3871918.569, 67.346);
            Point3d C = new Point3d(578826.71, 3871924.276, 70.285);
            Point3dCollection 三点 = new Point3dCollection();
            三点.Add(A); 三点.Add(B); 三点.Add(C);
            Polyline3d 实体 = new Polyline3d(Poly3dType.SimplePoly, 三点, true);
            DBObjectCollection ents = new DBObjectCollection();
            ents.Add(实体);
            ▲DBObjectCollection 面域 = Autodesk.AutoCAD.DatabaseServices.Region.CreateFromCurves(ents);//执行到此句出现错误:eInvalidInput
            Autodesk.AutoCAD.DatabaseServices.Region 面域1 = (Autodesk.AutoCAD.DatabaseServices.Region)面域[0];
            面域1.ColorIndex = 1;
            面域1.AddToModelSpace();
        }
发表于 2014-10-15 17:20 | 显示全部楼层
Region
1,面域需要封闭曲线或连接封闭的曲线
2,面域需要平面曲线
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-17 12:03 , Processed in 0.219558 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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