TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 2024-8-31 15:58 |
---|
签到天数: 89 天 [LV.6]常住居民II
管理员
- 积分
- 3366
|
[code];;用lisp访问判断网上的一个文件是否存在 ;;用法: (remotefilep "http://www.baidu.com/img/slogo.gif")
;;--------------------------------------------------
(defun remotefilep(fileURL / DestFile utility found)
(setq utility (vla-get-utility (vla-get-activedocument (vlax-get-acad-object))))
(setq found nil)
(if (= (vl-catch-all-apply 'vla-getremotefile
(list utility fileURL 'DestFile :vlax-true)) nil)
(progn
(if (> (vl-file-size DestFile) 0) (setq found T))
(vl-file-delete Destfile)
)
)
(if found T nil)
)[/code] |
|