本帖最后由 1993063 于 2014-9-6 00:31 编辑
liuhaixin88 发表于 2014-9-5 14:31
谢谢!这个只是没有就加载, 能不能做到,已经存在的,就重载 ?
重载意义不大- ;;;(loadltname "CENTER")
- ;;;(loadltname '("CENTER" "DASHDOT" "DASHED" "DIVIDE" "HIDDEN"))
- (defun loadltname ( lt / cm s1 )
- (setq cm (getvar 'CMDECHO))
- (Cond
- ((= (type lt) 'str)
- (if (not (tblsearch "LTYPE" lt))
- (vla-load (vla-get-Linetypes (vla-get-ActiveDocument (vlax-get-acad-object))) lt "acadiso.lin")
- (progn (setvar 'CMDECHO 0)(vl-cmdf "-linetype" "load" lt (findfile "acadiso.lin") "Y" "")(setvar 'CMDECHO cm))
- )
- )
- ((= (type lt) 'list)(foreach s1 lt (loadltname s1)))
- ) t
- )
|