<?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: Spanning multiple monitors in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395711#M21520</link>
    <description>&lt;P&gt;So it was the order that was causing the problem. But setting the width to 7680 (3840 x 2), the width winds up at about 7666 and there's a gap on one end that screws things up. I'm at a loss.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2023 05:14:20 GMT</pubDate>
    <dc:creator>csalvian</dc:creator>
    <dc:date>2023-11-23T05:14:20Z</dc:date>
    <item>
      <title>Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12390420#M21514</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been trying to get AutoCAD to extend the window across two monitors so I can create a working viewport on the main monitor and the other monitor would show my title block. I've been trying to get the following code to work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun C:SPAN	( / ssize sf viewht viewwid xcoord acadObj)
	(command "undo" "mark")

	(setq acadObj (vlax-get-acad-object))
	(vla-put-WindowState acadObj acNorm)
	(vla-put-WindowTop acadObj 0)
	(vla-put-WindowLeft acadObj 0)
	(vla-put-width acadObj 7680)
	(vla-put-height acadObj 2100)
	(vla-regen (vla-get-activedocument acadObj) acActiveViewport)

	(command "zoom" "extents")

	(setq ssize (getvar "screensize"))
	(setq viewht (getvar "viewsize"))
	(setq sf (/ viewht (cadr ssize)))
	(setq viewwid (* (car ssize) sf))
	(setq xcoord (- (car (getvar "viewctr")) (/ viewwid 4)))

	(command "mview" (list xcoord 0) (list (- xcoord (/ viewwid 2)) 23.15))
	(command "line" (list (+ xcoord (/ viewwid 2)) 0) (list (+ xcoord (/ viewwid 2)) 23.15) "")
	(command "zoom" "extents")

	(princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything from the "Zoom extents" down works fine if I reposition and resize the AutoCAD window manually. But if I run the code as-is, I can see it isn't regenerating the display properly and my viewport doesn't get drawn properly.&lt;/P&gt;
&lt;P&gt;Here is a video of what is supposed to happen when I span the window manually. You can see that I'm able to draw in the one viewport and it will update the other viewport in realtime (kinda shoots down Autodesk's claim that they can't make this work due to graphic limitations):&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6341529672112w213h213r450" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6341529672112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6341529672112w213h213r450');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6341529672112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now here's a video showing what happens when I run the above code, without resizing the window manually.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6341529376112w215h215r363" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6341529376112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6341529376112w215h215r363');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6341529376112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see that the code isn't updating the drawing window and is distorting the image, resulting in the viewport and line being drawn in the wrong locations. Does anyone have any idea how to fix this?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:05:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12390420#M21514</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-21T15:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12391535#M21515</link>
      <description>&lt;P&gt;You posted a lisp program. This is the VBA forum. Are you seeking a vba solution?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:07:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12391535#M21515</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2023-11-21T15:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12391556#M21516</link>
      <description>&lt;P&gt;I’d prefer LISP as I’m more familiar with it, but whichever one works the best I guess.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:13:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12391556#M21516</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-21T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395084#M21517</link>
      <description>&lt;P&gt;It seems that when running the command, the "screensize" does not get updated correctly after resizing the application and that's why the viewport is not placing correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="govalle2A2ER_0-1700684670944.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1296302i8C91103EB7AF3446/image-size/medium?v=v2&amp;amp;px=400" role="button" title="govalle2A2ER_0-1700684670944.png" alt="govalle2A2ER_0-1700684670944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;By doubling the size of the width, it works fine for me.&amp;nbsp;&lt;BR /&gt;Just add the following immediately after getting the screen size.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;setq ssize (cons (* 2 (car ssize)) (cdr ssize)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 20:29:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395084#M21517</guid>
      <dc:creator>gabe_o</dc:creator>
      <dc:date>2023-11-22T20:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395520#M21518</link>
      <description>&lt;P&gt;Yep, that works. The only thing is, the WindowTop and WindowLeft commands seem to leave a gap. Any thoughts on how to get rid of that?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-22 182318.png" style="width: 623px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1296366i2A1F51869AA63D70/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-11-22 182318.png" alt="Screenshot 2023-11-22 182318.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 01:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395520#M21518</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-23T01:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395544#M21519</link>
      <description>&lt;P&gt;The first thing that crossed my mind was that the order of these two need to be swapped.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vla-put-WindowTop acadObj 0)
