CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoLISP 开发指南

acet-layerp-mark(AutoLISP)

2023-1-5 23:03| 发布者: admin| 查看: 402| 评论: 0|来自: AutoCAD

摘要: 放置图层上一个记录的开始标记和结束标记

放置图层上一个记录的开始标记和结束标记

支持的平台:视窗和 Mac OS

签名

(acet-layerp-mark [status])
地位

类型:T 或零

T -- 设置开始标记

nil-- 设置结束标记,清除开始标记

返回值

类型:T 或零

T如果开始标记有效;否则。nil

如果省略状态,则返回图层设置的当前标记状态acet-layerp-mark

言论

该函数允许您将多个图层命令分组到单个事务中,以便可以通过发出一次 AutoCAD LAYERP 命令来撤消这些命令。LAYERPMODE 设置必须为 On 才能设置标记。acet-layerp-mark

例子

以下代码将图层 0 更改为蓝色,然后在一组开始标记和结束标记之间进行一些额外的图层更改。如果在运行此代码后发出 AutoCAD LAYERP 命令,则图层 0 将恢复为蓝色。

(defun TestLayerP ()
  ;; Turn LAYERPMODE on, if it is not already
  (if (not (acet-layerp-mode))
    (acet-layerp-mode T)
  )

  ;; Set layer 0 to the color blue
  (command "._layer" "_color" "blue" "0" "")

  ;; Set a begin mark
  (acet-layerp-mark T)

  ;; Issue a series of layer commands, and then set an end mark
  (command "._layer" "_color" "green" "0" "")
  (command "._layer" "_thaw" "*" "")
  (command "._layer" "_unlock" "*" "")
  (command "._layer" "_ltype" "hidden" "0" "")
  (command "._layer" "_color" "red" "0" "")

  ;; Set an end mark
  (acet-layerp-mark nil)
 (princ)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 14:28

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部