CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

清除所有方法 (ActiveX)

2023-1-4 04:57| 发布者: admin| 查看: 636| 评论: 0|来自: AutoCAD

摘要: 从文档中删除未使用的命名引用,例如未使用的块或图层。

从文档中删除未使用的命名引用,例如未使用的块或图层。

支持的平台:仅窗口

签名

工 务 局:

object.PurgeAll
对象

类型:文档

此方法适用的对象。

返回值(RetVal)

无返回值。

言论

此方法等效于在命令提示符下输入清除,选择“全部”选项,然后在“清除所有内容?”提示下选择“是”。

已删除的对象将保留在文档中,直到使用此方法清除它们。

例子

工 务 局:

Sub Example_PurgeAll()
    ' This example removes all unused named references from the database
    
    ThisDrawing.PurgeAll
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PurgeAll()
    ;; This example removes all unused named references from the database
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (vla-PurgeAll doc)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-12 04:39

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部