07 2014 档案
摘要:此时在3.5框架工程中会出现【未能加载文件或程序集“System.Drawing,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。行123,位置5。】的错误,解决办法是将4.0....
阅读全文
摘要:1.可能需要卸载更新kb2962872,重启后可以正常激活。2.也可能是这样的:cad重新安装注册不上的问题是在电脑里有一个注册信息,把他删掉才能重新注册位置在c:\Documents and Settings\all users\Application Data\Autodesk把这个文件删掉就可...
阅读全文
摘要:按了无数遍VC6 都没有碰到这个问题,我的可恶的win7上第一遍没有问题但是VC6不能用? 打开就说有错误卸载重装遇到这个问题:——Error Launching ......acmboot.exe今天被我碰到了---Google一下 找到答案(1)需要修改注册表键值: HKEY_LOCAL_MAC...
阅读全文
摘要:1.新建一个工程,注意将"使用MFC"选项勾上。2.使用【insert/Resouce】菜单项插入一个对话框。3.此时会弹出一个窗体,直接按Enter键可以调出【属性】面板。设置窗体的ID和窗体的Caption。4.可以点击【属性】面板左上角的图钉图标将其常显。5.向窗体中插入控件,依次设置其ID与...
阅读全文
摘要://2008年4月24日 System.DateTime.Now.ToString("D"); //2008-4-24 System.DateTime.Now.ToString("d"); //2008年4月24日 16:30:15 System.DateTi...
阅读全文
摘要:DataTable dt = new DataTable(); int n = 3; //用来进行排序的字符串 string myDictionary = "HERABMWSUG"; //...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.IO;namespace LambdaExpressionA...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.IO;namespace LambdaExpressionA...
阅读全文
摘要:http://bbs.mjtd.com/thread-107357-1-1.htmlhttp://bbs.mjtd.com/thread-107374-1-1.html
阅读全文
摘要:法兰系统表专门存放法兰系统。法兰形式表专门存放法兰形式。法兰密封面表专门存放法兰密封面形式。法兰连接尺寸表专门存放各公称压力和公称直径下法兰的连接尺寸。法兰体系级(外键)、压力级(外键)、公称直径作为基本数据。法兰尺寸表将所有法兰上可能存在的尺寸全部包括进去。法兰体系级(外键)、法兰形式级(外键)、...
阅读全文
摘要:原本我是想利用CAD的动态块与参数化来实现法兰的二次开发,只需要用程序把数据库和法兰动态块连接起来就OK了,但是从目前的研究情况来看,这一点未必可以做到,因为CAD中根本不支持环形陈列的参数化,环形陈列在CAD中是有并且2012后增强了其功能,但是环形陈列中的图元在生成陈列后其参数自动无效,这个无法...
阅读全文
摘要:目前似乎已经无法突破法兰盘的螺栓孔大小的问题了,只能通过程序来写这一部分的内容。插入到图形中的块只有法兰的外径、内径等可以进行参数化的数据。而螺栓孔需要通过程序来生成并以陈列的形式插入到圆心,与圆心重合约束。可以在一张图中保存环形陈列的数据,每次插入该数据并通过程序对其源进行修改。OK,最后定下来通...
阅读全文
摘要:前面想的是把一个类型的法兰做到一个块中,所有密封面通过动态块中的是否显示功能来实现,但这样会有一个很大的问题,那就是与数据库的连接会非常的麻烦,所以现在定下来,密封面单独做块,也就是说5个类型法兰,如果密封面有4种,那么需要做的块有5x4=20个,但是这样的话其尺寸可以很好地匹配。
阅读全文
摘要:思路决定出路,这两天对这句话是深有感触。周五晚上、周六一天和周日白天总共两天有一种方法来整理法兰数据库,近10层嵌套循环,搞到最后都没有办法分清是哪层循环了,最终还是出现很多问题。周日下午休息了1个小时,醒来后想了一个新的办法,遂按此法重新来写,这次把思路梳理清晰了,把大的层次,小的层次都先写好,然...
阅读全文
摘要:全屏显示:Shift+Alt+Enter
阅读全文
摘要:注释的快捷键注释:Ctrl+E+C取消注释:Ctrl+E+U
阅读全文
摘要:其实很简单,就是把ID设置为主键,并且保存,重新打开表就可以看到数据按大小排序了!
阅读全文
摘要:C#中定义数组--字符串及数组操作 以前用VB的时候经常使用数组,不过C#用习惯后数组基本上用的不多了。 像用List<>,ArrayList,Dirctionary<,>都比较好用。 一、一维: int[] numbers = new int[]{1,2,3,4,5,6}; //不定长 int[]
阅读全文
摘要:using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Diagno...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Diagnostics;namespace Extension...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ToLookupDemo{ class Program { //自定义类 p...
阅读全文
摘要://无法获得text MessageBox.Show(cbb_EDiameter.SelectedText); //可以获得text MessageBox.Show(cbb_EDiameter.Text);
阅读全文
摘要:float id = float.Parse(cbb_EDiameter.Text)
阅读全文
摘要:.Net中所有对CAD数据库的处理都是通过“事务处理”来进行的,所以所有涉及访问CAD中对象的语句必须在下面的语句括号中执行。using (Transaction trans = db.TransactionManager.StartTransaction()){语句……}
阅读全文
摘要:/// /// 取得当前图层名称 /// /// 数据库对象 /// public static string GetCurrentLayer(this Database db) { //Database db = HostApplicationServices.WorkingDatabase...
阅读全文
摘要:上一个帖子中http://bbs.mjtd.com/forum.php?mod=viewthread&tid=107357&page=1#pid608147可以捕捉不带窗体的dll中的断点,但是窗体中的事件却无法捕捉,今天又从一篇博客中找到捕捉窗体事件的处理方法,我看论坛里的高手并没有写出这一块的方...
阅读全文
摘要:首先应将所有acmgd.dll和acdbmgd.dll的复制本地设置为false,然后
阅读全文
摘要:
阅读全文
摘要:语句如下:dicts.GetAt(Position).GetXrecord("年薪").First().Value其中DBDictionary dicts=(DBDictionary)trans.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForR...
阅读全文
摘要:管子标准、接管外径的获取方法管子标准根据下图一中defaultpipe字段是否存在于下图二中flasys中,如存在则取得cadpipe中的数据下图一中defaultpipe的唯一性由flasys下拉列表决定如果“配公制管”为true则,defaultpipe中取得的HGA替换为HGB对于defaul...
阅读全文
摘要:初始时gridview中显示所有管口的数据,当用户选择其中一行时,数据读入到上面的控件中。如果用户在当前管口中选择时,gridview中相应行也自动选中。连接方式值与后续控件和连接方式显示图片的对应关系见下图:外伸L与至CL或TL距离X是关联的,即用户输入其中一个,另一个由程序自动计算出来,对于不同...
阅读全文
摘要:两角和与差cos(α+β)=cosα·cosβ-sinα·sinβcos(α-β)=cosα·cosβ+sinα·sinβsin(α±β)=sinα·cosβ±cosα·sinβtan(α+β)=(tanα+tanβ)/(1-tanα·tanβ)tan(α-β)=(tanα-tanβ)/(1+tan...
阅读全文
摘要:对于HG美洲体系和ASME B16.5的法兰,其RF面高度和磅级有关系。对于HG美洲体系、JISB2220和ASME B16.5的法兰,其FF面对应的C和H应增加F1高度。不需要。ASME B16.47AB的质量有问题。已经解决。4701~4703法兰中,CRF密封面应为CF1,注意动态块中是否匹配...
阅读全文
摘要:数据在检查过程中,表头已经检查过了,另外生成数据表后对于有些F2,F3为空的2200及以上的应删除。
阅读全文
摘要:P19P24~P32P95~P98P102~P106P122P125~P128P136P143P144P145表5.0.1P152表3.0.3P153P154P157P164P166P167P170P176P177P185~P187P189~P191P214P225~P229
阅读全文
摘要:P253P257~P268P310~P312P316~P320P335P336-表3.2.7-3P340P341P342 至表7.0.1-4为止,B系列不输入P352~P353P360P363~P366P374P381P382P389~P395P398P405~P410P413P420~P424P4...
阅读全文
摘要:HG206151中DN550为RF,FF的,后面应删除其它密封面的数据。RJ CLASS150 DN15 & DN20应删除。RJ DN550应删除。HG20623AWN,HG20623ABL中的RJ后面部分行应删除。
阅读全文
摘要:evaluate("1+2+3*4-5")=10
阅读全文
摘要:ArrayList DnList = new ArrayList(); using (var LinkToSQL = new LinkToSQLDataContext())//连接SQLServer数据库 { var DneHead = from ee in LinkToSQL.CadDiamet...
阅读全文
摘要:pb_Heads.Image = (System.Drawing.Image)(Properties.Resources.THB);
阅读全文
摘要:if (cbb_HeadType.Text.Split('%').Count()==1)string str = cbb_HeadType.Text.Replace("%", "");
阅读全文
摘要:private void tbORcbb_leave(object sender, EventArgs e) { if (typeof(TextBox).IsInstanceOfType(sender)) { if (((TextBox)sender).Text.IsNumeric() != tru...
阅读全文
摘要:#region 文本框和列表框的click事件 private void tbORcbb_click(object sender, EventArgs e) { if (typeof(TextBox).IsInstanceOfType(sender)) { if (!ifSelected) { ((...
阅读全文
摘要:#region 图片单击旋转事件 private void pb_Heads_Click(object sender, EventArgs e) { System.Drawing.Image myImage = pb_Heads.Image; myImage.RotateFlip(RotateFli...
阅读全文
摘要:#region 重命名块参照 /// /// 重命名块参照 /// /// 当前数据库 /// 块参照旧名 /// 块参照新名 public static void RenameBlock(this Database db, string oldBlockname, string newBlo...
阅读全文
摘要:补强圈设计补强圈外径与宽度中的TAG设置为相同的唯一标识。外径、内径leave成功时,宽度内容清空。宽度leave成功时,外径、内径内容清空。外径、内径的mouseenter事件中加入tooltip:外径或内径与宽度只允许输入一项!\n如输入两项则先输入的会被清空!外径输入了内径必输入。内径输入了外...
阅读全文
摘要:foreach (Control c inthis.textBox1.Parent.Controls)
阅读全文
摘要://取得特定名称的控件Control control = Controls.Find("button1", true)[0];//取得该控件的属性object o = control.GetType().GetProperty("PropertyName").GetValue(control, nu...
阅读全文
摘要:#region 回车键当Tab键使用 private void enter_KeyPress(object sender, KeyPressEventArgs e) { foreach (Control c in this.Controls) { c.KeyPress += new System.W...
阅读全文
摘要://替换CAD中原有命令为开发人员自己开发的命令的方法 //在CAD中执行一次RegisterMyCommand命令后,再执行line时就会loadhead程序了 [CommandMethod("RegisterMyCommand")] public void RegisterMyCommand()...
阅读全文
摘要:锁定窗体大小:FormborderStyle=FixedDialog 去掉最大化:maxminzebox=false 去掉最小化:minminzebox=false
阅读全文
摘要:由于tag属性是object类型,所以不能按string来判断control.Tag!=null
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ToDictionaryDemo{ class Program { public clas...
阅读全文
摘要:在VS界面中直接按Ctrl+alt+i或打开命令窗口,输入immed今天想看看这个int.Parse("01")是否可得到,此时即时窗口正好派上用场!
阅读全文
摘要:noztable.GetType().GetProperty("RDO").SetValue(noztable, Convert.ToDouble(tb_RDO.Text), null);上面的RDO实际上可以用control名替代,这样可以实现批量赋值。
阅读全文
摘要:如:var TasComID = (from ee in LinkToSQL.TasCom where ee.TasComNum == cbb_TasComNum.SelectedItem.ToString() && ee.IsDeleted == false select ee.TasComID)...
阅读全文
摘要:var allLineData = from ss in LinkToSQL.CadNozTable from tt in LinkToSQL.TasCom where tt.TasComID == ss.FK_TasComID && ss.FK_TasComID == ID select ss; ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace OfTypeDemo{ class Program { static void Main(...
阅读全文
摘要:1.this.Close(); 只是关闭当前窗口,若不是主窗体的话,是无法退出程序的,另外若有托管线程(非主线程),也无法干净地退出;2.Application.Exit(); 强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出;3.Application.ExitTh...
阅读全文
摘要:private void button1_Click(object sender, EventArgs e) { if (test(10)) MessageBox.Show("代码成功执行!"); else MessageBox.Show("代码未执行!"); } private bool test...
阅读全文
摘要:扩展文字应有一套完备的命名体制eHeaddnidthkhdHeaddnidthkhdrxrcHeaddnidthkhdrxrh1id1dh
阅读全文
摘要:http://www.cnblogs.com/OpenCoder/archive/2010/02/23/1672043.html
阅读全文
摘要:1、查询Student表中的所有记录的Sname、Ssex和Class列。selectsname,ssex,classfromstudentLinq:fromsinStudentsselectnew{s.SNAME,s.SSEX,s.CLASS}Lambda:Students.Select(s=>n...
阅读全文
摘要:工具->选项->项目和解决方案->生成并运行->当项目过期时->从不生成这是因为运行时生成的DLL与目前VS现有的代码版本不一样造成的,把Bin下的Dll删除,再重新生成。工具->选项->调试->常规->去掉“要求源文件与原始版本完全匹配”复选框就OK。全选CPP文件内容,选择 “编辑”-“高级”-...
阅读全文
摘要:首先需要将DataGridView的RowHeadersWidthSizeMode设置为EnableResizing,才可以设置RowHeadersWidth值!
阅读全文
摘要://根据输入内容绑定工作令号下拉框值,匹配与输入内容相似的值 var Tcn = (from ee in LinkToSQL.TasCom from ff in ...
阅读全文
摘要:typ.GetType().GetProperty("BPlate").GetValue(typ, null).ToString();spa1.GetType().GetProperty(KeyString).SetValue(spa1, val, null);返回结果是:SA-240 304
阅读全文
摘要:在处理一些数据时,我们希望能用“四舍五入”法实现,但是C#采用的是“四舍六入五成双”的方法,如下面的例子,就是用“四舍六入五成双”得到的结果:double d1 = Math.Round(1.25, 1);//1.2double d2 = Math.Round(1.24, 1);//1.2doubl...
阅读全文
摘要:一、设置对齐方式1.列标题居中对齐dataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;但实际上看上去仍然偏左,这是因为存在排序三角形,需要取消排序功能2.内...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.Edito...
阅读全文
摘要:将下面的代码放到你的窗口中即可,哈哈!protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x02000000; return cp; } }
阅读全文
摘要:将一个目录中所有PDF文件合并到一个新的PDF文件中using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using Syste...
阅读全文
摘要:using System.Data;object aaa=newDataTable().Compute("8+2*(3+4)",null);messagebox.show(aaa.tostring());
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
阅读全文
摘要:"^\d+$" //非负整数(正整数 + 0)"^[0-9]*[1-9][0-9]*$" //正整数"^((-\d+)|(0+))$" //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$" //负整数"^-?\d+$" //整数"^\d+(\.\d+)?$" //非负浮点数(正...
阅读全文
摘要:Join()好用例如string[]tableName=newstring[]{"1","2","3"};textBox1.Text=string.Join(",",tableName);输出:1,2,3
阅读全文
摘要:combobox中有1,2,3三个item第1次选择1,四个事件都触发了,当我再次选择1时,4没出现,3,2,1均出现 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { Messa...
阅读全文
摘要:Creating a selection filter that finds dynamic blocks in AutoCAD using .NETAn interesting question came in via email from Rob Outman. He’s interested ...
阅读全文
摘要:/// /// 获取窗口中块说明 /// /// 数据库对象 /// 窗口选择角点1 /// 窗口选择角点2 /// public static void getBlocks(this Database db,Point3d pt1,Point3d p...
阅读全文
摘要:奔腾4 2.4GHZ FSB=800MHZ 内部带宽=CPU的主频×32位/8 =2400MHZ×32bit/8 =2400M/S×4B =9600MB/S 外部带宽(FSB的带宽)=FSB的频率×64位/8 =800MHZ×64bit/8 =800M/S×8B =6400MB/S例如:奔腾4 2...
阅读全文
摘要:string ccc = db.OriginalFileName;//对应dwt文件的路径string ddd = db.Filename;//.bak文件对应的路径string eee = doc.Name;//当前dwg文件的路径//当前dll的路径string path = System.Re...
阅读全文
摘要:2013:Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.Current.UserRegistryProductRootKey2010:Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLi...
阅读全文
摘要:try { psv.SetPlotConfigurationName(ps, cOre, null); } catch (SystemException ex) { ed.WriteMessage("\n错误行开始:"); ed.WriteMessage("\n错误状态:" + ex.InnerEx...
阅读全文
摘要:注意将form2中的botton2的modyfier属性修改为publicform1代码usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawin...
阅读全文
摘要:http://wenku.baidu.com/link?url=Fe1saXNgSuLM4OgiCzsklfkqqwh1SqxbqrWyPTYRaDgT1Y8KZEKK7jwL_FPgCyOVwg_SpiwNk2EjElT8_9TvDkE31EwG2SaOPG4h6JAzmTy
阅读全文
摘要:form的autosize=true,formborderstyle=fixedsingletablelayoutpanel及其里面的容器的dock=fill,autosize=truelabel中的文字比较贴着窗体边缘时可以通过padding属性来调整因定宽度则可以使用tablelayoutpan...
阅读全文
摘要:开发界面选择动态块,读取其中的参数写入到表1中,如果blockname相同,则不允许加入程序界面上四个下拉框,第一级用于选择动态块名,第二级用于选择各块中的分类选择了动态块名后通过其ID可以查询到表2中的第二、三、四级分类,并且通过表1中id=1(假设)和字段名中含有user字样且字段值不为空来得到...
阅读全文
摘要://假设你的项目名称为Demo,PictureBox控件名称为pic1,资源中的图像名称为“IMG”//获取该资源的代码如下,GetObject的参数可以用拼接字符串的方式来完成//注意Resources文件夹下的名称跟资源中定义的名称未必是一致的pic1.Image=(Image)global::...
阅读全文
摘要:打开高版本的access,点击打开,选择数据库文件,当前对话框中打开按钮旁边有个小的下拉三角形,点开,点击以独占的方式打开。打开数据库后在【文件】/【保存并发布】选择低版本的数据库。#access
阅读全文
摘要:Jet 引擎,可以访问 Office 97-2003,但不能访问 Office 2007。ACE 引擎是随 Office 2007 一起发布的数据库连接组件,既可以访问 Office 2007,也可以访问 Office 97-2003。另外:Microsoft.ACE.OLEDB.12.0 可以访问...
阅读全文
摘要:条件编译的原理是满足【条件编译符号】(见下图)时代码才有用,这帮我们CAD二次开发人解决一个很大的难题,我们可以只用维护一套代码就可以了,避免多套代码管理起来混乱我采用的是:一套代码文件加若干project框架来实现,打个简单的比喻,project框架相当于是一个酒瓶子,而代码则是其中的酒,瓶子可以...
阅读全文
摘要:很多时候我们需要得到一个英文字符的 ASCII 码,或者一个汉字字符的 Unicode 码,或者从相关的编码查询它是哪一个字符的编码。很多人,尤其是从 VB 程序序转过来学 C# 的人,会报怨 C# 里为什么没有提供现成的函数来做这个事情——因为在 VB 中有 Asc() 函数和 Chr() 函数用...
阅读全文
摘要:C#转义字符·一种特殊的字符常量;·以反斜线"\"开头,后跟一个或几个字符。·具有特定的含义,不同于字符原有的意义,故称“转义”字符。 ·主要用来表示那些用一般字符不便于表示的控制代码。 ·它的作用是消除紧随其后的字符的原有含义 ·用一些普通字符的组合来代替一些特殊字符,由于其组合改变了原来字符表示...
阅读全文
摘要:Console.WriteLine("Found {0} in position of {1}",val,pos);
阅读全文
摘要:连续定义变量并连续赋值int num1,num2,num3;num1=num2=num3=1;++i--->i+1--i--->i-1int j = i++;--->int j=i 且 i+1i += 1-->i=i+1i -= 1-->i=i-1i *= i-->i=i*1
阅读全文
摘要:默认情况下,C#中的伪随机数生成器Random是根据系统时间来设置其种子的。Random rd = new Random();int randNum=rd.next(1,101)若我们采用默认的方式,对Random进行初始化的时候不赋予任何参数,其随机种子便采用系统时间。如果我们用循环一次生成多个随...
阅读全文
摘要:主要是想将以前的lisp程序整合到现在的.net菜单中才会这么干的using Autodesk.AutoCAD.Windows;using Autodesk.AutoCAD.Runtime;using System.Windows.Forms;using Autodesk.AutoCAD.Datab...
阅读全文
摘要:using System;using Autodesk.AutoCAD.ApplicationServices;using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.EditorInput;using Autodesk.Auto...
阅读全文
摘要:namespace BCCDELWIPOUT{ public class DraftingTools { [CommandMethod("BCC:WOUT")] public static void BCCDELETEWIPOUT() { Document doc = Application.Doc...
阅读全文
摘要:usingAutodesk.AutoCAD.Runtime;usingAutodesk.AutoCAD.ApplicationServices;usingAutodesk.AutoCAD.DatabaseServices;usingAutodesk.AutoCAD.Geometry;namespac...
阅读全文
摘要:Autodesk Developer NetworkDevBlog:http://adndevblog.typepad.com/autocad/kean's blog:http://through-the-interface.typepad.com/autodesk c#.net forum:htt...
阅读全文
摘要:[CommandMethod("changeZoom")]staticpublicvoidCommandChangeViewportZoom(){// access database and editorDatabasedb =Application.DocumentManager. MdiActi...
阅读全文
摘要:usingAutodesk.AutoCAD.ApplicationServices;usingAutodesk.AutoCAD.DatabaseServices;usingAutodesk.AutoCAD.EditorInput;usingAutodesk.AutoCAD.Runtime;using...
阅读全文
摘要:usingAutodesk.AutoCAD.Runtime;usingAutodesk.AutoCAD.ApplicationServices;usingAutodesk.AutoCAD.DatabaseServices;usingAutodesk.AutoCAD.EditorInput;using...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;using Autodesk.AutoCAD.Runtime;...
阅读全文
摘要:/// /// 从句柄转换成ObjectId /// Version : 2010.03.29 Sieben /// /// 句柄,可以是Handle,string,int,long数据类型 /// 成功返回句柄所对应的ObjectId,否则返回ObjectId.Null publi...
阅读全文
摘要:§LinemyLine = (Line)myObject;§‘as’操作符-Line myLine = myObjectasLine; -§如果失败,没有异常,但对象为null !§‘is’操作符–if (myObj is Line) …§typeof操作符 – if typeof (obj1) =...
阅读全文
摘要:/// /// 过滤选择集合 /// 调用方法如: ObjectIdCollection EntityCollection = GetSelection(); /// /// 对象集合 public static ObjectIdCollection GetSelection() { Docu...
阅读全文
摘要:/// /// 作线的垂线 /// [CommandMethod("sText_MoveOfLine")] public void sText_MoveOfLine() { Database db = HostApplicationServices.WorkingDatabase; Editor...
阅读全文
摘要:/// /// 文字打断 /// [CommandMethod("sText_break")] public void sText_break() { Document doc = MgdAcApplication.DocumentManager.MdiActiveDocument; Datab...
阅读全文
摘要://测试注册表 ////////////////////////////////////////////////////////////////////////// /// /// 读注册表 /// /// 获取路径 /// 要得到的值 /// 返回注册表指定键值 public static ...
阅读全文
摘要:......省略一些usingusing Autodesk.AutoCAD.ApplicationServices;using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.Runtime;using Autodesk.AutoCA...
阅读全文
摘要:ObjectIdCollection ids = STools.GetSelection(); if (ids.Count == 0) return; using (Transaction trans = doc.TransactionManager.StartTransaction()) { Li...
阅读全文
摘要:当下主流Qt进行C++GUI开发很多,但是网上比较新的资料较少,并且Qt官网上面的搜索相应时间也很慢。参考了很多网上的资料结合自己的实践写一篇关于在VS2010环境中部署配置QT的博文。概述:主要配置步骤:1.进行VS2010安装配置2.进行QT库安装3.进行VS2010QT插件安装4.测试安装结果...
阅读全文
摘要:前面《使用Qt.1》里面说了Vs和Qt之间的安装配置,下面要将一下Qt自己的IDE工具——QtCreator。概述:1.准备2.安装3.配置4.测试运行具体:1.准备:软件:QtCreator:qt-creator-windows-opensource-2.6.0.exe(下载地址:http://q...
阅读全文
摘要:2014-01-20 14:25form的autosize=true,formborderstyle=fixedsingletablelayoutpanel及其里面的容器的dock=fill,autosize=truelabel中的文字比较贴着窗体边缘时可以通过padding属性来调整因定宽度则可以...
阅读全文
摘要:Acad::ErrorStatus CEntityUtil::Rotate(AcDbObjectId entId,const AcGePoint2d &ptBase,double rotation){ //几何变换矩陈 AcGeMatrix3d xform; //向量 AcG...
阅读全文
摘要:AcDbObjectId CPolylineUtil::Add(const AcGePoint2dArray &points,double width/* =0 */){ //点数量 int numVertices=points.length(); //定义多段线 AcDbP...
阅读全文