Author Topic: open drawings list box  (Read 6217 times)

0 Members and 1 Guest are viewing this topic.

pedroantonio

  • Guest
open drawings list box
« on: July 15, 2014, 11:52:06 AM »
is it possible to manage open drawings with a lost box lisp? if i have 10 open drawings in my autocad i have to go to window menu and select which drawing i want to use.Is it possible to display the names of the open drawings in a list box with an OK button and sellect any time the drawings i whant to use ?

Sorry for my bad English

Thanks ....

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: open drawings list box
« Reply #1 on: July 15, 2014, 12:45:16 PM »

On the Main menu Bar ; Select window. ( between Modify and Help on my menu)
If the file you want is not in the list, select More Windows ...

or Alt+W+M
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: open drawings list box
« Reply #2 on: July 15, 2014, 12:58:08 PM »
Or use the various window controls located on the User Interface panel of the View tab:


ronjonp

  • Needs a day job
  • Posts: 7527
Re: open drawings list box
« Reply #3 on: July 15, 2014, 01:36:33 PM »
Or cycle with ctrl+tab.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: open drawings list box
« Reply #4 on: July 15, 2014, 01:48:39 PM »
I cycle  8)
Program the mouse side buttons for forward & back one drawing.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

pedroantonio

  • Guest
Re: open drawings list box
« Reply #5 on: July 15, 2014, 01:54:59 PM »
Thanks

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: open drawings list box
« Reply #6 on: July 15, 2014, 02:41:54 PM »
2015 has extra tabs, similar to layouts, but for drawing files.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

pedroantonio

  • Guest
Re: open drawings list box
« Reply #7 on: July 15, 2014, 03:06:43 PM »
i am using Autocad 2010

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

kraz

  • Guest
Re: open drawings list box
« Reply #9 on: July 15, 2014, 09:53:35 PM »
Maybe, You want this one...
since acad 2012? or 2013, autocad has filetab function.

I had used bellow arx tool and is very nice...

download and rename the file name:: "iDwgTab2.0.0.6.renameTozip -> iDwgTab2.0.0.6.zip"

http://pds25.egloos.com/pds/201405/16/51/iDwgTab2.0.0.6.renameTozip

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: open drawings list box
« Reply #10 on: July 15, 2014, 11:02:02 PM »
KRAZ
Bad link for me, I get
403 - Forbidden
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

kraz

  • Guest
Re: open drawings list box
« Reply #11 on: July 16, 2014, 07:57:37 AM »
KRAZ
Bad link for me, I get
403 - Forbidden

hmm...
attached the file...
this arx from http://arx119.egloos.com/

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: open drawings list box
« Reply #12 on: July 16, 2014, 09:17:50 AM »
Had few minutes today to write this routine and saved it to my Toolbox .  :wink:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:dwgs (/ *error* f id lst v dlg nm i obj cn w)
  2.   ;;    Tharwat 16.June.2014            ;;
  3.   ;; Cycle through drawings             ;;
  4.   (defun *error* (msg)
  5.     (if (and dlg (setq dlg (findfile dlg)))
  6.       (vl-file-delete dlg)
  7.     )
  8.     (if (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")
  9.       (princ msg)
  10.       (princ (strcat "\n ** Error : " msg " **"))
  11.     )
  12.   )
  13.   (setq cn
  14.          (vla-get-fullname
  15.          )
  16.   )
  17.     (if (and (/= "" (setq nm (vla-get-fullname dwg)))
  18.              (not (eq cn nm))
  19.         )
  20.       (setq lst (cons nm lst))
  21.     )
  22.   )
  23.   (if lst
  24.     (progn
  25.       (setq w (apply 'max (mapcar '(lambda (x) (strlen x)) lst)))
  26.       (if (and (setq dlg (vl-filename-mktemp nil nil ".dcl"))
  27.                (setq f (open dlg "w"))
  28.           )
  29.         (progn
  30.           (write-line
  31.             (strcat
  32.               "test : dialog { label = \"All opened drawings\"; width ="
  33.               (if (> w 90)
  34.                 "90"
  35.                 (itoa (+ 2 w))
  36.               )
  37.               ";"
  38.               ": list_box { label = \"Opened drawings\"; key = \"dwgs\"; height = 16;}"
  39.               ": row { alignment = centered; fixed_width = true;"
  40.               ": button { label = \"Okay\"; key = \"oki\"; is_default = true; width = 10;}"
  41.               ": button { label = \"Exit\"; key = \"esc\"; is_cancel = true; width = 10; }}}"
  42.             )
  43.             f
  44.           )
  45.           (close f)
  46.         )
  47.         (alert "Can't load the temporary file <!>")
  48.       )
  49.       (if (not (new_dialog
  50.                  "test"
  51.                  (setq id (load_dialog dlg))
  52.                  ""
  53.                )
  54.           )
  55.         (progn (if (>= id 0)
  56.                  (unload_dialog id)
  57.                )
  58.                (if (and dlg (setq dlg (findfile dlg)))
  59.                  (vl-file-delete dlg)
  60.                )
  61.         )
  62.         (progn
  63.           (start_list "dwgs")
  64.           (mapcar 'add_list lst)
  65.           (end_list)
  66.           (set_tile "dwgs" "0")
  67.           (action_tile
  68.             "oki"
  69.             "(setq i (atoi (get_tile \"dwgs\")))(done_dialog)"
  70.           )
  71.           (action_tile "esc" "(done_dialog)")
  72.           (start_dialog)
  73.           (unload_dialog id)
  74.           (vl-file-delete dlg)
  75.         )
  76.       )
  77.       (if i
  78.         (vlax-for x (vla-get-documents obj)
  79.           (if (eq (vla-get-fullname x) (nth i lst))
  80.             (vla-put-windowstate x acMax)
  81.             (vla-put-windowstate x acMin)
  82.           )
  83.         )
  84.       )
  85.     )
  86.     (alert "No opened named drawings to cycle through !!")
  87.   )
  88.   (princ)
  89. )
  90.  
« Last Edit: July 16, 2014, 10:56:42 AM by Tharwat »

GDF

  • Water Moccasin
  • Posts: 2081
Re: open drawings list box
« Reply #13 on: July 16, 2014, 10:07:55 AM »
Nice one Tharwat. This one by:

;;; Written By Peter Jamtgaard Copyright April 2003
;;; Activate drawing dialog control program that uses a tree structure for
;;; display of the filenames

I like the tree structure. I will need to get permission to post his routine. The routine uses Visual Basic which is no longer installed with AutoCAD.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: open drawings list box
« Reply #14 on: July 16, 2014, 10:30:04 AM »
Nice one Tharwat.


Thank you for the feed back GDF and I am happy that you like it :-)