摘要: GetObjectSnapPoints函数的主要参数介绍 定义一:public virtual void GetObjectSnapPoints(ObjectSnapModes snapMode, int gsSelectionMark, Point3d pickPoint, Point3d lastPoint, Matrix3d viewTransform, Point3dCollection snapPoints, IntegerCollection geometryIds);定义二: public virtual void GetObjectSnapPoints(ObjectSnap.. 阅读全文
posted @ 2012-11-19 22:09 游天居士 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 1. C# 字符串常用操作将字符串拆分为子字符串(如将句子拆分为各个单词)是一个常见的编程任务。Split() 方法使用分隔符(如空格字符)char 数组,并返回一个子字符串数组。您可以使用 foreach 访问此数组。示例: char[] delimit = new char[] { ' ' }; string s14 = "The cat sat on the mat."; foreach (string substr in s14.Split(delimit)) //使用空格拆分 { System.Console.WriteLine(substr); 阅读全文
posted @ 2012-11-19 22:02 游天居士 阅读(173) 评论(0) 推荐(0) 编辑
摘要: enum TestEnum {zero=0,one=1,two=2} ComboBox cbo = new ComboBox(); cbo.DataSource = System.Enum.GetNames(typeof(TestEnum)); enum test=enum.one; cbo.SelectedIndex = this.cbo.FindString(test.ToString());取值 TestEnum testenum = (TestEnum)Enum.Parse(typeof(TestEnum) ,cbo.Se... 阅读全文
posted @ 2012-11-19 21:56 游天居士 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 类型:整数保存位置:注册表初始值:2指定是否使用优化的二维多段线。PLINETYPE 控制如何使用 PLINE 命令创建新多段线以及是否转换早期版本图形中的现有多段线。0打开旧图形时不转换其中的多段线;PLINE 创建旧格式的多段线1打开旧图形时不转换其中的多段线;PLINE 创建优化的多段线2打开 AutoCAD 14 或旧图形时转换其中的多段线;PLINE 创建优化的多段线Polyline 为优化多段线。采用新的存诸方式。Polyline2D 为老式的多段线。Polyline3D 是三维的多段线。并且里面只有直线。不能和圆弧。 阅读全文
posted @ 2012-11-19 21:52 游天居士 阅读(448) 评论(0) 推荐(0) 编辑
摘要: [StructLayout(LayoutKind.Sequential), Wrapper("AcGeTol")]public struct Tolerance {}DescriptionThis .NET class wraps AcGeTol ObjectARX class. This is an instantiable class that is by default initialized to the default tolerances. Subsequently, the tolerances within it can be customized to s 阅读全文
posted @ 2012-11-19 21:49 游天居士 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 1. C# 范围缩放到实体对象. Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("zoom o ", true, false, false);O 为对象.2. 怎么刷新当前屏幕.(C#) Autodesk.AutoCAD.ApplicationServices.Application.UpdateScreen()另外有一个Editer. UpdateScreen() 和. Editer.region()3. 选择当前 阅读全文
posted @ 2012-11-19 21:48 游天居士 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 1. C++和C#定义变量的区别:C++:一般在定义变量时一定要初始化值,否则如果变量没有赋值时。系统会得到一个不确定的值。C#:则不用,如果一个变量没能赋值就使用.VS的编译将不能通过。2. C++的常量和引用 常量和引用只能被初始化.而不能被赋值.#include <iostream>using namespace std;class rectangle{public: //:length(5),width(6)专门给类变量初始化使用的. rectangle():length(5),width(6){cout<< length*width<<endl;} 阅读全文
posted @ 2012-11-19 21:45 游天居士 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1. 传递对象的方式接受拖放的目标控件可以接受被拖放的控件对象,也可以只接受字符串类型的参数。接受的内容依赖于被拖放控件传递的类型以下为传递对象的方式:void Control_MouseDown(object sender, MouseEventArgs e){((Label)sender).DoDragDrop(((Label)sender), DragDropEffects.Move);}以下为传递字符串类型的方式:void Control_MouseDown(object sender, MouseEventArgs e){((Label)sender).DoDragDrop(((La 阅读全文
posted @ 2012-11-19 21:43 游天居士 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 1. C#计算两点之间的距离.(09.10.7) 1 Point2d p0,p1; double d1 = p1.GetDistanceTo(p0);2 (p1-p0).Length 两点相减得到一个向量.再得到距离.2. Vector2d 和 Vector3d 类可以获得该向量的长度.是否垂直/平行另个向量.3.用矩形框选择两个点 PromptCornerOptions pco = new PromptCornerOptions("\nSelect second corner of plot area: ", first); ppr = ed.GetCorner(pco) 阅读全文
posted @ 2012-11-19 21:30 游天居士 阅读(615) 评论(0) 推荐(0) 编辑
摘要: 许多工作在实体集之上的AutoCAD命令有两种类型的工作方式:动作-名字或名字-动作。这意味着若用户已经预告选择了一个集合的实体(“名字”),然后发起命令(“动作”),命令就不会需要请求用户选择他们了。这就会使用一些东西来调用pickfirst或暗指AutoCAD中的选择集。要在命令中利用这个特性的优势,首先需要使用一个特别的命令标志“UsePickSet”:这告诉AutoCAD编辑器在调用命令时不要清除这个pickfirst集。然后命令的实现会使用编辑器对象的SelectImplied()方法来得到pickfirst集,这就可以用了。在这个阶段也可以使用SetImpliedSelection 阅读全文
posted @ 2012-11-19 21:26 游天居士 阅读(2896) 评论(0) 推荐(0) 编辑