- (defun c:gg()
- (setq obj(vlax-ename->vla-object(car(entsel "\n点击要打印的外框:"))))(or obj(quit))
- (vla-getboundingbox obj 'minp 'maxp)
- (setq p1(vlax-safearray->list minp))
- (setq p9(vlax-safearray->list maxp))
- (setq desktop(strcat(vla-item(vlax-get(vlax-create-object "WScript.Shell" )'SpecialFolders)"Desktop")"\\PDF图纸"));---获取桌面位置
- (if(>(-(car p9)(car p1))(-(cadr p9)(cadr p1)));---如果宽度大于高度,横向打印,否则纵向打印
- (setq fx "l")
- (setq fx "p")
- )
- (setvar "CMDECHO" 0)
- (command "-plot" "y" "模型" "DWG To PDF.pc3" "ISO full bleed 4A0 (1682.00 x 2378.00 毫米)" "m" fx "n" "w" "non" p1 "non" p9 "f" "c" "y" "" "y" "a" desktop "n" "y")
- (setvar "CMDECHO" 1)
- (princ)
- )
请问这段里面的command命令,如何改成其他方式编写?比如vla函数。
|