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 字符串创建为一个实体类
随机推荐
- 用Pylint规范化Python代码,附PyCharm配置
Pylint一个可以检查Python代码错误,执行代码规范的工具.它还可以对代码风格提出建议. 官网:https://pylint.readthedocs.io pip install pylint ...
- Linux实战教学笔记28:企业级LNMP环境应用实践
一,LNMP应用环境 1.1 LNMP介绍 大约在2010年以前,互联网公司最常用的经典Web服务环境组合就是LAMP(即Linux,Apache,MySQL,PHP),近几年随着Nginx Web服 ...
- OpenGL位图函数
[OpenGL位图函数] 1.OpenGL中glBitmap用于绘制一个二值阵列. When drawn, the bitmap is positioned relative to the curre ...
- Asp.net 使用Neatupload 第三方控件上传大文件,在IIS7上无法正常工作解决
使用环境:Window Server2008 + IIS7 更改web.config配置 1.在<configSections></configSections>节内加入: & ...
- 基于HttpRunner的接口自动化测试平台HttpRunnerManager(二)
https://github.com/HttpRunner/HttpRunnerManager HttpRunnerManager Design Philosophy 基于HttpRunner的接口自 ...
- Jenkins + Jmeter +Ant自动化集成环境搭建(一)
所需工具 一.jmeter 工具下载 https://jmeter.apache.org/ 配置环境JDK等及各种插件可以看小七之前的教程 二.Ant安装(http://ant.apache.org ...
- ubuntu Qt5 opencv3.4 项目配置
#------------------------------------------------- # # Project created by QtCreator 2019-03-25T14:14 ...
- Java读取Unicode文件(UTF-8等)时碰到的BOM首字符问题
在Windows下用文本编辑器创建的文本文件,如果选择以UTF-8等Unicode格式保存,会在文件头(第一个字符)加入一个BOM标识. 这个标识在Java读取文件的时候,不会被去掉,而且Stri ...
- javascript总结31 :DOM概述
1 JavaScript 三个组成部分 核心(ECMAScript)欧洲计算机制造商协会 描述了JS的语法和基本对象. 文档对象模型(DOM) 处理网页内容的方法和接口 浏览器对象模型(BOM) 与浏 ...
- CodeForces 289B Polo the Penguin and Matrix (数学,中位数)
题意:给定 n * m 个数,然后每次只能把其中一个数减少d, 问你能不能最后所有的数相等. 析:很简单么,首先这个矩阵没什么用,用一维的存,然后找那个中位数即可,如果所有的数减去中位数,都能整除d, ...