- 积分
- 394
- 明经币
- 个
- 注册时间
- 2011-1-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 iamygp 于 2012-5-28 12:57 编辑
现在有如下程序:
public void CreateCircleLine()
{
// Document acDoc = Application.DocumentManager.MdiActiveDocument;
Database db = HostApplicationServices.WorkingDatabase;
using (Transaction trans = db.TransactionManager.StartTransaction())
{
BlockTable bt = (BlockTable)(trans.GetObject(db.BlockTableId, OpenMode.ForRead));
BlockTableRecord btr =(BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
Point3d center = new Point3d(10, 10, 0);
Circle circle = new Circle(center, Vector3d.ZAxis, 10.0);
circle.ColorIndex = 1;
btr.AppendEntity(circle);
Line line1 = new Line(Point3d.Origin, new Point3d(10, 15, 0));
btr.AppendEntity(line1);
Line line2 = new Line(Point3d(100,145,0), new Point3d(120, 135, 0));
btr.AppendEntity(line2);
trans.AddNewlyCreatedDBObject(circle,true);
trans.AddNewlyCreatedDBObject(line1, true);
trans.AddNewlyCreatedDBObject(line2, true);
trans.Commit();
}
}
如何对自己创建的线及圆创建一个选择集,然后再进行移动操作啊!恳请各位高手帮帮忙啊!
|
|