Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tile Vertical Multiple Dwgs.

13 REPLIES 13
Reply
Message 1 of 14
Mr.Hella
3423 Views, 13 Replies

Tile Vertical Multiple Dwgs.

Does anyone in the group know how to do this?:

 

I have multiple dwgs. opened but minimized so that only their small windows are line up down at the bottom of Autocad. I want to know if there is a way to call them all up to full screen, tiled vertically, at the same time with one command.

 

 

Thanks in advance.

 

M.

13 REPLIES 13
Message 2 of 14
_Tharwat
in reply to: Mr.Hella

The command is already existed in the menu Window -> Tile Vertically .

Message 3 of 14
Mr.Hella
in reply to: _Tharwat

When I issue that command it DOES NOT bring all of the minimized dwgs. back up to full screen, is there a variable or setting somewhere to make that happen??

Message 4 of 14
_Tharwat
in reply to: Mr.Hella

Use this code to maximize all drawings then use the command Tile Vertically .

 

(vlax-for x (vla-get-documents (vlax-get-acad-object))
  (vla-put-windowstate x Acmax)
)

 

Message 5 of 14
Mr.Hella
in reply to: _Tharwat

Forgive me in advance!! I know your trying to help!! Could you tell me how to utilize this code? I know nothing about Autolisp or any programming language!! I know what I want to do but don't know how to make it happen!!

 

Thank you

Message 6 of 14
pbejse
in reply to: Mr.Hella

Look into vla-put-windowstate

 

WindowState

 acWindowState enum; read-write

 acMin
  The window is minimized.
 
 acMax
  The window is maximized.
 
 acNorm
  The window is normal (neither minimized nor maximized).
 

[I'm too slow......];<-----

Message 7 of 14
_Tharwat
in reply to: Mr.Hella

It is Ok ,

1- Open Visual lisp editor by typing vlide then a new file and save the following code in the new file to a specific location and then go back to Autocad and type in the command line AP and a dialog box would appear and after that select the file that you have just created and press load .

 

2- finally , type test to see the result .

 

(defun c:Test nil
  (vl-load-com)
  (vlax-for x (vla-get-documents (vlax-get-acad-object))
    (vla-put-windowstate x Acmax)
  )
  (princ)
)

 

Message 8 of 14
Mr.Hella
in reply to: _Tharwat

Perfect. thanks so much for the help! I will try this on my lunch break & get back. I was just handed a deadline that has little time to complete from my boss!!

Message 9 of 14
Mr.Hella
in reply to: Mr.Hella

I'm sorry _Tharwat,

I loaded the code fine, AP says it loaded fine. I open multiple dwgs., minimize them, open one in the full editor & type "Test".

The Autcad screen flashes but nothing happens. I enter the command for Tile Vertical & the same dwgs. are still minimized. Does this work fine on your machine??

 

thanks again,

 

M.

Message 10 of 14
_Tharwat
in reply to: Mr.Hella


@mhlr wrote:

I'm sorry _Tharwat,

I loaded the code fine, AP says it loaded fine. I open multiple dwgs., minimize them, open one in the full editor & type "Test".

The Autcad screen flashes but nothing happens. I enter the command for Tile Vertical & the same dwgs. are still minimized. Does this work fine on your machine??

 

thanks again,

 

M.


That's really strange , it works as expected here .

 

You may have an old version of Autocad ?

Message 11 of 14
Mr.Hella
in reply to: _Tharwat

I have version 2012. This isn't the first time something won't work in my program but will on another! Thanks very much for your help. I've tried changing the command, moving the .lsp file to another directory etc. And "AP" loads it fine but when I type the command in the command prompt says "Unknown Command".

 

Thanks again.

Message 12 of 14
Mr.Hella
in reply to: _Tharwat

No matter what I change the command to, it doesn't recognize it but the routine loads fine in Appload. Thanks for your help anyway.

Message 13 of 14
_Tharwat
in reply to: Mr.Hella


@mhlr wrote:

I have version 2012. This isn't the first time something won't work in my program but will on another! Thanks very much for your help. I've tried changing the command, moving the .lsp file to another directory etc. And "AP" loads it fine but when I type the command in the command prompt says "Unknown Command".

 

Thanks again.



It is working fine here on the other computer , I hope that someone else would test the code too .

 

Message 14 of 14
andrewpuller3811
in reply to: _Tharwat

Using the code posted

 

(defun c:Test nil
  (vl-load-com)
  (vlax-for x (vla-get-documents (vlax-get-acad-object))
    (vla-put-windowstate x Acmax)
  )
  (princ)
)

 

I get the same result as mhlr. All that happens is the drawings are maximized.

 

 

I only know basic lisp, but it doesn't look like there is anything in the code that looks like it will put the windows in split view, only maximise the drawings.

 

But after a little research in the AutoLISP Reference, I modified the above code to this which works. I thought it didn't at first, as I had six windows and that tiled in two rows, but that is the normal behaviour of the tile vertical command.

 

(defun c:Test nil
  (vl-load-com)
  (vlax-for x (vla-get-documents (vlax-get-acad-object))
    (vla-put-windowstate x acNorm)
  )
  (command "syswindows" "vert")
  (princ)
)

 

Instead of putting the window state to maximized, it puts the window state to acNorm, which is basically the same as restoring each window, then call the command syswindows and call for vertical tiling.

 



If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 10 Enterprise 64bit
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2021

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost