使用li删除添加的路径
请查看随附的屏幕截图。我需要使用lisp删除引用路径。我使用了lisp,因为它将附加参考路径,并将参考路径中的所有dwg插入到一个文件dwg中。
我想要一个lisp,需要添加参考路径并插入路径中的所有图形,另存为文件夹名称,然后删除参考路径
尝试此代码-
(defun RemoveDevPath (DevPaths / IAcadPreferencesFiles pathsString DevPaths)
(vl-load-com)
(setq IAcadPreferencesFiles
(vla-get-files
(vla-get-preferences (vlax-get-acad-object))
)
pathsString
(vla-get-supportpath IAcadPreferencesFiles)
)
(foreach path DevPaths
(setq pathsString (vl-string-subst "" path pathsString))
)
(vla-put-supportpath IAcadPreferencesFiles pathsString)
(princ)
) 如何将上述例程附加到此lisp中
(defun c:iab () (c:insertalldirectory))
(defun c:insertalldirectory (/ DirPath filens)
(setq DirPath (acet-ui-pickdir))
(VL-LOAD-COM)
(SETQ ACADOBJ (VLAX-GET-ACAD-OBJECT))
(SETQ FILES (VLA-GET-FILES (VLA-GET-PREFERENCES ACADOBJ)))
(SETQ OLDSUPPORT (VLA-GET-SUPPORTPATH FILES))
(SETQ NEWPATH (STRCAT OLDSUPPORT ";" DirPath ";"))
(VLA-PUT-SUPPORTPATH FILES NEWPATH)
(setq filens (vl-directory-files DirPath "*.dwg"))
(foreach file filens
(command "-INSERT" file '(0 0 0) "" "" "")
)
(command "Zoom" "e" "")
(setvar "qaflags" 1)
(command "explode" "all" "")
(setvar "qaflags" 0)
(command "_.saveas" "" DirPath (getvar 'dwgprefix) "dwg" 1))
(command "filedia" "1")
(command "cmddia" "1")
(princ) 请阅读代码发布指南并编辑您的帖子,将代码包含在代码标签中。 您需要一个来封装代码(
2。
你错过了最后的。
3
页:
[1]