<?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 LSP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10500970#M57864</link>
    <description>&lt;P&gt;IT IS POSSIBLE FOR A POLYLINE TO TURN A VIEWPORT TO LIMIT A REGION OF THE IMAGE THAT I WANT TO SHOW IN THE VIEW PORT, LEAVING THE MODEL IN SCALE TO LAYOUT.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 00:31:58 GMT</pubDate>
    <dc:creator>rolisonfelipe</dc:creator>
    <dc:date>2021-07-28T00:31:58Z</dc:date>
    <item>
      <title>Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10487866#M57858</link>
      <description>&lt;P&gt;Hello All -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wanting to create a lsp routine that will toggle between viewport configurations.&amp;nbsp; Toggle from single viewport to Two: Vertical.&lt;/P&gt;&lt;P&gt;is this possible?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:15:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10487866#M57858</guid>
      <dc:creator>heather_o</dc:creator>
      <dc:date>2021-07-22T13:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488225#M57859</link>
      <description>&lt;P&gt;I rarely work with multiple viewports so maybe I'm wrong but try this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:tv nil (command "-vports" "T"))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488225#M57859</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-07-22T14:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488284#M57860</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; That brings up the viewport dialog box.&amp;nbsp; How would I have the routine toggle between Single and Two:Vertical?&lt;/P&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488284#M57860</guid>
      <dc:creator>heather_o</dc:creator>
      <dc:date>2021-07-22T15:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488325#M57861</link>
      <description>&lt;P&gt;At my side it works without showing dialog box. Create two vertical viewports and it should work&amp;nbsp; correctly. Other option is to click [+] on upper left side of viewport and use option "Maximize vievport".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488325#M57861</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-07-22T15:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488351#M57862</link>
      <description>&lt;P&gt;I got it to work!&amp;nbsp; Thanks you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:43:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488351#M57862</guid>
      <dc:creator>heather_o</dc:creator>
      <dc:date>2021-07-22T15:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488385#M57863</link>
      <description>&lt;P&gt;Glad to be of help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:53:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10488385#M57863</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-07-22T15:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10500970#M57864</link>
      <description>&lt;P&gt;IT IS POSSIBLE FOR A POLYLINE TO TURN A VIEWPORT TO LIMIT A REGION OF THE IMAGE THAT I WANT TO SHOW IN THE VIEW PORT, LEAVING THE MODEL IN SCALE TO LAYOUT.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 00:31:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10500970#M57864</guid>
      <dc:creator>rolisonfelipe</dc:creator>
      <dc:date>2021-07-28T00:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10501230#M57865</link>
      <description>&lt;P&gt;Yes !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is lots of rectang to layout examples do a google.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 03:34:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10501230#M57865</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-07-28T03:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10501796#M57866</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4592867"&gt;@rolisonfelipe&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;IT IS POSSIBLE FOR A POLYLINE TO TURN A VIEWPORT TO LIMIT A REGION OF THE IMAGE THAT I WANT TO SHOW IN THE VIEW PORT, LEAVING THE MODEL IN SCALE TO LAYOUT.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't understand completely what you are asking for. Check &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/multiple-clipping-boundary-on-image-underlays-pdf-dgn-dwf-xrefs/m-p/9976490#M409437" target="_blank" rel="noopener"&gt;this link&lt;/A&gt; for a code for clipping images, viewports and similar, if this is what you are looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 09:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10501796#M57866</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-07-28T09:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502137#M57867</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rolisonfelipe_0-1627473528179.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/945988iDF528DE52B716F4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rolisonfelipe_0-1627473528179.png" alt="rolisonfelipe_0-1627473528179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a DRAWING FULL OF LAYERS AND A BACKGROUND IMAGE IN THE MODEL, BUT I HAVE A LIMIT THAT I WOULD NOT LIKE TO PRESENT IN THE LAYOUT, ALL EXTERNAL THE CYAN LINE, SHOULD NOT GO TO THE LAYOUT. AS IT IS THE MUNICIPAL LIMIT WITH MANY VERTICES, I THINK An LSP TO COPY THAT SAME LIMIT IN THE SAME POSITION MODEL FOR THE LAYOUT IS POSSIBLE WITH 1XP SCALE, THEN IT IS ONLY FORMATTING WORK, THANKS FOR THE HELP!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 12:05:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502137#M57867</guid>
      <dc:creator>rolisonfelipe</dc:creator>
      <dc:date>2021-07-28T12:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502270#M57868</link>
      <description>&lt;P&gt;Say you have a closed polyline as a boundary - as it looks it is.&amp;nbsp;Then this routine of mine could help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that there are two last lines commented out - routine is originally made for export to the separated file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)
