马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - ;; Unlock locked layers.
- ;; Argument: document object.
- ;; Returns a list of layer objects which were locked,
- ;; or nil if none are locked.
- ;; Typically the function filters out xref layers,
- ;; but not in this case.
- (defun MD:UnlockLayers (doc / laylst)
- (vlax-for x (vla-get-Layers doc)
- (if (eq :vlax-true (vla-get-lock x))
- (progn
- (setq laylst (cons x laylst))
- (vla-put-lock x :vlax-false)
- )
- )
- )
- laylst
- ) ;end
- ;; Argument: a list of layer objects from UnlockLayers above.
- ;; Use vl-catch-all-apply in case a locked
- ;; layer was deleted in the calling function.
- (defun MD:RelockLayers (lst)
- (foreach x lst
- (vl-catch-all-apply 'vla-put-lock (list x :vlax-true))
- )
- ) ;end
|