ResultBuffer扩展类第二版
源码:这一版的ResulrBuffer扩展类分为三大类分别对应扩展字典/数据、Lisp数据和选择集过滤器
其中
XdataList类对应扩展字典/数据
Lisp*类对应Lisp数据
Op*类对应选择集过滤器
测试代码:
public void Test1()
{
//扩展数据
XdataList lst =
new XdataList
{
{ 1001, "myapp" },
{ 1000, "hello" }
};
//过滤器的三种写法
var fd =
new OpOr
{
!new OpAnd
{
{ 0, "line" },
{ 8, "0" },
},
new OpAnd
{
!new OpEqual(0, "circle"),
{ 8, "2" },
{ 10, new Point3d(10,10,0), ">,>,*" }
},
};
var p = new Point3d(10, 10, 0);
var f =
OpFilter.Bulid(
e =>
!(e.Dxf(0) == "line" & e.Dxf(8) == "0") |
e.Dxf(0) != "circle" & e.Dxf(8) == "2" & e.Dxf(10) >= p
);
var f2 =
OpFilter.Bulid(
e =>
e.Or(
!e.And(e.Dxf(0) == "line", e.Dxf(8) == "0"),
e.And(e.Dxf(0) != "circle", e.Dxf(8) == "2", e.Dxf(10) 复制代码
学习了,非常感谢!! 飞狐出品,必属精品 厉害,好好拜读下 厉害,好好拜读下
页:
[1]