- UID
- 19072
- 积分
- 570
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-12-6
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
准备用2007了,可是ET还是英文的,晓东工具箱还是安装不上的
找了好几天了,也没找到ET的汉化文件,晓东工具箱我按2006的载入方法加载,可是没一个命令可以用,
1,★哪位有2007ET汉化文件或汉化方法,麻烦帮帮忙
2,★晓东工具箱其实我最常用的命令就是“命令:XDTB_LayerIso选层保留(孤立),其他层锁定变灰色,支持多选”和“命令:XDTB_LayerRes恢复选层保留到原来状态”,我找到这个LSP文件,直接AP加载也不行,我把晓东的原始LSP贴上来,哪位帮忙看看,是怎么回事?还是要改改?
这里作揖了,谢谢、谢谢
柔柔如果路过,请帮忙看看,谢了*-*1 *-*1
晓东的原始LSP:
;| "XDTB_LayerMatch" "XDTB_LayerCopy" "XDTB_LayerDel" "XDTB_LayerMerge"
"XDTB_LayerIso" "XDTB_LayerRes" "XDTB_LayerCur"
"layres" "layoff" "lay_set_cur" "laychg"
|;
($xdrx_load '("xdlsp.lsp" "laywalk.arx"))
(defun #push_lay (lyr)
(if (member lyr #lyr_l)
(prompt "\n已经选取了改层,请继续...")
(progn
(setq #lyr_l (cons lyr #lyr_l))
(redraw e 3)
)
)
)
(defun c:xlayres (/ e #lyr_l n)
(while (setq e (car (entsel "\n请选取要保留图层上的实体<退出>:")))
(xdrx_setenttodb e)
(#push_lay (xdrx_getentdxf 8))
)
(if #lyr_l
(progn
(xdrx_begin '("expert" 1
"cmdecho" 0
)
)
(command ".layer" "of" "*")
(foreach n #lyr_l
(command "on" n)
)
(command "")
(xdrx_end)
)
)
(princ)
)
(defun c:xlayoff (/ e #lyr_l n)
(while (setq e (car (entsel "\r请选取要关闭图层上的实体<退出>:")))
(xdrx_setenttodb e)
(#push_lay (xdrx_getentdxf 8))
)
(if #lyr_l
(progn
(xdrx_begin)
(xdrx_sysvar_push "expert" "cmdecho")
(setvar "expert" 1)
(setvar "cmdecho" 0)
(command ".layer")
(foreach n #lyr_l
(command "of" n)
)
(command "")
(xdrx_sysvar_pop)
(xdrx_end)
)
)
(princ)
)
;;设当前图层
(defun c:lay_set_cur (/ e str)
(if (or (setq e (xdrx_entsel "\n选择设要为当前层的实体(回车输入): "))
(/= "" (setq e (getstring "\n输入层名: ")))
)
(progn
(if (= 'LIST (type e))
(setq e (xdrx_getentdxf 8))
)
(setvar "clayer" e)
)
)
)
(defun c:xlaychg (/ ss key num num0 n e)
(defun #chg_color (e cnum0 cnum / tf e blkna)
(xdrx_setenttodb e)
(setq tf (xdrx_getentdxf 0))
(cond
((or
(= tf "INSERT")
(= tf "DIMENSION")
)
(setq blkna (xdrx_getentdxf 2))
(setq blkna (tblsearch "block" blkna))
(setq e (cdr (assoc -2 blkna)))
(while e
(xdrx_setenttodb e)
(setq tf (xdrx_getentdxf 0))
(if (or
(= tf "INSERT")
(= tf "DIMENSION")
)
(progn
(#chg_color e cnum0 cnum)
)
(progn
(xdrx_setenttodb e)
(xdrx_modent cnum0 cnum 62 0)
)
)
(setq e (entnext e))
)
)
(t
(xdrx_modent cnum0 cnum 62 0)
)
)
)
(if (or (setq num (xdrx_entsel "\n指定图层实体(回车输入): "))
(/= "" (setq num (getstring "\n输入层名: ")))
)
(progn
(if (= 'LIST (type num))
(setq num (xdrx_getentdxf 8))
)
(xdrx_begin)
(prompt "\n请选取要变层的实体<全选>:")
(if (not (setq ss (ssget)))
(setq ss (ssget "x"))
)
(setq n 0)
(xdrx_setsstodb ss 0)
(xdrx_pbarbegin "已经完成:" (sslength ss))
(while (setq e (xdrx_getentdata 0))
(xdrx_pbarsetpos n)
(setq n (1+ n))
(#chg_color e 8 num)
(entupd e)
)
)
)
(xdrx_pbarend)
(xdrx_end)
(princ)
)
(defun c:draworder_by_layer (/ e tf)
(if (or
(setq
e (xdrx_entsel "\n请点取一个要置顶的图层上的实体<输入层名>:")
)
(/= "" (setq e (getstring "\n请输入要置顶的层名<退出>:")))
)
(progn
(setq tf (type e))
(if (= 'LIST tf)
(setq e (xdrx_getentdxf 8))
)
(if (xdrx_draworder->top (ssget "x" (list (cons 8 e))))
(prompt (strcat "\n已经成功将图层 " e " 上的实体置顶..."))
)
)
)
(xdrx_object_regen)
(princ)
)
;|
命令:XDTB_LayerIso
功能:选层保留(孤立),其他层锁定变灰色,支持多选
|;
(defun c:XDTB_LayerIso (/ e lyr lyrl clr el sLyrl n)
(xdrx_begin)
(while (setq e (xdrx_entsel "\n拾取要保留图层上的实体<结束>:"))
(setq lyr (xdrx_getentdxf 8))
(if (not (member lyr lyrl))
(progn
(setq lyrl (cons lyr lyrl))
(redraw (car e) 3)
(setq el (cons (car e) el))
(xdrx_Pickset_Redraw (ssget "x" (list (cons 8 lyr))))
(prompt (strcat "\n选中了\"" (setq sLyrl (xdrx_String_Join
(reverse lyrl)
","
)
)
"\"层!"
)
)
)
)
)
(if lyrl
(progn
(xdrx_object_get "layer")
(while (setq e (xdrx_object_next))
(if (not (wcmatch (car e) sLyrl))
(progn
(if (not (xdrx_getxdata (last e) "XDTB_LYR_COLOR"))
(progn
(xdrx_setxdata (last e) "XDTB_LYR_COLOR"
(xdrx_getentdxf 62) (xdrx_getentdxf 70)
)
(xdrx_modent 62 251 70 4)
)
)
)
(progn
(if (setq clr (xdrx_getxdata (last e) "XDTB_LYR_COLOR"))
(progn
(xdrx_modent 62 (car clr) 70 (cadr clr))
(xdrx_object_removexdata (last e) "XDTB_LYR_COLOR")
)
)
)
)
)
(foreach n el
(redraw n 4)
)
(xdrx_Pickset_Redraw (ssget "x" (list (cons 8 sLyrl))) t)
)
)
(xdrx_end)
(princ)
)
;|
命令:XDTB_LayerRes
恢复选层保留到原来状态
|;
(defun c:XDTB_LayerRes (/ e clr)
(xdrx_object_get "layer")
(while (setq e (xdrx_object_next))
(setq e (cadr e))
(if (setq clr (xdrx_getxdata e "XDTB_LYR_COLOR"))
(progn
(xdrx_modent 62 (car clr) 70 (cadr clr))
(xdrx_object_removexdata e "XDTB_LYR_COLOR")
)
)
)
(princ)
)
;|
命令:XDTB_LayerDel
功能:删除一个层(包括层上的所有实体)
|;
(defun c:XDTB_LayerDel (/ el lyrl lyr e1 tf e sLyrl n clayer)
(xdrx_begin)
(setq clayer (getvar "clayer"))
(while (setq e (xdrx_entsel "\r拾取要删除图层上的实体<结束>:"))
(setq lyr (xdrx_getentdxf 8)
e1 (xdrx_object_get "layer" lyr)
tf (xdrx_getentdxf 70)
)
(cond
((= lyr "0")
(prompt "\n不能删除\"0\"层!\n")
)
((= clayer lyr)
(prompt "\n不能删除当前层!\n")
)
((= "DEFPOINTS" (strcase lyr))
(prompt "\n不能删除尺寸定义点图层!\n")
)
((= 16 (logand 16 tf))
(prompt "\n不能删除外部引用图层!\n")
)
(t
(setq lyrl (cons lyr lyrl))
(setq el (cons e1 el))
(xdrx_modent 62 (- (xdrx_getentdxf 62)))
)
)
)
(if (and
lyrl
(= 1 (xdrx_yesorno "\n确定是否执行删除图层操作" 0))
)
(progn
(setq sLyrl (xdrx_String_Join lyrl ","))
(command "._erase" (ssget "x" (list (cons 8 sLyrl))) "")
(setq lxd el)
(foreach n el
(if (not (xdrx_object_hasreferences n))
(xdrx_object_delete n)
)
)
(prompt (strcat "\n成功删除了\"" sLyrl "\"图层!"))
)
(progn
(foreach n el
(xdrx_setenttodb n)
(xdrx_modent 62 (- (xdrx_getentdxf 62)))
)
)
)
(xdrx_end)
(princ)
)
;|
命令:XDTB_LayerMerge
功能:图层合并,合并到目标层后将删除原来图层
|;
(defun c:XDTB_LayerMerge (/ e lyr e1 lyrl)
(xdrx_begin)
(setq clayer (getvar "clayer"))
(while (setq e (xdrx_entsel "\r拾取要合并图层上的实体<结束>:"))
(setq lyr (xdrx_getentdxf 8)
e1 (xdrx_object_get "layer" lyr)
tf (xdrx_getentdxf 70)
)
(if (not (member lyr lyrl))
(cond
((= lyr "0")
(prompt "\n不能合并\"0\"层!\n")
)
((= clayer lyr)
(prompt "\n不能合并当前层!\n")
)
((= "DEFPOINTS" (strcase lyr))
(prompt "\n不能合并尺寸定义点图层!\n")
)
((= 16 (logand 16 tf))
(prompt "\n不能合并外部引用图层!\n")
)
(t
(setq lyrl (cons lyr lyrl))
(prompt (strcat "\n选中了图层:\"" (setq sLyrl
(xdrx_String_Join
(reverse lyrl)
","
)
)
"\"\n"
)
)
(setq el (cons e1 el))
(xdrx_Pickset_Redraw (ssget "x" (list (cons 8 lyr))))
)
)
)
)
(if (and
lyrl
(setq sLyrl (xdrx_String_Join lyrl ",")
ss (ssget "x" (list (cons 8 sLyrl)))
)
(setq e1 (xdrx_entsel "\n请拾取目标图层<退出>:"))
(setq lyr (xdrx_getentdxf 8))
(= 1 (xdrx_yesorno "\n合并图层将删除原图层定义,是否继续" 0))
)
(progn
(xdrx_entity_setlayer ss lyr)
(xdrx_PickSet_Redraw ss t)
(foreach n lyrl
(setq e1 (xdrx_object_get "layer" n))
(if (not (xdrx_object_hasreferences e1))
(xdrx_object_delete e1)
)
)
(prompt (strcat "\n成功合并了图层: \"" sLyrl "\" 到目标层 \"" lyr "\""))
)
)
(xdrx_PickSet_Redraw ss t)
(xdrx_end)
(princ)
)
;|
命令:XDTB_LayerCur
功能:转换实体到当前层
|;
(defun c:XDTB_LayerCur (/ cLyr e ss)
(prompt "\n请选取要处理的实体<退出>:")
(if (setq ss (ssget))
(progn
(xdrx_begin)
(setq cLyr (getvar "clayer"))
(xdrx_entity_SetLayer ss cLyr)
(xdrx_end)
(prompt (strcat "\n已经将选取的实体转换到层\"" cLyr "\"(当前层)"))
)
)
(princ)
)
;|
命令:XDTB_LayerMatch
功能:图层匹配,刷子,把选取的实体图层和目标实体匹配。
|;
(defun c:XDTB_LayerMatch (/ $XDTB_LayerMatch_change ss sel lyr)
(defun $XDTB_LayerMatch_change (ss lyr / e)
(xdrx_setsstodb ss 0)
(while (setq e (xdrx_getentdata 0))
(xdrx_modent 8 lyr)
)
)
(if (setq sel (car (xdrx_entsel "\n请选取匹配的目标层的实体<输入>:")))
(setq lyr (xdrx_getentdxf 8))
(progn
(if (= "" (setq lyr (getstring "\n请输入匹配的层名:")))
(progn
(if (= 1 (xdrx_yesorno "\n是否使用当前层" 1))
(progn
(setq lyr (getvar "clayer"))
)
(setq lyr nil)
)
)
)
)
)
(if (and
lyr
(progn
(prompt "\n请选取要改变的实体<退出>:")
(setq ss (ssget))
)
)
(progn
;| ($XDTB_LayerMatch_change ss lyr)|;
(xdrx_begin)
(xdrx_entity_SetLayer ss lyr)
(xdrx_end)
(prompt (strcat "\n已经将选取的" (itoa (sslength ss))
"个实体图层匹配到\"" lyr "\"层!"
)
)
)
)
(princ)
)
;|
命令:XDTB_LayerCopy
功能:转换图层
该工具可以把一个层上的所有实体转移到另外一个层上,如果选输入层名,目标图层不存在新建。
|;
(defun c:XDTB_LayerCopy (/ ss sLyr dLyr e)
(if (xdrx_entsel "\n请选取要处理的一个层上的实体<退出>:")
(progn
(setq sLyr (xdrx_getentdxf 8))
(xdrx_begin)
(setq ss (ssget "x" (list (cons 8 sLyr))))
(xdrx_Pickset_redraw ss)
(if (xdrx_entsel "\n请选取目标图层上的实体<输入>:")
(setq dLyr (xdrx_getentdxf 8))
(progn
(if (= "" (setq dLyr (getstring "\n请输入目标层名:")))
(if (= 1 (xdrx_yesorno "\n是否使用当前层" 1))
(setq dLyr (getvar "clayer"))
(setq dLyr nil)
)
)
)
)
(if dLyr
(progn
(xdrx_entity_setlayer ss dLyr)
(prompt (strcat "\n已经成功的将图层\"" sLyr
"\"上的所有实体转换到图层\"" dLyr "\""
)
)
)
)
(xdrx_Pickset_redraw ss t)
(xdrx_end)
)
)
(princ)
)
;|
所有层开
|;
(defun c:XDTB_LayerOn()
(xdrx_sysvar_push "cmdecho")
(setvar "cmdecho" 0)
(command "_layer" "on" "*" "")
(xdrx_sysvar_pop)
(princ)
)
;|
2003年3月8日新增
|;
;|
命令:XDTB_LayerLock
功能:选层保留(孤立),其他层锁定变灰色,支持多选
|;
(defun c:XDTB_LayerLock (/ e lyr lyrl clr el sLyrl n)
(xdrx_begin)
(while (setq e (xdrx_entsel "\n拾取要锁定图层上的实体<结束>:"))
(setq lyr (xdrx_getentdxf 8))
(if (not (member lyr lyrl))
(progn
(setq lyrl (cons lyr lyrl))
(redraw (car e) 3)
(setq el (cons (car e) el))
(xdrx_Pickset_Redraw (ssget "x" (list (cons 8 lyr))))
(prompt (strcat "\n选中了\"" (setq sLyrl (xdrx_String_Join
(reverse lyrl)
","
)
)
"\"层!"
)
)
)
)
)
(if lyrl
(progn
(xdrx_Pickset_Redraw (ssget "x" (list (cons 8 sLyrl))) t)
(xdrx_object_get "layer")
(while (setq e (xdrx_object_next))
(if (wcmatch (car e) sLyrl)
(progn
(if (not (xdrx_getxdata (last e) "XDTB_LYR_COLOR"))
(progn
(xdrx_setxdata (last e) "XDTB_LYR_COLOR"
(xdrx_getentdxf 62) (xdrx_getentdxf 70)
)
(xdrx_modent 62 251 70 4)
)
)
)
(progn
(if (setq clr (xdrx_getxdata (last e) "XDTB_LYR_COLOR"))
(progn
(xdrx_modent 62 (car clr) 70 (cadr clr))
(xdrx_object_removexdata (last e) "XDTB_LYR_COLOR")
)
)
)
)
)
)
)
(xdrx_end)
(princ)
) |
|