AutoCAD.Net 实现创建wipeout遮罩实体
[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遮罩实体的更多相关文章
- CSS创建一个遮罩层
.layer{ width: 100%; position: absolute; left:; right:; top:; bottom:; -moz-opacity:; filter: alpha( ...
- 《MVC+EF》——用DBFirst创建ADO.NET实体数据模型和对象关系映射
转载于:http://blog.csdn.net/zhoukun1008/article/details/50528145 现在越来越喜欢MVC了,不光是因为ITOO中用到了他,而是因为它里面包含了很 ...
- 通过myEclipse创建hibernate的实体类
今天有个新项目中需要使用到hibernate,刚好数据库表已经创建完毕,就顺便来总结一下通过myEclipse创建hibernate的实体类. 1..在myEclipse中选择MyEclipse Da ...
- Civil 3D 二次开发 创建AutoCAD对象—— 01 —— 创建直线
在方法CreateLine内完成以下代码: 01 public void CreateLine() 02 { 03 PromptPointOptions ppo = new PromptPointOp ...
- 关于Entity Framework采用DB First模式创建后的实体批量修改相关属性技巧
Entity Framework采用DB First模式创建实体是比较容易与方便的,修改已创建的实体在个数不多的情况下也是没问题的,但如果已创建的实体比较多,比如10个实体以上,涉及修改的地方比较多的 ...
- 创建一个Phone实体,完成多页面的电话簿项目
添加实体 在类库CORE中添加: [Table("PbPhones")] public class Phone : CreationAuditedEntity<long> ...
- 连接SQLite 创建ADO.net实体类
0.开发环境 win10,vs2013-x64 1.安装: sqlite-netFx451-setup-bundle-x86-2013-1.0.102.0.exe 注意事项:选在VisualStudi ...
- bootstrap创建带遮罩层的进度条
<div class="modal fade" id="loadingModal"> <div style="width: 200p ...
- 使用Visual Studio 快速把 Json,Xml 字符串创建为一个实体类
随机推荐
- Presto资源组配置
{ "rootGroups": [ { "name": "global", "softMemoryLimit": &qu ...
- Sso单点登录分析
1. Sso系统分析 1.1. 什么是sso系统 SSO英文全称Single Sign On,单点登录.SSO是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统.它包括可以将这 ...
- 深入浅出iptables
一. 防火墙是什么 1. 防火墙简述 防火墙是指设置在不同网络或网络安全域之间的一系列部件的组合,它能增强机构内部网络的安全性.它通过访问控制机制,确定哪些内部服务允许外部访问,以及允许哪些外部请求可 ...
- [SoapUI] DataSource, DataSourceLoop, DataSink
Script assertion in login:
- Fix “Could Not Find This Item” When Deleting in Windows 7
If you’ve been using Windows for as long as I have, you have probably run into your share of weird e ...
- scp 的时候提示WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
摘自:https://blog.csdn.net/haokele/article/details/72824847 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
- j中的substr(start,length)和substring(start,stop)
j中的substr(start,length)和substring(start,end) substring 1 substring 方法用于提取字符串中介于两个指定下标之间的字符(包头不包尾) 2 ...
- [C#] readonly vs const
C#中的readonly和const两个关键字都可以用来定义系统变量,那两者之间有什么区别呢? 1. const变量赋值后,就不可以对其进行修改.且在定义时就需要给它赋值,使用const修饰的变量是s ...
- 阿里云OSS-web直传---在服务端c#签名,浏览器直传
OSS web直传---在服务端php签名,浏览器直传 本文:OSS web直传---在服务端c#签名,浏览器直传 其他语言的范例地址:https://help.aliyun.com/document ...
- CodeForces 427A Police Recruits (水题)
题意:给定 n 个数,有正数和-1, -1表示罪犯,正数表示招了几个警察,一个警察只能看一个罪犯,并且要按顺序,问你有多少罪犯逃脱. 析:很简单么,从开始扫到最后,把是正数就加上,是-1判断剩余警察大 ...