AutoCAD对象模型及属性方法
Application 应用程序
Preferences
Documents 图形文档集合
Document 图形文档对象
Class Name :AcadDocument
- 方法
-
Activate 活动
-
AuditInfo 检查图纸完整性
-
Close 关闭文档
-
CopyObjects 复制多个对象(深度克隆)。
-
EndUndoMark 标记操作块的结束
-
Export 导出
-
GetVariable 获取AutoCAD系统变量的当前设置
-
HandleToObject 获取与给定句柄对应的对象
-
Import 导入
-
LoadShapeFile 加载形状文件
This method makes all the shapes in the shape file available to the current drawing. To add a shape into the drawing, use the AddShape method.
-
New 在SDI模式下创建新文档
Dim templateFileName As String templateFileName = "c:\AutoCAD\template\ansi-a.dwt" If AcadApplication.preferences.System.SingleDocumentMode = True Then ThisDrawing.New templateFileName Else ThisDrawing.Application.Documents.Add templateFileName End If
-
ObjectIDToObject 获取与给定对象ID对应的对象
-
Open 打开现有图形文件(DWG)并使其成为活动文档
-
PostCommand 发送命令字符串(异步执行)
-
PurgeAll 从文档中删除未使用的命名引用
-
Regen 重新生成整个图形,并重新计算所有对象的屏幕坐标和视图分辨率
-
Save 保存
-
SaveAs 另存为
-
SendCommand 将命令字符串从VB或VBA应用程序发送到文档进行处理(同步执行)
-
SetVariable 设置cad系统变量
-
StartUndoMark 标记操作`块的开始
-
WBlock 写块
-
- 属性
- Active 活动的(bool)
- ActiveDimStyle 指定激活的标注样式
- ActiveLayer 指定活动图层
- ActiveLayout 活动布局
- ActiveLinetype 指定图形的活动线型
- ActiveMaterial 指定此文档的当前默认材质
- ActivePViewport 指定图形