时间:2012-04-27 21:01:02 作者:不思议游戏 浏览量:1367
)
)
)
)
(if (=t "Color")
(progn
(initget 1 "Entity Number")
(prompt"n选择实体确定颜色或给出颜色号")
(setq lb (getkword"[Entity\Number]:"))
(if (=lb "Entity")
(progn
(prompt"n选择实体确定所需变化线宽图素的颜色:")
(setq le (ssget))
(setq lp (ssname le 0))
(setq lc (car (car (cdr(cdr (cdr(entget lp)))))))
(if (=lc 62)
(setg 11(cdr(cdr(cdr(cdr(cdr(cdr(entget lp)))))))
)
(if(=1c 66)
(progn
(prompt"n该实体的颜色是随图层确定的(Bylayer)!")
(setq bb 0)
(setq kk(getstring"n终止处理过程?"))
)
)
(if(=lc 6)
(setq ll (cdr(car (cdr(cdr(cdr(cdr(entget lp))))))))
)
)
(if(=lb"Number")
(setq ll(getstring"n给出颜色号:"))
)
)
(setq objl(ssadd))
(setq j 0)
(while(<j(sslength obj))
(setq pl(ssname obj j))
(setq j (+j 1))
(setq pc (cdr(car(cdr (cdr(cdr(entget pl)))))))
(setq lcc(car(car(cdr(cdr(cdr(entget pl)))))))
(if(=lcc 6)
(setq pc (cdr(car(cdr(cdr(cdr(cdr(entget pl))))))))
)
(if(=ll pc)
(ssadd pl obj1)
)
)
)
)
(if(=t"LType")
(progn
(initget 1"Entity Name")
(prompt"n选择实体确定线型或给出线型名")
(setq lb(getkword"[Entity\Name]:"))
(if(=lb "Entity")
(progn
(prompt"n选择线型实体确定所需变化线宽图素的线型:")
(setq le (ssget))
(setq lp(ssname le 0))
(setq lc(car(car(cdr(cdr(cdr(entget lp)))))))
(if(=lc 6)
(setq ll (cdr(car(cdr(cdr(cdr(entget lp)))))))
)
(if(/=lc 6)
(progn
(prompt "n该实体的颜色是随图层确定的(Bylayer)!")
(setq bb 0)
(setq kk (getstring"n终止处理过程?"))
)
)
)
)
(if(=lb "Name")
(progn
(initget 1"Continuous Dashed Center Phantom DIvide Hidden DOt DAshdot Borde
r")
(prompt"给出需要变化的线型名?")
(setq lll(getkword"n[Continuous \Dashed\Center\Phantom\DIvid
e \Hidden\DOt\DAshdot\Border]"))
(setq ll(strcse lll))
)
)
(setq objl(ssadd))
(setq j 0)
(while(<j(sslength obj))
(setq pl (ssname obj j))
(setq j(+j 1))
(setq pc(cdr(car(cdr(cdr(cdr(entget pl)))))))
(if(=ll pc)
(ssadd pl objl)
)
)
)
)
(if(=bb 1)
(progn
(setq cpp (ssadd))
(setq w (getreal"n给定新的线宽值[0.00]:"))
(setq i 0)
(setq ii (sslength obj))
(if(/=t"Select")
(setq ii(sslength objl))
)
(while(<i ii)
(setq p (ssname obj i))
(if(/=t"Select")
(setq p(ssname objl i))
)
(setq py (cdr(car(cdr(cdr(entget p))))))
(setq i(+i l))
(setq objent(cdr(car(cdr(entget p)))))
(setq pp(cdddr(entget p)))
(if(=t"color")
(setq pp(cdr(cdddr(entget p))))
)
(if(=t"LType")
(setq pp(cdr(cdddr(entget p))))