定义一个直线的函数
如何定义以下二种方法画一个直线的函数 复制代码 这个没有必要做函数的 狐哥请示范一下: 我是想学习一下方法... 这个还真没有做过,也没必要只需要做个添加的
public static ObjectId AddEntity(this BlockTableRecord btr, Transaction tr, Entity entity)
{
ObjectId id = btr.AppendEntity(entity);
tr.AddNewlyCreatedDBObject(entity, true);
return id;
} 谢谢!!! 我再去学习一下做一些子函,这样以后会方便很多... 你可以重载该函数
//ObjectId Cir03 = AddLineb(new Point3d(15, 0, 0), new Point3d(-15, 0, 0));
public static ObjectId AddLine()
{
Point3d pt1=new Point3d(15, 0, 0),;
Point3d pt2=new Point3d(-15, 0, 0));
Line ent = new Line(pt1, pt2);
ObjectId entId = AppendEntity(ent);
return entId;
}
谢谢楼上的朋友,这种方法我知道,我现在的遇到的问题是,在新建一个块时无法选取ObjectId Cir03 返回的ID
页:
[1]