- 积分
- 12459
- 明经币
- 个
- 注册时间
- 2003-5-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-11-7 08:12:00
|
显示全部楼层
; 1. tblobjname : 返回指定的符号表中元素(记录)实体名,这些符号表包括 ; "LAYER", "LTYPE", "VIEW", "STYLE", "BLOCK", "UCS", "APPID", "DIMSTYLE", 和 "VPORT".
(tblobjname "layer" "0") ;返回0层的实体名, 如:
(setq en (tblobjname "layer" "0")) (entget en)
((-1 . <Entity name: 7ef52c80>) (0 . "LAYER") (330 . <Entity name: 7ef52c10>) (5 . "10") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (2 . "0") (70 . 0) (62 . 7) (6 . "Continuous") (290 . 1) (370 . -3) (390 . <Entity name: 7ef52c78>))
; 2. tblnext : 在一个符号表中寻找下一个元素(一条记录) ; 假设我当前有图层 "0", "Layer1", "Layer2", "Layer3", "Layer4"
Command: (tblnext "layer" T) ; T表示从第一个入口开始 ((0 . "LAYER") (2 . "0") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer1") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer2") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer3") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer4") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") nil
; 3. tblsearch : 在符号表中搜索一条指定的记录
(tblsearch "layer" "Layer2" T) ; T 为tblnext函数指定了它从符号表的哪个入口开始
Command: (tblsearch "layer" "layer2" t) ((0 . "LAYER") (2 . "Layer2") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer3") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") ((0 . "LAYER") (2 . "Layer4") (70 . 0) (62 . 7) (6 . "Continuous"))
Command: (tblnext "layer") nil |
|