Vla-get-layers

提供:GizmoLabs - だいたい CAD LISP なサイト
構文
(vla-get-layers vla-object)


機能
画層コレクションのVLAオブジェクトを返す


引数
  • vla-object … VLAオブジェクト


戻り値
画層コレクションのVLAオブジェクト


サンプル
(setq *ActDoc* (vla-get-ActiveDocument (vlax-get-Acad-Object)))

; ダンプ
(vlax-dump-object (vla-get-layers *ActDoc*))
; IAcadLayers: 図面内のすべての画層のコレクション
; プロパティの値:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00000001408091d8>
;   Count (RO) = 7
;   Document (RO) = #<VLA-OBJECT IAcadDocument 000000002bed55b0>
;   Handle (RO) = "2"
;   HasExtensionDictionary (RO) = 0
;   ObjectID (RO) = 43
;   ObjectID32 (RO) = 43
;   ObjectName (RO) = "AcDbLayerTable"
;   OwnerID (RO) = 0
;   OwnerID32 (RO) = 0


(defun layerMap ()
  (vl-load-com)
  (setq theList '())
  (setq *ActDoc* (vla-get-activedocument (vlax-get-acad-object)))
  (setq Lays (vla-get-layers *ActDoc*))
  (vlax-map-collection Lays 'layer-mod)
  (princ)
);defun

(defun layer-mod (Lay)
  (setq dwgName (vlax-get-property Lay 'Name))
  (setq Lst1 (append (list dwgName) Lst1))
  (setq Lst1 (reverse Lst1))
  (vlax-put-property Lay "LayerOn" ':vlax-true)
  (vla-put-color lay 5)
);defun



関連事項