上面的圖片是不正確的.因為我設的長寬比例是300.第第次還是用了未縮放窗口之前的長寬.要這樣才正確 附程序 (Defun C:gg () (SetVar "WMFBKGND" 0) (SetVar "WMFFOREGND" 0) (VL-LOAD-COM) (setq AcadObject(vlax-get-acad-object) ;object AcadDocument(vla-get-ActiveDocument AcadObject) ;Document ) ;(command "_CleanScreenON") ;(command "_commandlinehide") ;(vla-put-WindowState AcadObject acNorm) ;(vla-put-Width AcadObject 300) ;(vla-put-Height AcadObject 300) (vla-put-Width AcadDocument 300) (vla-put-Height AcadDocument 300) (vla-ZoomExtents AcadObject) (command "_zoom" "_E" "") (setq AcadObject(vlax-get-acad-object) ;object AcadDocument(vla-get-ActiveDocument AcadObject) ;Document ) (setq ss (ssget "x")) (vla-Export AcadDocument "c:\\abc" "wmf" (vla-get-ActiveSelectionSet AcadDocument)) (Princ) ) |