<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WCMATCH *.25 help in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778338#M166114</link>
    <description>&lt;P&gt;even shorter one&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;same as kc's&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 22 Aug 2025 06:39:22 GMT</pubDate>
    <dc:creator>komondormrex</dc:creator>
    <dc:date>2025-08-22T06:39:22Z</dc:date>
    <item>
      <title>WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777843#M166100</link>
      <description>&lt;P&gt;Trying to check for blocks that are not on .25 grid.&amp;nbsp; Having trouble with wild card.&amp;nbsp; What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(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-&amp;gt;vla-object blkent)
                blkloc (vlax-safearray-&amp;gt;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)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 19:36:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777843#M166100</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2025-08-21T19:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777908#M166104</link>
      <description>&lt;LI-CODE lang="general"&gt;(defun c:ShowOffGrid (/ blkss idx blkent blkvx blkloc x y grid)
  (if
    (setq blkss
           (ssget "_X"
                   (list '(0 . "INSERT") (cons 410 (getvar 'ctab)))
            )
    )
     (progn
       (repeat (setq idx (sslength blkss))
         (setq blkent (ssname blkss (setq idx (1- idx))))
         (setq blkvx (vlax-ename-&amp;gt;vla-object blkent))
         (setq blkloc (vlax-get blkvx 'insertionPoint))
         
         (setq x
                (substr
                  (setq x (rtos (car blkloc) 2 2))
                  (+ (vl-string-search "." x)
                     2
                  )
                )
         )         
         (setq y (substr
                   (setq y (rtos (cadr blkloc) 2 2))
                   (+ (vl-string-search
                        "."
                        y
                      )
                      2
                   )
                 )
         )
         (if
           (and
             (wcmatch x (setq grid "00,25,50,75"))
             (wcmatch y grid)
           )
            (ssdel blkent blkss)
         )
       )
       (sssetfirst nil blkss)
     )
     (prompt "\n** Nothing selected ** \n")
  )
  (princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Aug 2025 20:32:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777908#M166104</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2025-08-21T20:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777957#M166105</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1206685"&gt;@BlackBox_&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and my brain was broken when I put the (not (wcmatch in.&amp;nbsp; I even had to look at it a bit now to make sure I understood.&amp;nbsp; I must be more tired then I realize.&amp;nbsp; lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 21:40:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13777957#M166105</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2025-08-21T21:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778001#M166108</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13551532"&gt;@Village_Idiot&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Trying to check for blocks that are not on .25 grid.&amp;nbsp; ,,,.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think there's an easier way to check for that, without involving text strings or wildcards or spelling out all four multiples of 0.25.&amp;nbsp; For any given point [such as a Block's insertion point]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(if&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (and&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; (= &lt;FONT size="4" color="#0000FF"&gt;(rem&lt;/FONT&gt; &lt;EM&gt;&lt;FONT color="#00CCFF"&gt;TheXCoordinate&lt;/FONT&gt;&lt;/EM&gt; 0.25&lt;FONT size="4" color="#0000FF"&gt;)&lt;/FONT&gt; 0)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; (=&amp;nbsp;&lt;FONT size="4" color="#0000FF"&gt;(rem&lt;/FONT&gt; &lt;EM&gt;&lt;FONT color="#00CCFF"&gt;TheYCoordinate&lt;/FONT&gt;&lt;/EM&gt; 0.25&lt;FONT size="4" color="#0000FF"&gt;)&lt;/FONT&gt; 0)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; ); and&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (&lt;FONT color="#008000"&gt;&lt;EM&gt;then -- it's on the grid&lt;/EM&gt;&lt;/FONT&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (&lt;EM&gt;&lt;FONT color="#FF0000"&gt;else -- it's not&lt;/FONT&gt;&lt;/EM&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;); if&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 17:05:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778001#M166108</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-08-22T17:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778338#M166114</link>
      <description>&lt;P&gt;even shorter one&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;same as kc's&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Aug 2025 06:39:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778338#M166114</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-08-22T06:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778637#M166115</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;is correct - I think I got stuck on trying to give OP back something like they started with, so they could see how to do it, that I overlooked this. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13551532"&gt;@Village_Idiot&lt;/a&gt;&amp;nbsp;- here's what that might look like - just be mindful that REM is precise, so *.250000000001 is 'off grid' regardless of your units precision when a selected block displays coordinates in properties pane after selection:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:ShowOffGrid (/ blkss idx blkent pt)
  (if
    (setq blkss
           (ssget "_X"
                   (list '(0 . "INSERT") (cons 410 (getvar 'ctab)))
            )
    )
     (progn
       (repeat (setq idx (sslength blkss))
         (setq blkent (ssname blkss (setq idx (1- idx))))
         (if
           (and
             (=
               (rem (car (setq pt (cdr (assoc 10 (entget blkent))))) 0.25)
                0
             )
             (= (rem (cadr pt) 0.25) 0)
           )
           (ssdel blkent blkss)
         )
       )
       (sssetfirst nil blkss)
     )
     (prompt "\n** Nothing selected ** \n")
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 10:38:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13778637#M166115</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2025-08-22T10:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779188#M166120</link>
      <description>&lt;P&gt;Or, even more concisely, since the&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt; (=)&lt;/STRONG&gt; &lt;/FONT&gt;function can take more than two arguments:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(if&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;=&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="4" color="#0000FF"&gt;(rem&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;TheXCoordinate&lt;/FONT&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0.25&lt;FONT size="4" color="#0000FF"&gt;)&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT size="4" color="#0000FF"&gt;(rem&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;TheYCoordinate&lt;/FONT&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0.25&lt;FONT size="4" color="#0000FF"&gt;)&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (&lt;FONT color="#008000"&gt;&lt;EM&gt;then -- it's on the grid&lt;/EM&gt;&lt;/FONT&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; (&lt;EM&gt;&lt;FONT color="#FF0000"&gt;else -- it's not&lt;/FONT&gt;&lt;/EM&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;); if&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 17:08:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779188#M166120</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-08-22T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779210#M166124</link>
      <description>&lt;P&gt;Thank you all for sharing. "rem" is a new on for me.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 17:37:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779210#M166124</guid>
      <dc:creator>Village_Idiot</dc:creator>
      <dc:date>2025-08-22T17:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: WCMATCH *.25 help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779577#M166139</link>
      <description>&lt;P&gt;The 0.000001 problem maybe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;rem 123.2500000001 0.25)
1.00001784630877e-10&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(equal (REM 123.25000001 0.25) 0.0 1e-06)
T&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 23 Aug 2025 01:56:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-25-help/m-p/13779577#M166139</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-08-23T01:56:17Z</dc:date>
    </item>
  </channel>
</rss>

