<?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 Delete Invisible and empty attribute by selection window in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999664#M84683</link>
    <description>&lt;P&gt;Hi, I'm newbie in lisp programming. so I need a little help in this lisp routine which can delete invisible attribute by selecting blocks manually on screen . so I want it to be selected automatically&amp;nbsp;by window selection set&amp;nbsp;ex ( 0.0 5.5)&lt;/P&gt;&lt;P&gt;and also to delete any visible empty attribute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Sep 2019 00:34:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-01T00:34:23Z</dc:date>
    <item>
      <title>Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999664#M84683</link>
      <description>&lt;P&gt;Hi, I'm newbie in lisp programming. so I need a little help in this lisp routine which can delete invisible attribute by selecting blocks manually on screen . so I want it to be selected automatically&amp;nbsp;by window selection set&amp;nbsp;ex ( 0.0 5.5)&lt;/P&gt;&lt;P&gt;and also to delete any visible empty attribute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 00:34:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999664#M84683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-01T00:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999690#M84684</link>
      <description>Will it always be a window from 0,0 to 5,5?</description>
      <pubDate>Sun, 01 Sep 2019 01:32:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999690#M84684</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-09-01T01:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999691#M84685</link>
      <description>&lt;P&gt;This is just example , but the exact coordination is (27.2 60.0 0.0) '(634.5 405.0 0.0).&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 01:36:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999691#M84685</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-01T01:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999963#M84686</link>
      <description>&lt;P&gt;Using the given information this should work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:DIA nil (c:DeleteInvisibleAttributes))

(defun c:DeleteInvisibleAttributes ( / ss ) (vl-load-com)
  ;; Example by Lee Mac 2010 - www.lee-mac.com
  (if (ssget "_W" '(27.2 60.0) '(634.5 405.0) '((0 . "INSERT") (66 . 1)))
    (progn
      (vlax-for obj
        (setq ss
          (vla-get-ActiveSelectionSet
            (vla-get-ActiveDocument (vlax-get-acad-object))
          )
        )
        (mapcar
          (function
            (lambda ( attrib )
              (if (eq :vlax-true (vla-get-Invisible attrib))
                (vla-delete attrib)
              )
            )
          )
          (vlax-invoke obj 'GetAttributes)
        )
      )
      (vla-delete ss)
    )
  )
  (princ)
)&lt;/PRE&gt;&lt;P&gt;This &lt;A href="http://www.lee-mac.com/ssget.html" target="_blank" rel="noopener"&gt;Website&lt;/A&gt; is an excellent resource for all things selection set related, as well as Autolisp in general.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999963#M84686</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-09-01T14:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999986#M84687</link>
      <description>&lt;P&gt;Thanks a lot , yes it's working as I want except that it not deleting the empty visible attributes. but that's ok&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 14:56:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/8999986#M84687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-01T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Invisible and empty attribute by selection window</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/9000240#M84688</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; My apologies. I missed the empty bit. Try this version, but be aware that the text string must be truly empty (strlen = 0). If the attribute text string contains spaces it won't be deleted. Would you like this added as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:DIA nil (c:DeleteInvisibleAttributes))

(defun c:DeleteInvisibleAttributes ( / ss ) (vl-load-com)
  ;; Example by Lee Mac 2010 - www.lee-mac.com
  (if (ssget "_W" '(27.2 60.0) '(634.5 405.0) '((0 . "INSERT") (66 . 1)))
    (progn
      (vlax-for obj
        (setq ss (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object))))
        (mapcar
          (function
            (lambda ( attrib )
              (if (or (eq :vlax-true (vla-get-Invisible attrib)) (= (strlen (vla-get-textstring attrib)) 0))
                (vla-delete attrib)
              )
            )
          )
          (vlax-invoke obj 'GetAttributes)
        )
      )
      (vla-delete ss)
    )
  )
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Sep 2019 21:32:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/delete-invisible-and-empty-attribute-by-selection-window/m-p/9000240#M84688</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-09-01T21:32:14Z</dc:date>
    </item>
  </channel>
</rss>

