<?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: LISP not behaving after user input is changed... in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370279#M131695</link>
    <description>&lt;P&gt;Hi... I quess the autor does not assumed that *all* will be ever written by the user.&amp;nbsp;So one more line can fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;(defun c:atrot  (/ blSet attLst errCount tmp)
  (or atrot:tag (setq atrot:tag ""))
  (setq tmp (getstring (strcat "\nSpecify Tag to be Rotated or '*all*' &amp;lt;"
                               (if (eq "" atrot:tag) "*all*" atrot:tag) "&amp;gt;: ")))
  (or (eq "" tmp) (setq atrot:tag tmp))
  (if (eq "*all*" tmp) (setq atrot:tag ""))
  
  (princ "&amp;lt;&amp;lt;&amp;lt; Select blocks to rotate attributes &amp;gt;&amp;gt;&amp;gt;")
  (setq errCount 0)
  (if
    (setq blSet (ssget '((0 . "INSERT") (66 . 1))))
     (progn
       (setq blSet (mapcar 'vlax-ename-&amp;gt;vla-object
                           (vl-remove-if 'listp
                             (mapcar 'cadr (ssnamex blSet)))))
       (foreach itm  blSet
         (setq attLst
                (vlax-safearray-&amp;gt;list
                  (vlax-variant-value
                    (vla-GetAttributes itm))))
         (foreach att  attLst
           (and (eq (if (eq "" atrot:tag)
                      (vla-get-TagString att) atrot:tag)
                    (vla-get-TagString att))
           (if (vl-catch-all-error-p
                 (vl-catch-all-apply
                   'vla-put-Rotation
                     (list att (angle '(0 0 0) (getvar "UCSXDIR")))))
             (setq errCount (1+ ErrCount)))))))
     (princ "&amp;gt;&amp;gt;&amp;gt; Nothing selected! &amp;lt;&amp;lt;&amp;lt;"))
  (if (/= 0 errCount)
    (princ
      (strcat "\n&amp;gt;&amp;gt;&amp;gt; " (itoa errCount)
              " attributes or blocks were on locked layer! &amp;lt;&amp;lt;&amp;lt; ")))
  (princ))&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
    <pubDate>Tue, 07 Jun 2016 14:14:11 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2016-06-07T14:14:11Z</dc:date>
    <item>
      <title>LISP not behaving after user input is changed...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370126#M131694</link>
      <description>&lt;P&gt;I'm having an irritating time with a simple LISP routine for rotating block attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to rotate all the attributes in a block or individually-selected ones. &amp;nbsp;The attached routine works fine when I first load/use it. &amp;nbsp;The default is set to *all* and all is good. &amp;nbsp;If I change it to one of the tags ("Descriptor"), again, it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...but then if I change the input back to *all*, the routine will NOT cooperate at all, nothing is rotated. &amp;nbsp;I literally have to close the drawing and reload the LISP routine. &amp;nbsp;Why on Earth is this happening? &amp;nbsp;See attached files, thanks in advance for any help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 13:15:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370126#M131694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-07T13:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: LISP not behaving after user input is changed...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370279#M131695</link>
      <description>&lt;P&gt;Hi... I quess the autor does not assumed that *all* will be ever written by the user.&amp;nbsp;So one more line can fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;(defun c:atrot  (/ blSet attLst errCount tmp)
  (or atrot:tag (setq atrot:tag ""))
  (setq tmp (getstring (strcat "\nSpecify Tag to be Rotated or '*all*' &amp;lt;"
                               (if (eq "" atrot:tag) "*all*" atrot:tag) "&amp;gt;: ")))
  (or (eq "" tmp) (setq atrot:tag tmp))
  (if (eq "*all*" tmp) (setq atrot:tag ""))
  
  (princ "&amp;lt;&amp;lt;&amp;lt; Select blocks to rotate attributes &amp;gt;&amp;gt;&amp;gt;")
  (setq errCount 0)
  (if
    (setq blSet (ssget '((0 . "INSERT") (66 . 1))))
     (progn
       (setq blSet (mapcar 'vlax-ename-&amp;gt;vla-object
                           (vl-remove-if 'listp
                             (mapcar 'cadr (ssnamex blSet)))))
       (foreach itm  blSet
         (setq attLst
                (vlax-safearray-&amp;gt;list
                  (vlax-variant-value
                    (vla-GetAttributes itm))))
         (foreach att  attLst
           (and (eq (if (eq "" atrot:tag)
                      (vla-get-TagString att) atrot:tag)
                    (vla-get-TagString att))
           (if (vl-catch-all-error-p
                 (vl-catch-all-apply
                   'vla-put-Rotation
                     (list att (angle '(0 0 0) (getvar "UCSXDIR")))))
             (setq errCount (1+ ErrCount)))))))
     (princ "&amp;gt;&amp;gt;&amp;gt; Nothing selected! &amp;lt;&amp;lt;&amp;lt;"))
  (if (/= 0 errCount)
    (princ
      (strcat "\n&amp;gt;&amp;gt;&amp;gt; " (itoa errCount)
              " attributes or blocks were on locked layer! &amp;lt;&amp;lt;&amp;lt; ")))
  (princ))&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370279#M131695</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-06-07T14:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: LISP not behaving after user input is changed...</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370816#M131696</link>
      <description>&lt;P&gt;Thank you very much for the help!!!!&amp;nbsp;&lt;img id="manvery-happy" class="emoticon emoticon-manvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_man-very-happy.png" alt="Man Very Happy" title="Man Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 17:18:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-not-behaving-after-user-input-is-changed/m-p/6370816#M131696</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-07T17:18:53Z</dc:date>
    </item>
  </channel>
</rss>