(defun c:ExtrimExport ( / :VPMatchModel s i x f)    ; Extrim using Export-Layout
  
  (defun :VPMatchModel (ss / cad doc ss i obj cen)  ; Match scale with Model
    (setq cad (vlax-get-Acad-Object)
	  doc (vla-get-ActiveDocument cad))
    
    (vla-put-MSpace doc :vlax-true)
    (repeat (setq i (sslength ss))
      (setq obj (vlax-ename-&amp;gt;vla-object (ssname ss (setq i (1- i)))))
      (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-ActivePViewport (list doc obj))))
	(progn
	  (vlax-invoke cad 'ZoomCenter (vlax-get obj 'Center) 1.0)
	  (vla-put-CustomScale obj 1.))))
    (vla-put-MSpace doc :vlax-false))
  
  ; ---------------------------------------------------------------------------------------
  
  (if (and (or (= (getvar 'ctab) "Model")
	       (prompt "\nError: Start routine from MODEL space!"))
	   (princ "\nClosed lwpolylines as boundaries required, ")
	   (setq s (ssget '((0 . "LWPOLYLINE") (-4 . "&amp;amp;=") (70 . 1))))
	   (or (vl-position "Extrim" (layoutlist))
	       (vl-cmdf "_.LAYOUT" "_New" "Extrim"))
	   (setvar 'ctab "Extrim")
	   (vl-cmdf "_.PSPACE")
	   )
    (progn
      (if (setq x (ssget "_A" '((410 . "Extrim"))))
	(command "_.ERASE" x ""))
      
      (repeat (setq i (sslength s))
	(entmake (append (entget (ssname s (setq i (1- i)))) '((410 . "Extrim")))))
      
      (command "_.ZOOM" "_E")
      
      (if (setq s (ssget "_A" '((0 . "LWPOLYLINE") (410 . "Extrim"))))
	(repeat (setq i (sslength s))
	  (command "_.-VPORTS" "_Object" (ssname s (setq i (1- i))))))
      
      (if (setq s (ssget "_A" '((0 . "VIEWPORT") (410 . "Extrim"))))
	(:VPMatchModel s))
      
;;;      (initdia)
;;;      (command "_.EXPORTLAYOUT")
      ))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 12:50:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502270#M57868</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-07-28T12:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502308#M57869</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4592867"&gt;@rolisonfelipe&lt;/a&gt;&amp;nbsp; With my code you can create new layout with one or more viewports. Place border (closed lwpolyline) over the viewport, and clip all outside the boundary using my code.&lt;/P&gt;&lt;P&gt;Other option is to trim all entities outside the boundary, but I would do this only if it's really necessary.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 13:02:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10502308#M57869</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-07-28T13:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10508589#M57870</link>
      <description>&lt;P&gt;MY BROTHER, IT WAS ALL I NEEDED, MILLIMETRICLY CUSTOMIZED....&lt;/P&gt;&lt;P&gt;MUITO OBRIGADO&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 14:52:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10508589#M57870</guid>
      <dc:creator>rolisonfelipe</dc:creator>
      <dc:date>2021-07-30T14:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10508596#M57871</link>
      <description>&lt;P&gt;I TESTED YOUR VERSION HAS A VERY GREAT POTENTIAL AND A DYNAMIC USE PATIBILITY.&lt;/P&gt;&lt;P&gt;THANK YOU VERY MUCH&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 14:54:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/10508596#M57871</guid>
      <dc:creator>rolisonfelipe</dc:creator>
      <dc:date>2021-07-30T14:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Viewport LSP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/12866871#M57872</link>
      <description>&lt;P&gt;I tried this and it works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(if (= 1 (length (vports))) (ai_tiledvp 2 "_V") (ai_tiledvp 1 nil))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this as text input on a STREAM DECK and it works like a charm.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 12:21:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/viewport-lsp/m-p/12866871#M57872</guid>
      <dc:creator>sebastian_aust5W7SB</dc:creator>
      <dc:date>2024-06-28T12:21:56Z</dc:date>
    </item>
  </channel>
</rss>

