Understand Properties and Methods了解属性和方法
Each object has associated properties and methods. Properties describe aspects of the individual object, while methods are actions that can be performed on the individual object. Once an object is created, you can query and edit the object through its properties and methods. 每个对象都伴随有属性和方法。属性用来描述对象的状态,方法是在对象上能执行的动作。对象一旦创建,我们就可以通过其属性和方法对其进行查询和编辑。
For example, a Circle object has a Center property. This property represents the point in the world coordinate system (WCS) at the center of that circle. To change the center of the circle, simply set the Center property to a new point. The Circle object also has a method called GetOffsetCurves. This method creates a new object at a specified offset distance from the existing circle. 例如,Circle对象有Center属性,该属性代表圆心的坐标。要改变圆心,只需简单将Center属性设置成新点即可。Circle对象还有一个GetOffsetCurves方法,该方法创建一个偏离已存在圆指定距离的新对象。
To see a list of all properties and methods for the Circle object, refer to the Circle object in the AutoCAD .NET Reference Guide or use the Object Browser in Microsoft® Visual Studio®. For more information on the Object Browser in Microsoft Visual Studio, see Access and Search Referenced Libraries (Object Browser). 查看Circle对象的全部属性和方法列表,参考AutoCAD .NET参考手册中的Circle对象,或在Microsoft Visual Studio中使用对象浏览器。
|