dinosaurhxe 发表于 2008-6-8 17:36:00

[求助]调用wblock存盘时怎么确定存盘路径?

<p>试验后发现,这样存盘的路径和我在CAD图形中直接wblock时弹出对话框中的路径是一致的,怎样用LISP来更改这个路径呢?</p><p>我用的是(command "wblock" "filename" "Y" "*"),怎样给它加入我指点的路径信息呢?</p>

Andyhon 发表于 2008-6-8 19:58:00

(command "wblock" "C:\\Dwg\\filename" "Y" "*") ; filename Existed<br/>; or<br/>(command "wblock" "C:\\Dwg\\filename" "*")&nbsp;&nbsp;&nbsp;&nbsp; ; just as a sample

dinosaurhxe 发表于 2008-6-9 09:21:00

So Easy,感谢指点!!
正好用上以前写的一段来获得路径,再strcat就可以了。
(defun getpath (/ nowdwg pathnow)
(setq nowdwg (getvar "dwgname"))
(setq pathnow (findfile nowdwg))
(setq pathnow (substr pathnow 1 (- (strlen pathnow) (strlen nowdwg))))
pathnow
)

Andyhon 发表于 2008-6-9 21:31:00

<p>另法 (strcat (getvar "DwgPrefix") (getvar "DwgName"))</p>

dinosaurhxe 发表于 2008-6-11 15:17:00

楼上的方法好,俺那段path白干了!!
页: [1]
查看完整版本: [求助]调用wblock存盘时怎么确定存盘路径?