(vla-put-WindowLeft acadObj 0)
(vla-put-width acadObj 7680)
(vla-put-height acadObj 2100)&lt;/LI-CODE&gt;&lt;P&gt;Not sure if the resizing is moving the window. I won't be able to test anything until I'm back in the office Monday.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 02:34:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395544#M21519</guid>
      <dc:creator>gabe_o</dc:creator>
      <dc:date>2023-11-23T02:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395711#M21520</link>
      <description>&lt;P&gt;So it was the order that was causing the problem. But setting the width to 7680 (3840 x 2), the width winds up at about 7666 and there's a gap on one end that screws things up. I'm at a loss.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 05:14:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12395711#M21520</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-23T05:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12396922#M21521</link>
      <description>&lt;P&gt;Ok so here's a video explaining how I got this whole process to work. The video is 3 mins long, but worth watching right to the end. I hope this will give Autodesk some motivation to be able to implement this kind of feature into a future version of AutoCAD.,&lt;/P&gt;&lt;P&gt;It's not perfect, I can't zoom in on an area in my titleblock on the right and still maintain my working viewport on the left, but it's not bad.&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6341673604112w810h540r300" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6341673604112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6341673604112w810h540r300');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6341673604112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 17:52:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12396922#M21521</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-23T17:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12397000#M21522</link>
      <description>&lt;P&gt;Thank you for sharing. Just recently, I thought I'd look for some script that would expand my C3D across two monitors. It's a pity that Windows/C3D doesn't remember the last position and restore it. So I must stretch the window every morning and now and then when C3D crashes. I am quite happy with just the first 5 lines of yours... Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 18:42:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12397000#M21522</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-11-23T18:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403421#M21523</link>
      <description>&lt;P&gt;Glad to see you got it working. Even if lisp alone wasn't enough. I might try to look into that later to see if it is possible using just lisp. I also wonder if it's possible to create an add-in that could allow both the model space and paper space to be open at once. Something to think about.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 17:24:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403421#M21523</guid>
      <dc:creator>gabe_o</dc:creator>
      <dc:date>2023-11-27T17:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403481#M21524</link>
      <description>An addon that allows that would be fantastic. My solution works, but stability seems to be a bit of an issue and it has operational issues that I mentioned. A two-window solution would really be what would work the best. Autodesk doesn't seem to want to implement it for some reason.</description>
      <pubDate>Mon, 27 Nov 2023 17:50:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403481#M21524</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-27T17:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403504#M21525</link>
      <description>&lt;P&gt;I suppose the only other way to do it would be to XREF in the base building plans into two files....one that is the working model space file and one that is the paper space title blocks. The paper space drawing would then also XREF in the model space drawing to view the stuff that I'm working on. Then I could have two instances of AutoCAD running and be able to view the paper space layouts separate from the working model in model space. I've tried this and it does work, but it's a lot more work in the drawing setup and it doesn't update in realtime. You have to tell the xrefs to reload each time you want the paper space view updated.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 18:01:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12403504#M21525</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-27T18:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12404313#M21526</link>
      <description>&lt;P&gt;I did think that it would be possible to XREF both files into one and have two viewports but that seemed impractical. When looking at the location of the window, in full screen, the windowTop and windowLeft are set to -8.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gabe_o_0-1701134766152.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1297954i0FAF8117755F0724/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gabe_o_0-1701134766152.png" alt="gabe_o_0-1701134766152.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems that there is some sort of padding when in full but not when in normal state. The same applies for trying to stretch the window horizontally. There is some padding that won't allow autoCAD to stretch past the width of my monitors -8 pixels on each end. Since vla-put-windowleft/top only accepts whole numbers, there is no way to place it in the upper most corner.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 01:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12404313#M21526</guid>
      <dc:creator>gabe_o</dc:creator>
      <dc:date>2023-11-28T01:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Spanning multiple monitors</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12404314#M21527</link>
      <description>&lt;P&gt;Yeah that's what I was finding too. And yet, the shortcut that I have with DisplayFusion is able to set the window to the full width.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 01:32:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spanning-multiple-monitors/m-p/12404314#M21527</guid>
      <dc:creator>csalvian</dc:creator>
      <dc:date>2023-11-28T01:32:13Z</dc:date>
    </item>
  </channel>
</rss>

