Author Topic: [XDrX-PlugIn(107)] Find Dimension objects marked with modified Dim text  (Read 392 times)

0 Members and 1 Guest are viewing this topic.

xdcad

  • Swamp Rat
  • Posts: 527
Code: [Select]
(defun c:xdtb_dimvchk (/ box i key ss x)
  (defun _keyword (key)
    (cond ((= key "D")
   (xdrx-entity-delete
     (ssget "x" '((0 . "solid") (62 . 2) (-3 ("XDRX"))))
   )
  )
    )
  )
  (if (and (xdrx-initget "D")
   (xdrx_initssget "" "D" "" "_keyword" "")
   (setq ss (xdrx-ssget (xdrx-string-multilanguage "\n选取标注对象[删除检查框(D)]<退出>:"
   "\nSelect Dimension object [Delete Check Flag Box (D)]<Exit>:"
)
'((0 . "dimension*"))
    )
   )
      )
    (progn (xdrx-begin)
   (setq i 0)
   (mapcar '(lambda (x)
      (if (and (/= "" (xdrx-getpropertyvalue x "textstring"))
       (setq box (xdrx-getpropertyvalue x "textbox"))
  )
(progn (setq i (1+ i))
       (xdrx-solid-make (car box)
(last box)
(nth 2 box)
(nth 1 box)
       )
       (xdrx-setpropertyvalue (entlast)
      "color"
      2
      "Transparency"
      10
       )
       (xdrx-xdata-set (entlast) "name" "jck")
       (xdrx-draworder->back (entlast))
)
      )
    )
   (xdrx-pickset->ents ss)
   )
   (xdrx-prompt
     (xdrx-string-formatex
       (xdrx-string-multilanguage "\n共发现了%d个标注对象原值被改变."
  "\nA total of %d Dimension objects were found to have their original values changed."
       )
       i
     )
     (if (> i 0)
       (xdrx-string-multilanguage "已经标记,请核查."
  "Already marked, please check."
       )
       ""
     )
   )
   (xdrx-end)
    )
  )
  (princ)
)
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net