<?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: Viewport Display Lock, can this be automated? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796818#M349251</link>
    <description>&lt;P&gt;I found one at &lt;A target="_blank" rel="nofollow" href="http://www.cadtutor.net/forum/showthread.php?21079-Viewport-Lock-Routine."&gt;http://www.cadtutor.net/forum/showthread.php?21079-Viewport-Lock-Routine.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Follow the instructions for adding (vl-load-com) near the beginning of the code.&lt;/P&gt;&lt;P&gt;I don't know how much you know about LISP routines, so here is a rundown. Ignore it if you already know it!&lt;/P&gt;&lt;P&gt;If you don't know AutoLISP the files are created in Notepad with the extension &lt;STRONG&gt;.lsp&lt;/STRONG&gt;. Copy the code to a Notepad file and save it as myvpl.lsp; add &lt;STRONG&gt;(vl-load-com)&lt;/STRONG&gt; before &lt;STRONG&gt;(princ "\nVPLOCKER.LSP c2002 KDCAD, inc.&lt;/STRONG&gt; and save the file in your support directory. I have created a folder that has all my LISP, script and macro routines and have added it to my Tools/Options/Files/Support Files Search Path.&lt;/P&gt;&lt;P&gt;Use the command APPLOAD to load the LISP file. You can add it to the Startup Suite in the APPLOAD dialog box. There are 4 subroutines in the main file.&lt;/P&gt;&lt;P&gt;VPL locks a viewport&lt;/P&gt;&lt;P&gt;VPAL locks all viewports&lt;/P&gt;&lt;P&gt;VPU unlocks a viewport&lt;/P&gt;&lt;P&gt;VPAU unlocks all viewports&lt;/P&gt;&lt;P&gt;If you want to lock all the viewports type VPAL at the command line.&lt;/P&gt;&lt;P&gt;The code changes the color of viewports to cyan (color 4) or ByLayer (color 256). If you don't want it to do this just put 3 semicolons in front of the line like this: &amp;nbsp; &lt;STRONG&gt;;;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (vlax-put-property vlaobj 'Color 4) &lt;/STRONG&gt;or delete the line of code.&lt;/P&gt;&lt;P&gt;If you have AutoDesk's ScriptPro or another script batch processor you can create a script to run the program on many files in a batch operation.&lt;/P&gt;&lt;P&gt;I know the basics of LISP programming so that is about all I can tell you. Good luck.&lt;/P&gt;&lt;P&gt;Nancy&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2010 17:08:29 GMT</pubDate>
    <dc:creator>neaton</dc:creator>
    <dc:date>2010-10-14T17:08:29Z</dc:date>
    <item>
      <title>Viewport Display Lock, can this be automated?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796462#M349250</link>
      <description>&lt;P&gt;I have hundreds of drawings with multiple layouts on each.&amp;nbsp; The viewports display is generally not locked on most of these drawings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a simple way to lock all viewports on all layers in all drawings?&amp;nbsp; Seems a bit tedious to have to do this manually with each drawing.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2010 13:14:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796462#M349250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-14T13:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport Display Lock, can this be automated?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796818#M349251</link>
      <description>&lt;P&gt;I found one at &lt;A target="_blank" rel="nofollow" href="http://www.cadtutor.net/forum/showthread.php?21079-Viewport-Lock-Routine."&gt;http://www.cadtutor.net/forum/showthread.php?21079-Viewport-Lock-Routine.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Follow the instructions for adding (vl-load-com) near the beginning of the code.&lt;/P&gt;&lt;P&gt;I don't know how much you know about LISP routines, so here is a rundown. Ignore it if you already know it!&lt;/P&gt;&lt;P&gt;If you don't know AutoLISP the files are created in Notepad with the extension &lt;STRONG&gt;.lsp&lt;/STRONG&gt;. Copy the code to a Notepad file and save it as myvpl.lsp; add &lt;STRONG&gt;(vl-load-com)&lt;/STRONG&gt; before &lt;STRONG&gt;(princ "\nVPLOCKER.LSP c2002 KDCAD, inc.&lt;/STRONG&gt; and save the file in your support directory. I have created a folder that has all my LISP, script and macro routines and have added it to my Tools/Options/Files/Support Files Search Path.&lt;/P&gt;&lt;P&gt;Use the command APPLOAD to load the LISP file. You can add it to the Startup Suite in the APPLOAD dialog box. There are 4 subroutines in the main file.&lt;/P&gt;&lt;P&gt;VPL locks a viewport&lt;/P&gt;&lt;P&gt;VPAL locks all viewports&lt;/P&gt;&lt;P&gt;VPU unlocks a viewport&lt;/P&gt;&lt;P&gt;VPAU unlocks all viewports&lt;/P&gt;&lt;P&gt;If you want to lock all the viewports type VPAL at the command line.&lt;/P&gt;&lt;P&gt;The code changes the color of viewports to cyan (color 4) or ByLayer (color 256). If you don't want it to do this just put 3 semicolons in front of the line like this: &amp;nbsp; &lt;STRONG&gt;;;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (vlax-put-property vlaobj 'Color 4) &lt;/STRONG&gt;or delete the line of code.&lt;/P&gt;&lt;P&gt;If you have AutoDesk's ScriptPro or another script batch processor you can create a script to run the program on many files in a batch operation.&lt;/P&gt;&lt;P&gt;I know the basics of LISP programming so that is about all I can tell you. Good luck.&lt;/P&gt;&lt;P&gt;Nancy&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2010 17:08:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796818#M349251</guid>
      <dc:creator>neaton</dc:creator>
      <dc:date>2010-10-14T17:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport Display Lock, can this be automated?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796844#M349252</link>
      <description>&lt;P&gt;Excellent, that worked out perfectly!&amp;nbsp; Thanks for the help, you just saved me a LOT of time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2010 17:22:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/2796844#M349252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-14T17:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport Display Lock, can this be automated?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/3407681#M349253</link>
      <description>&lt;P&gt;Here's another simple lisp to lock or unlock all viewports at once:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lock All:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(command "-vports" "l" "on" "all" "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unlock All:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(command "-vports" "l" "off" "all" "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this in a simple routine that turns off the viewport layer and locks it at the same time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:VPOFF ()(command "-layer" "OFF" "VP" "")(command "-vports" "l" "on" "all" ""))&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2012 22:08:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/viewport-display-lock-can-this-be-automated/m-p/3407681#M349253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-10T22:08:14Z</dc:date>
    </item>
  </channel>
</rss>

