- UID
- 194606
- 积分
- 1321
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-11-19
- 最后登录
- 1970-1-1
|
发表于 2004-12-10 19:21:49
|
显示全部楼层
A Functions
acet-layerp-mark Function
Places beginning and ending marks for Layer Previous recording
(acet-layerp-mark [status])
The acet-layerp-mark function allows you to group multiple layer commands into a single transaction so that they can be undone by issuing LAYERP a single time. LAYERPMODE must be on in order to set marks.
Arguments
status
Specifying T sets a begin mark. Specifying nil sets an end mark, clearing the begin mark.
If status is omitted, acet-layerp-mark returns the current mark status for layer settings.
Return Values
T if a begin mark is in effect; otherwise nil.
Examples
The following code changes layer 0 to blue, and then makes several additional layer changes between a set of begin and end marks. If you issue LAYERP after running this code, layer 0 reverts to blue.
(defun TestLayerP ()
;; Turn LAYERPMODE on, if it isn't 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)
)
See Also
The LAYERP command.
Comments?
LAYERP 命令
概念 操作步骤 参考
放弃对图层设置所做的上一个或一组更改
“图层”工具栏:
命令行: layerp
放弃已对图层设置(例如颜色或线型)做的修改。如果设置被恢复,AutoCAD 将显示“已恢复上一个图层状态”信息。
LAYERP(上一图层)没有放弃以下修改:
重命名图层:如果重命名图层并修改其特性,“上一图层”将恢复初始特性,但不恢复初始名称。
删除的图层:如果删除或清理图层,使用“上一个图层”不能将其恢复。
添加的图层:如果在图形中添加新图层,使用“上一个图层”不能将其删除。 |
|