Layer Lock Toggle: Updated Code Shared in Comments

Поделиться
HTML-код
  • Опубликовано: 3 ноя 2024

Комментарии • 1

  • @randomCADstuff
    @randomCADstuff  8 месяцев назад

    (defun C:LL ( / layer fade)
    (setq layer (vla-item (vla-get-layers (vla-get-activeDocument (vlax-get-acad-object))) (vla-get-layer (vlax-ename->vla-object (car (entsel))))))
    (if (= (vla-get-lock layer) :vlax-false)
    (progn
    (vla-put-lock layer :vlax-true)
    )
    (progn
    (vla-put-lock layer :vlax-false)
    )
    )
    (setq fade (getvar 'LAYLOCKFADECTL))
    (setvar 'LAYLOCKFADECTL 90)
    (setvar 'LAYLOCKFADECTL fade)
    (command "regen")
    ) ; end defun ____________________________________________________