<?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: step through layers with vba? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/step-through-layers-with-vba/m-p/3741592#M11396</link>
    <description>&lt;P&gt;I am afraid it is not but it might be possible another way but you can execute command each time. It continues to which layer did you left.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Dec 2012 14:07:14 GMT</pubDate>
    <dc:creator>truss_85</dc:creator>
    <dc:date>2012-12-21T14:07:14Z</dc:date>
    <item>
      <title>step through layers with vba?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/step-through-layers-with-vba/m-p/3740504#M11395</link>
      <description>&lt;P&gt;I am working with a lisp that step through layers one at a time, locking all other layers than current one. (enter or space)&lt;/P&gt;&lt;P&gt;While this lisp runs I can zoom etc in the drawing.&lt;/P&gt;&lt;P&gt;Is it possible to make this tool with VBA too?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gr. Laszlo&lt;/P&gt;&lt;PRE&gt;defun C:STL (/ *error* cmde lay)
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
      (princ (strcat "\nError: " errmsg))
    ); end if
    (command "_.layer" "_unlock" "*" "")
    (setvar 'cmdecho cmde)
  ); end defun - *error*
  (setq cmde (getvar 'cmdecho))
  (setvar 'cmdecho 0)
  (while (getstring "\nPress Space or Enter to go to next Layer, Escape to quit: ")
    (setq lay (cdr (assoc 2 (tblnext "layer" (not lay)))))
 (while (and lay (wcmatch lay "*|*") (setq lay (cdr (assoc 2 (tblnext "layer"))))));    
(if (not lay) (setq lay (cdr (assoc 2 (tblnext "layer" T))))); back to 0 at end
    (command "_.layer" "_thaw" lay "_set" lay "_lock" "*" "_unlock" lay "" "_regen")
  ); end while
); end defun
(princ "\nType STL to Step Through Layers, locking all other Layers.")
(princ)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2012 10:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/step-through-layers-with-vba/m-p/3740504#M11395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-20T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: step through layers with vba?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/step-through-layers-with-vba/m-p/3741592#M11396</link>
      <description>&lt;P&gt;I am afraid it is not but it might be possible another way but you can execute command each time. It continues to which layer did you left.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2012 14:07:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/step-through-layers-with-vba/m-p/3741592#M11396</guid>
      <dc:creator>truss_85</dc:creator>
      <dc:date>2012-12-21T14:07:14Z</dc:date>
    </item>
  </channel>
</rss>

