[CommandMethod("mywipeout")]
public static void mywipeout()
{ // 获取当前文档和数据库
Document acDoc = Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
// 启动事务
using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
{
// 以读模式打开Block表
BlockTable acBlkTbl;
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId,
OpenMode.ForRead) as BlockTable;
// 以写模式打开Block表记录Model空间
BlockTableRecord acBlkTblRec;
acBlkTblRec = acTrans.GetObject(acBlkTbl[BlockTableRecord.ModelSpace],
OpenMode.ForWrite) as BlockTableRecord;
Point2dCollection pt2dArray = new Point2dCollection();
pt2dArray.Add(new Point2d(0, 0));
pt2dArray.Add(new Point2d(100, 0));
pt2dArray.Add(new Point2d(100, 100));
pt2dArray.Add(new Point2d(0, 100));
pt2dArray.Add(new Point2d(0, 0));//必须闭合
Wipeout wipeoutEnt = new Wipeout();
wipeoutEnt.SetFrom(pt2dArray, new Vector3d(0, 0, 1));
acBlkTblRec.AppendEntity(wipeoutEnt);
acTrans.AddNewlyCreatedDBObject(wipeoutEnt, true);
acTrans.Commit();
}
}

  

AutoCAD.Net 实现创建wipeout遮罩实体的更多相关文章

  1. CSS创建一个遮罩层

    .layer{ width: 100%; position: absolute; left:; right:; top:; bottom:; -moz-opacity:; filter: alpha( ...

  2. 《MVC+EF》——用DBFirst创建ADO.NET实体数据模型和对象关系映射

    转载于:http://blog.csdn.net/zhoukun1008/article/details/50528145 现在越来越喜欢MVC了,不光是因为ITOO中用到了他,而是因为它里面包含了很 ...

  3. 通过myEclipse创建hibernate的实体类

    今天有个新项目中需要使用到hibernate,刚好数据库表已经创建完毕,就顺便来总结一下通过myEclipse创建hibernate的实体类. 1..在myEclipse中选择MyEclipse Da ...

  4. Civil 3D 二次开发 创建AutoCAD对象—— 01 —— 创建直线

    在方法CreateLine内完成以下代码: 01 public void CreateLine() 02 { 03 PromptPointOptions ppo = new PromptPointOp ...

  5. 关于Entity Framework采用DB First模式创建后的实体批量修改相关属性技巧

    Entity Framework采用DB First模式创建实体是比较容易与方便的,修改已创建的实体在个数不多的情况下也是没问题的,但如果已创建的实体比较多,比如10个实体以上,涉及修改的地方比较多的 ...

  6. 创建一个Phone实体,完成多页面的电话簿项目

    添加实体 在类库CORE中添加: [Table("PbPhones")] public class Phone : CreationAuditedEntity<long> ...

  7. 连接SQLite 创建ADO.net实体类

    0.开发环境 win10,vs2013-x64 1.安装: sqlite-netFx451-setup-bundle-x86-2013-1.0.102.0.exe 注意事项:选在VisualStudi ...

  8. bootstrap创建带遮罩层的进度条

    <div class="modal fade" id="loadingModal"> <div style="width: 200p ...

  9. 使用Visual Studio 快速把 Json,Xml 字符串创建为一个实体类

随机推荐

  1. glTexGen

    [glTexGen] Rather than having to explicitly provide a texture coordinate for each vertex, we can use ...

  2. IEnumerator & IEnumerable

    [IEnumerator] 用于遍历一个对象,IEnumerator在System.Collections命名空间中. public interface IEnumerator { object Cu ...

  3. go_变量定义

    package main import "fmt" var( aa =3 bb ="kkk" cc =true )//go语言中,变量可以定义在函数外面,并不是 ...

  4. 【2018沈阳赛区网络预选赛J题】Ka Chang【分块+DFS序+线段树】

    题意 给出一个有根树(根是1),有n个结点.初始的时候每个结点的值都是0.下面有q个操作,操作有两种,操作1.将深度为L的点的值全部增加X.操作2.查询以x为根的子树的结点值得和. 其中N,Q< ...

  5. 169. Majority Element 出现次数超过n/2的元素

    [抄题]: Given an array of size n, find the majority element. The majority element is the element that ...

  6. CloudFoundry 快速上手笔记

    1.登陆cf 2.登陆进入webservice 3.查看ruby版本 4.查看gem版本 5.安装CF 6.配置cf Download the CLI from github: https://git ...

  7. Spring boot 开发组件

    一.Jboot 描述:Jboot是一个基于jfinal 和 undertow开发的微服务框架.提供了AOP.RPC.分布式缓存.限流.降级.熔断.统一配置中心.swagger api自动生成.Open ...

  8. Luogu 4725 【模板】多项式对数函数

    继续补全模板. 要求 $$g(x) = ln f(x)$$ 两边求导, $$g'(x) = \frac{f'(x)}{f(x)}$$ 然后左转去把多项式求导和多项式求逆的模板复制过来,就可以计算出$g ...

  9. 安装CentOS 6.4 64 位操作系统

    1.安装 CentOS 6.4 64位操作系统的一些困境: 1.1 CentOS 6.4 64位操作系统的ISO文件有4G多,通过U盘安装的方式已经不可取(FAT32 只支持最大4G文件); 1.2 ...

  10. MySQL InnoDB的一些参数说明

    参考:http://addls.com/mysql-innodb-%E4%B9%8B-ibdata1-%E7%98%A6%E8%BA%AB%E5%A4%A7%E6%B3%95.html # 备份数据库 ...