9701519 发表于 2015-3-23 21:54:28

怎么实现框选将区域覆盖后置!

怎么实现框选将区域覆盖后置!

9701519 发表于 2015-3-31 17:02:13

谁帮忙改改以下是填充后置(帮忙改成区域覆盖后置)
;;;===============================================================================================================================================
;;;填充后置
;;;===============================================================================================================================================
;;一键所有填充对象置后显示,CAD2005以上版本适用 By Gu_xl 2014.07.17
(defun c:bh (/ sortents dictlst Doc)
(setqdoc
   (vla-get-ActiveDocument
   (vlax-get-acad-object)
   )
)
(vlax-for blockdef (vla-get-blocks doc)
    (cond
      (
       (not
   (VL-CATCH-ALL-ERROR-P
   (setq sortents
      (VL-CATCH-ALL-APPLY
      'vla-item
      (list
          (setq dict
         (vla-GetExtensionDictionary
             blockdef
         )
          )
          "ACAD_SORTENTS"
      )
      )
   )
   )
       )
      )
      ((setq sortents
      (VL-CATCH-ALL-APPLY
    'vla-AddObject
    (list dict "ACAD_SORTENTS" "AcDbSortentsTable")
      )
       )
      )
    )
    (setq lst nil)
    (vlax-for obj blockdef
      (if (= "AcDbHatch" (vla-get-objectname obj))
(setq lst (cons obj lst))
      )
    )
    (iflst
      (progn
(vla-MoveToBottom
    sortents
    (vlax-make-variant
      (vlax-safearray-fill
      (vlax-make-safearray
    vlax-vbobject
    (cons 0 (1- (length lst)))
      )
      lst
      )
    )
)

      )
    )
)
(vla-regen doc :vlax-true)
(princ)
)

Gu_xl 发表于 2015-3-24 10:14:39

(defun c:tt ()

(if (and
        (setq p1 (getpoint "\n第一点:"))
        (setq p2 (getcorner p1 "\n对角点:"))
        (setq ss (ssget "c" p1 p2))
      )
    (progn
      (command "rectang" p1 p2)
      (setq e (entlast))
      (command "wipeout" "p" e "y")
      (command "draworder" ss "" "a" (entlast) "")
    )
)
(princ)
)

9701519 发表于 2015-3-24 11:48:25

GU 老板!是框选里面区域覆盖置后,不是新作区域覆盖置后。

9701519 发表于 2015-3-24 11:48:59

Gu_xl 发表于 2015-3-24 10:14 static/image/common/back.gif
(defun c:tt ()

(if (and



GU 老板!是框选里面区域覆盖置后,不是新作区域覆盖置后。
页: [1]
查看完整版本: 怎么实现框选将区域覆盖后置!