生成指定图层是否正在使用的数据。 支持的平台:仅窗口 返回值(RetVal)无返回值。 言论没有额外的评论。 例子工 务 局: Sub Example_GenerateUsageData() ' This example provides usage information for the layers ' in a drawing Dim MyLayers As AcadLayers Set MyLayers = ThisDrawing.Layers MyLayers.GenerateUsageData Dim MyLayerObj As AcadLayer For Each MyLayerObj In ThisDrawing.Layers MyLayerObj.Description = "Test" MsgBox (MyLayerObj.Used) Next MyLayerObj End Sub Visual LISP: (vl-load-com) (defun c:Example_GenerateUsageData() ;; This example provides usage information for the layers ;; in a drawing (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq MyLayers (vla-get-Layers doc)) (vla-GenerateUsageData MyLayers) (vlax-for MyLayerObj MyLayers (vla-put-Description MyLayerObj "Test") (alert (strcat "Layer " (vla-get-Name MyLayerObj) (if (= (vla-get-Used MyLayerObj) :vlax-true) " is used." " is not used."))) ) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:50
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.