<?xml version="1.0" encoding="utf-8"?>
<doc>
<assembly>
<name>DotNetARX</name>
</assembly>
<members>
<member name="T:DNA.Tools">
<summary>
Tools包含一些非常有用的功能。
</summary>
</member>
<member name="F:DNA.Tools.PauseToken">
<summary>
如果Tools.RunCommnd()在运行过程中碰到PauseToken这个符号,那么正在运行的AutoCAD命令将暂停来接受用户的输入。
</summary>
</member>
<member name="M:DNA.Tools.WriteMessage(System.String)">
<summary>
在AutoCAD的文本窗口显示信息。
</summary>
<param name="message">要显示的内容</param>
</member>
<member name="M:DNA.Tools.WriteMessageWithReturn(System.String)">
<summary>
在AutoCAD的文本窗口显示信息并添加一个新行。
</summary>
<param name="message">要显示的内容</param>
</member>
<member name="M:DNA.Tools.RunCommand(System.Boolean,System.Object[])">
<summary>
在ARX中执行一条或多条AutoCAD命令,类似于C++中的acedCmd。
</summary>
<param name="echoCommand">提示是否要在命令行上显示输入的命令字符串</param>
<param name="args">要执行的AutoCAD命令列表</param>
<example> 下面的例子输入命令来让AutoCAD画一个圆。
<code escaped="true">
void test()
{
//在当前图形中画一个圆并缩放来显示整个圆。
Tools.RunCommand(false, "_Circle", "2,2,0","4");
Tools.RunCommand(false,"_Zoom","a");
}
</code>
</example>
</member>
<member name="M:DNA.Tools.Queueexpr(System.String)">
<summary>
在不能使用acedCommand的时候,在每个图形编辑进程的开始执行一些AutoCAD命令。
</summary>
<param name="expression">命令字符串</param>
</member>
<member name="M:DNA.Tools.ZoomExtents">
<summary>
缩放当前视口到图形边界。
</summary>
<seealso cref="M:DNA.Tools.ZoomAll"/>
</member>
<member name="M:DNA.Tools.ZoomCenter(Autodesk.AutoCAD.Geometry.Point3d,System.Double)">
<summary>
缩放当前视口的中心到一个指定的点并放大。
</summary>
<param name="center">缩放中心的3D WCS坐标</param>
<param name="magnify">缩放级别</param>
<seealso cref="M:DNA.Tools.ZoomAll"/>
</member>
<member name="M:DNA.Tools.ZoomWindow(Autodesk.AutoCAD.Geometry.Point3d,Autodesk.AutoCAD.Geometry.Point3d)">
<summary>
缩放当前视口到由两点确定的窗口。
</summary>
<param name="lowerLeft">缩放窗口的左下角坐标</param>
<param name="upperRight">缩放窗口的右上角坐标</param>
<seealso cref="M:DNA.Tools.ZoomAll"/>
</member>
<member name="M:DNA.Tools.ZoomAll">
<summary>
缩放当前视口来显示整个图形。
</summary>
<example>
<code escaped="true">
public void ZoomSamp()
{
// This example creates several objects in model space and
// then performs a variety of zooms on the drawing.
// Create a Ray object in model space
Ray rayObj = new Ray();
Point3d basePoint = new Point3d(3, 3, 0);
Point3d secondPoint = new Point3d(1, 3, 0);
rayObj.AddToModelSpace();
//Create a polyline object in model space
Polyline plineObj = new Polyline(3);
plineObj.AddVertexAt(0, new Point2d(3, 7), 0, 0, 0);
plineObj.AddVertexAt(1, new Point2d(9, 2), 0, 0, 0);
plineObj.AddVertexAt(2, new Point2d(3, 5), 0, 0, 0);
plineObj.Closed = true;
plineObj.AddToModelSpace();
//Create a line object in model space
Line lineObj = new Line(new Point3d(0, 0, 0), new Point3d(2, 2, 0));
lineObj.AddToModelSpace();
//Create a circle object in model space
Circle circObj = new Circle();
circObj.Center = new Point3d(20, 30, 0);
circObj.Radius = 3;
circObj.AddToModelSpace();
//Create an ellipse object in model space
Ellipse ellObj = new Ellipse(new Point3d(5,5,0),Vector3d.ZAxis,new Vector3d(10,20,0),0.3,0,Math.PI*2);
ellObj.AddToModelSpace();
//ZoomAll
Application.ShowAlertDialog("Perform a ZoomAll");
Tools.ZoomAll();
//ZoomWindow
Application.ShowAlertDialog("Perform a ZoomWindow");
Tools.ZoomWindow(new Point3d(1.3, 7.8, 0), new Point3d(13.7, -2.6, 0));
//ZoomExtents
Application.ShowAlertDialog("Perform a ZoomExtents");
Tools.ZoomExtents();
//ZoomCenter
Application.ShowAlertDialog("Perform a ZoomCenter");
Tools.ZoomCenter(new Point3d(3,3,0),10);
}
</code>
</example>
</member>
<member name="M:DNA.Tools.ZoomPrevious">
<summary>
缩放当前视口到它的前一个状态。
</summary>
</member>
<member name="M:DNA.Tools.UpdateAttributesInBlock(Autodesk.AutoCAD.DatabaseServices.ObjectId,System.Collections.Hashtable)">
<summary>
更新一个块参照中的属性。
</summary>
<param name="blockRefId">块参照的object id</param>
<param name="attNameValues">一组表示属性名/值的键/值对。</param>
<example> 下面的例子把所选择的块参照的"RADIUS"属性改变为 "2"。
<code escaped="true">
void test()
{
ObjectId id=Tools.Editor.GetEntity("Please select a block").ObjectId;
Hashtable h=new Hashtable();
h.Add("RADIUS", "2");
Tools.UpdateAttributesInBlock(id, h);
}
</code>
</example>
</member>
<member name="M:DNA.Tools.InsertBlockReference(System.String,System.String,Autodesk.AutoCAD.Geometry.Point3d,Autodesk.AutoCAD.Geometry.Scale3d,System.Double,System.Collections.Hashtable)">
<summary>
在当前图形中插入一个带有属性的有名块。
</summary>
<param name="layer">块参照所要插入的图层名</param>
<param name="blockName">AutoCAD图形文件的名字或所要插入的块名</param>
<param name="position">块参照的插入点</param>
<param name="scale">块参照的缩放值</param>
<param name="rotateAngle">块参照的旋转角度</param>
<param name="attNameValues">一组表示属性名/值的键/值对</param>
<returns>插入块的Object Id</returns>
<example> 下面的例子插入一个名为"CircleBlock"的块,并设置"RADIUS"属性为"2".
<code escaped="true">
void Example_InsertBlock()
{
Hashtable h=new Hashta
- 1
- 2
前往页