Author Topic: viewport scale pulldown  (Read 12455 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
viewport scale pulldown
« Reply #15 on: October 29, 2003, 11:07:33 AM »
ok that's what i thought. i made a lisp from the second part so i just have to make dcl of first. so i'll try that and let you know. thanks

dan

Ben

  • Guest
viewport scale pulldown
« Reply #16 on: November 03, 2003, 09:58:48 PM »
Just as an FYI, the _Color, _Layer, _Viewport, etc... pulldown controls that are part of AutoCAD are untouchable by either Lisp or VB.

.ARX  (lightning crashes and spooky organ music)

daron

  • Guest
viewport scale pulldown
« Reply #17 on: November 03, 2003, 11:59:43 PM »
ARX, fancy that. In December, I'll be taking a class at AU called "ARX for the VBA and lisp programmer." Don't know if it'll help, but we'll see.

Anonymous

  • Guest
viewport scale pulldown
« Reply #18 on: November 11, 2003, 10:32:13 AM »
Check out this version for the rest of the world!

//zooms to precise paper space scales

zp : dialog {
   label = "Zoom scale viewports";
   : boxed_column {
      label = "zoom ps";
      : list_box {
         allow_accept = true;
         key = "zoom";
         list ="\n1 to 1\n1 to 2\n1 to 5\n1 to 10\n1 to 20\n1 to 25\n1 to 50\n1 to 100\n1 to 200\n1 to 250\n1 to 500\n1 to 1000\n1 to 1250\n1 to 2500\nExtents\nPrevious\nAll";
         width = 50;
    height = 20;
         }
         }
         ok_cancel;
         }



(defun c:zg ()
     (setq zoomfactor "0")
     (setq zdialog (load_dialog "zoomscale"))
     (if (and zdialog (new_dialog "zp" zdialog))
     (progn
          (action_tile "zoom" "(setq zoomfactor $value)")
          (start_dialog)
          (cond
          ((= "0" zoomfactor)
          )
          ((= "1" zoomfactor)
           (setq zoomfactor "0")
           (command ".zoom" "1/1xp") ;1 to 1
     )
      ((= "2" zoomfactor)  
           (command ".zoom" "1/2xp") ;1 to 2
     )
      ((= "3" zoomfactor)  
           (command ".zoom" "1/5xp") ;1 to 5
     )
      ((= "4" zoomfactor)  
           (command ".zoom" "1/10xp") ;1 to 10
     )
      ((= "5" zoomfactor)  
           (command ".zoom" "1/20xp") ;1 to 20
     )
      ((= "6" zoomfactor)  
           (command ".zoom" "1/25xp") ;1 to 25
     )
      ((= "7" zoomfactor)  
           (command ".zoom" "1/50xp") ;1 to 50
     )
      ((= "8" zoomfactor)  
           (command ".zoom" "1/100xp") ;1 to 100
     )
      ((= "9" zoomfactor)  
           (command ".zoom" "1/200xp") ;1 to 200
     )
      ((= "10" zoomfactor)  
           (command ".zoom" "1/250xp") ;1 to 250
     )
      ((= "11" zoomfactor)  
           (command ".zoom" "1/500xp") ;1 to 500
     )
      ((= "12" zoomfactor)  
           (command ".zoom" "1/1000xp") ;1 to 1000
     )
      ((= "13" zoomfactor)  
           (command ".zoom" "1/1250xp") ;1 to 1250
     )
      ((= "14" zoomfactor)  
           (command ".zoom" "1/2500xp") ;1 to 2500
     )
      ((= "15" zoomfactor)  
           (command ".zoom" "e") ;extents
     )
      ((= "16" zoomfactor)  
           (command ".zoom" "p") ;previous
     )
      ((= "17" zoomfactor)  
           (command ".zoom" "a") ;all
     )
          ) ;_ cond
               ;(alert zoomfactor)
     ) ;_ progn
     ) ;_ if
) ;_ defun


You will notice that the box is now large enough to accommodate all of the choices.