;;这是文件目录;;D:\工作目录-xuhb\2022年项目\2022.09.15XXXXX办公\1_Current_工作进程图纸\01.CAD\01.平面图
(defun c:pdf (/ s a ab ac)
(setq a (getvar "dwgprefix")) ;_取得当前文档路径
(setq ab "01.CAD")
(setq ac "04.PDF")
(setq nPos(vl-string-search ab a))
(setq XPath (strcat (substr a 1 nPos) ac));保留前面
(vl-load-com)
(setq s (vlax-create-object "shell.application"))
(vlax-invoke s 'open XPath)
(vlax-release-object s)
(prinC "打开项目PDF文件夹")
(princ))