渠辉 发表于 2021-12-4 08:17:03

MJ:export 函数的具体用法

(defun MJ:Export (fileName Extension SelectonSet)
(vla-export
    (vla-get-ActiveDocument (vlax-get-acad-object))
    fileName
    Extension
    SelectonSet
)
)

渠辉 发表于 2022-6-18 13:39:02

defun MJ:export (ss SaveName / s)
(defun MJ:enbox (en)
    (vla-getboundingbox (vlax-ename->vla-object en) 'll 'ur)
    (mapcar 'vlax-safearray->list (list ll ur))
)
(defun MJ:SS2en (ss)
    (vl-remove-if-not
      '(lambda (x) (= (type x) 'ename))
      (apply 'append (ssnamex ss))
    )
)
(defun MJ:Extents (plist)
    (list (apply 'mapcar (cons 'min plist))
          (apply 'mapcar (cons 'max plist))
    )
)
(defun MJ:SSbox (ss / extents ss2en enbox)
    (MJ:extents
      (apply 'append (mapcar 'MJ:enbox (MJ:ss2en ss)))
    )
)
(vl-cmdf "_zoom" (car (setq s (MJ:ssbox ss))) (cadr s))
(command "export" "d:\\1.bmp" "")
)

寒潮大冬瓜 发表于 2024-7-10 08:38:55

很好→很棒!很好~很棒!!很好……很棒!!!
页: [1]
查看完整版本: MJ:export 函数的具体用法