Code Red > AutoLISP (Vanilla / Visual)

Check if clip is present in the drawing

(1/1)

w64bit:
How I can check if a drawing contains clip?
ssget can help? If yes, someone knows if there is a group code for clip?

It's Alive!:
in the whole drawing? it's a Spatial Filter right?

this is python, maybe it can give a hint


--- Code - Python: ---import tracebackfrom pyrx_imp import Rx, Ge, Db, Ap, Ed def PyRxCmd_doit() -> None:    try:        db = Db.curDb()        print(len(db.objectIds(Db.SpatialFilter.desc())))    except Exception as err:        traceback.print_exception(err) 

It's Alive!:
I found this
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/groupcode-for-an-xclip-or-how-to-access-it/m-p/856189

xdcad:
CLIP information is stored in the extended dictionary of the AcDbBlockReference (INSERT) object,

The Inspector tool can view



You can traverse all INSERTs to determine whether there is ACAD_FILTER



--- Code - Auto/Visual Lisp: ---(defun XD::Doc:HasFILTER (/ SS i bFound dict)  (if (setq ss (ssget "x" '((0 . "Insert"))))    (progn      (setq i -1            bFound t      )      (while (and bFound (setq e (ssname ss (setq i (1+ i)))))        (setq ed (entget e))        (if (and (setq dict (cdr (assoc 360 ed)))                 (= (cdr (assoc 3 (entget dict))) "ACAD_FILTER")            )          (setq bFound nil)        )      )      (not bFound)    )  ))

w64bit:
Thank you.
Is it possible, please, to add an alert when xclips are found?

Navigation

[0] Message Index

Go to full version