1.cad中的
doc.SendStringToExecute("Extend3\n", false, false, false);
是异步执行,此行代码不是按照编程顺序执行的,往往是最后执行
2.Entity1.MirrorEntity方法返回的entity2中的point2d属性是Entity1的值,point3d才是镜像后的值
2.1 entity2的bulge值依然是Entity1的bulge值,bulge = -bulge这样值就正确了
3.try{}千万不要随意用,能不用就不用!!!(否则无法调试到具体位置),cad程序崩溃也多因为如此次
//例如
using (Transaction trans = doc.TransactionManager.StartTransaction())
{//释放资源
try
{
int a = 0;
double b = 2/a;
trans.Commit();//这里要十分注意确保运行
}catch
{
}
}