Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Trying to check for blocks that are not on .25 grid. Having trouble with wild card. What am I doing wrong?
(defun c:ShowOffGrid (/ blkss idx blkent blkvx blkloc)
(setq blkss(ssget "X" '((0 . "INSERT"))))
(repeat (setq idx (sslength blkss))
(setq blkent (ssname blkss (setq idx (1- idx)))
blkvx (vlax-ename->vla-object blkent)
blkloc (vlax-safearray->list (vlax-variant-value(vlax-get-property blkvx 'insertionPoint)))
)
(cond
((not(wcmatch (rtos (car blkloc) 2) "*.0, *`.25, *`.5, *`.75" ))
(ssdel blkent blkss)
)
((not(wcmatch (rtos (cadr blkloc) 2) "*`.0, *`.25, *`.5, *`.75" ))
(ssdel blkent blkss)
)
)
)
(sssetfirst nil blkss)
(princ)
)
(princ "\n----------ShowOffGrid Loaded---------")
(princ)
Solved! Go to Solution.