Author Topic: Help with Print Views Routine...  (Read 10797 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #30 on: March 29, 2006, 11:35:46 AM »
I swear i posted that but i must have been dreaming, cause I did it the other night.
Oh well, here it is.

Code: [Select]
  ;;  CAB start
  (set_tile "viewbox" (if viewselect viewselect "")) ; default to none selected
  (action_tile "sel_all" "(select_all)")
  (action_tile "cle_all" "(set_tile \"viewbox\" \"\")")
  (defun select_all(/ sel)
    (repeat (length viewlijst)
      (cond
        ((null sel) (setq sel '(48)))
        ((setq sel (append sel (list 32 (1+ (last sel))))))
        )
    )
    (set_tile "viewbox" (vl-list->string sel))
  )
  ;;  CAB end vl-list

New DCL
Code: [Select]
printview : dialog {label = "Print Views 2006";                                                     
  : row {                                                                                           
    : boxed_column { label = "Selecteer Views";                                                     
      : list_box { key = "viewbox";  width = 25; height = 20; multiple_select = true; }
      : row {
        : button { label = "&Select All"; key = "sel_all"; }
        : button { label = "&Clear All"; key = "cle_all"; }
      }
    }                                                                                               
    : spacer_1 {}                                                                                   
    : column {                                                                                     
      : radio_column { label = "Papier Formaat"; key = "papierformaat";                           
        : radio_button { label = "A4 210x297 mm"; key = "ISO A4 (210.00 x 297.00 MM)";}             
        : radio_button { label = "A3 297x420 mm"; key = "ISO A3 (297.00 x 420.00 MM)"; value = "1";}
      }                                                                                             
      : spacer_1 {}                                                                                 
      : radio_column {  label = "Print Schaal";  key = "printschaal";                               
        : radio_button { label = "1:1";  key = "1=1"; }                                               
        : radio_button { label = "1:2";  key = "1=2"; }                                             
        : radio_button { label = "1:5";  key = "1=5";  value = "1";}                               
        : radio_button { label = "1:10"; key = "1=10"; }                                           
        : radio_button { label = "1:20"; key = "1=20"; }                                           
      }                                                                                             
      : spacer_1 {}                                                                                 
      : boxed_row { label = "Print Stijl";                                                         
        : popup_list { key = "printstijlctb"; width = 30;}                                             
      }                                                                                             
    }                                                                                               
  }                                                                                                 
  : spacer_1 {}                                                                                     
  ok_cancel ;                                                                                       
}
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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #31 on: March 29, 2006, 11:57:20 AM »
Thanks you CAB
I am not behind a PC with AutoCAD installed right now.
So i have to wait til tomorrow to implement your code.


CAB i did implement the code you provided and it is not working the way it should be.After hitting the select all button it causes a crash/freeze of AutoCAD.

This what i got.What am i missing here or doing wrong.?

Code: [Select]
(defun getnames (tablename / data result)
  (while (setq data (tblnext tablename (null data)))
    (setq result (cons (list (cdr (assoc 2 data))
                             (cdr (assoc 40 data))
                             (cdr (assoc 41 data))
                       ) ;_ end of LIST
                       result
                 ) ;_ end of CONS
    ) ;_ end of SETQ
  ) ;_ end of WHILE
) ;_ end of DEFUN

  ;;--------------------------------------------------------------------
  ;help message for dialog box.
  (defun txtbox_infohelp ()
    (alert
      (strcat
        "Deze routine print de geselecteerde views naar de standaard Printer.       \n\n"
        "Deze views worden geprint op de geselecteerde schaal en peninstellingen.\n"
        "Orientatie word automatisch geregeld.\n"
        "Klik op OK om dit venster te sluiten.\n\n"
       )
    )
  )
  ;;--------------------------------------------------------------------



;Start routine
(defun c:printview2 (/           ocmd        ocmddia     oexpert
                    oosmode     viewlijst   dianummer   viewselect
                    papierformaat           teller      item
                    orientatie  viewnaam    hoogte      breedte
                   ) ;Save values of variables to change
;;  (setq ocmd    (getvar "cmdecho")
;;        ocmddia (getvar "cmddia")
;;        oexpert (getvar "expert")
;;        oosmode (getvar "osmode")
;;  ) ;_ end of SETQ
(setvar "cmdecho" 1)


  (init_vars1)
  (make_device_list)
  (init_vars2)
  (make_plotstyle_list)

  (setq viewlijst ;Get list of views and sort it
         (vl-sort (getnames "view")
                  (function (lambda (a b) (< (nth 0 a) (nth 0 b))))
         ) ;_ end of VL-SORT
  ) ;_ end of SETQ
 
  (setq dianummer (load_dialog "printview2.DCL")) ;Start dialog to select views
  (new_dialog "printview" dianummer)
  (setq teller 0)
  (start_list "viewbox")
  (repeat (length viewlijst)
    (add_list (car (nth teller viewlijst)))
    (setq teller (+ 1 teller))
  ) ;_ end of REPEAT
  (end_list)


 ;;;--- Sort the plotstylelist
  (setq printstijl (acad_strlsort plotstyle-list))
  ;;;--- Add the list to the dialog box
  (start_list "printstijlctb" )
  (mapcar 'add_list plotstyle-list)
  (end_list)

 ;;;--- Sort the plotterlist
  (setq printer (acad_strlsort device-list))
  ;;;--- Add the list to the dialog box
  (start_list "printers" )
  (mapcar 'add_list device-list)
  (end_list)

(setq printschaallijst(list "1=1" "1=2" "1=5" "1=10" "1=20" "1=50" "1=100" "1=200" "1=500" "1=1000"))
(start_list "printschaallijst")
(mapcar 'add_list printschaallijst)
(end_list)



  (action_tile
    "accept"
    "(progn
     (setq viewselect (get_tile \"viewbox\"))
     (setq papierformaat (get_tile \"papierformaat\"))
     (setq printschaal (get_tile \"printschaallijst\"))
     (setq printers (get_tile \"printers\"))
     (setq printctb (get_tile \"printstijlctb\"))
    (done_dialog)
    )"
  )

 
;;  ) ;_ end of ACTION_TILE

;;  CAB start
  (set_tile "viewbox" (if viewselect viewselect "")) ; default to none selected
  (action_tile "selall" "(select_all)")
  (action_tile "clrall" "(set_tile \"viewbox\" \"\")")
  (defun select_all(/ sel)
    (repeat (length viewlijst)
      (cond
        ((null sel) (setq sel '(48)))
        ((setq sel (append sel (list 32 (1+ (last sel))))))
        )
    )
    (set_tile "viewbox" (vl-list->string sel))
  )
  ;;  CAB end vl-list
 
(set_tile "printers" "6")
(set_tile "printstijlctb" "11")
(set_tile "printschaallijst" "2")

  (action_tile "cancel" "(setq viewselect \"\")(done_dialog)")
  (action_tile "help" "(txtbox_infohelp)")
  (start_dialog)
  (unload_dialog dianummer) ;If a view is selected, then print it
  (if (/= viewselect "")
    (progn (setq viewselect (read (strcat "(" viewselect ")"))) ;Convert string to list
           (setq teller 0)
           (repeat (length viewselect) ;Loop to process all selected views
             (setq item     (nth teller viewselect)
                   viewnaam (car (nth item viewlijst)) ; Name of view
                   hoogte   (cadr (nth item viewlijst)) ; Height of view
                   breedte  (car (cddr (nth item viewlijst))) ; Width of view
             ) ;_ end of SETQ
             (if (< breedte hoogte) ;Set paperorientation according to height/width
               (setq orientatie "Portrait")
               (setq orientatie "Landscape")
             ) ;_ end of IF
             (command "-plot" ; Print view
                      "yes" ;Detailed plot configuration? [Yes/No] <No>
                      "model" ;Enter a layout name or [?] <Model>
(nth (atoi printers) device-list) ;Enter an output device name
papierformaat ;Enter paper size:
                      "M" ;Inches/milimeters
                      orientatie ;Enter drawing orientation:
                      "n" ;Plot upside down:
                      "view" ;Enter plot area:
                      viewnaam ;Enter view name:
(nth (atoi printschaal) printschaallijst) ;Enter plot scale
                      "Center" ;Enter plot offset
                      "y" ;Plot with plot styles:
(nth (atoi printctb) plotstyle-list) ;Enter plot style table name
                      "y" ;Plot with lineweights:
                      "n" ;Remove hidden lines
                      "n" ;Write the plot to a file [Yes/No] <N>:
                      "n" ;Save changes to model tab [Yes/No]? <N>
                      "y" ;Proceed with plot [Yes/No] <Y>:
             ) ;_ end of COMMAND

             (setq teller (+ 1 teller))
           ) ;_ end of REPEAT
    ) ;_ end of PROGN
  (princ "\nJe hebt geen views geselecteerd en er is dus ook niets geprint.....!") ; Display text if no view or cancel is selected
  ) ;_ end of IF

  (princ)
) ;_ end of DEFUN
;|«Visual LISP© Format Options»
(72 2 1 2 T "end of " 60 9 1 1 0 T nil T T)
;*** DO NOT add text below the comment! ***|;
;;;; end routine;;;;;;;;

;;===============================================
(defun make_device_list (/ curdwg pslayout)
  (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object))
    pslayout (vla-get-Layout (vla-get-PaperSpace curdwg))
  )
  (vla-RefreshPlotDeviceInfo pslayout)
  (vlax-safearray->list (vlax-variant-value (vla-GetPlotDeviceNames pslayout)))
) ; End make_device_list


(defun make_plotstyle_list (/ curdwg pslayout)
  (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object))
    pslayout (vla-get-Layout (vla-get-PaperSpace curdwg))
  )
  (vla-RefreshPlotDeviceInfo pslayout)
  (vlax-safearray->list (vlax-variant-value (vla-GetPlotStyleTableNames pslayout)))
) ; End make_plotstyle_list

;;===============================================
  (defun init_vars1 ()
    (if (not PLOTALL-DEVICE) (setq PLOTALL-DEVICE "None"))
         (setq  device-list (make_device_list))
          (if (and PLOTALL-DEVICE (member PLOTALL-DEVICE device-list))
      (setq device# (- (length device-list) (length (member PLOTALL-DEVICE device-list)))
      )
      (setq device# 0)
    )
  ) ; End init_vars1

  (defun init_vars2 ()
    (if (not PLOTSTYLE-DEVICE)(setq PLOTSTYLE-DEVICE "None"))
         (setq  plotstyle-list (make_plotstyle_list))
          (if (and PLOTSTYLE-DEVICE (member PLOTSTYLE-DEVICE plotstyle-list))
      (setq plotctb# (- (length plotstyle-list) (length (member PLOTSTYLE-DEVICE plotstyle-list)))
      )
      (setq plotctb# 0)
    )
  ) ; End init_vars2

;;===============================================


And this the DCL

Code: [Select]
printview : dialog {label = "Print Views 2006";                                                     
: spacer { height = 1;}
: row {                                                                                           
    : boxed_column { label = "< Selecteer Views> ";                                                     
      : list_box { key = "viewbox";  width = 25; height = 20; multiple_select = true; }             
                                                                                                 
   
: spacer { height = 1;}


: row
           { : button { key = "selall"; label = "Select All";}
             : button { key = "clrall"; label = "Clear All";}
           } }


    : column {                                                                                     
      : radio_column { label = "< Selecteer Papier Formaat > "; key = "papierformaat";                           
        : radio_button { label = "A4 210x297 mm"; key = "ISO A4 (210.00 x 297.00 MM)";}             
        : radio_button { label = "A3 297x420 mm"; key = "ISO A3 (297.00 x 420.00 MM)"; value = "1";}
      }                                                                                             


: spacer { height = 1;}
      : boxed_row { label = "< Selecteer Printer >";                                                         
        : popup_list { key = "printers"; width = 30;}                                             
      }

      : boxed_column { label = "< Selecteer schaal >";                                                         
        : popup_list { key = "printschaallijst"; width = 30;}
        : toggle { key = "FIT";  label = "Fit to Paper";}   //not working yet.
      }

      : boxed_row { label = "< Selecteer Print Stijl >";                                                         
        : popup_list { key = "printstijlctb"; width = 30;}                                             
      }
    }
  }
  ok_cancel_help ;                                                                                       
}


« Last Edit: April 02, 2006, 05:02:06 AM by MvdP »

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #32 on: April 02, 2006, 05:02:48 AM »
Still no luck.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #33 on: April 02, 2006, 10:10:52 AM »
Try my lsp & dcl files to see if the functions "Clear ALL" & "Select All" work for you before you make any changes.
I see the file you posted has been changed from the version I was working on.
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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #34 on: April 03, 2006, 02:09:59 AM »
CAB I tried your version and has the same problem.After hitting the Select All button AutoCAD freezes.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #35 on: April 03, 2006, 09:56:42 AM »
I was testing in 2000, I'll test again today in 2004 & 2006.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #36 on: April 03, 2006, 03:23:54 PM »
Sorry to report that I tried the routine in 2004 and 2006 & the DCL did fine with Select All & Clear All.
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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #37 on: April 04, 2006, 02:23:23 AM »
That is very strange.I tried it on severall drawings with 30+ views and it freezes in each and every one.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #38 on: April 04, 2006, 08:40:09 AM »
Can you post or send me a test 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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #39 on: April 04, 2006, 09:39:54 AM »
Here is a test drawing with a bunch of views.With this file and this routine AutoCAD freezes.And i don't get it why this happens.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #40 on: April 04, 2006, 10:56:37 AM »
OK, replace the select_all routine.
Turns out my simple counter was too simple & would not count past 9.

Code: [Select]
  (defun select_all (/ sel cnt)
    (setq cnt 0
  sel ""
    )
    (repeat (length viewlijst)
      (setq sel (strcat sel (itoa cnt) " "))
      (setq cnt (1+ cnt))
    )
    (set_tile "viewbox" sel)
  )
« Last Edit: April 04, 2006, 10:59:41 AM by CAB »
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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #41 on: April 05, 2006, 03:06:45 AM »
Thanks CAB it is working great.If you don't mind i have another question which i cant figure out.I have added an toggle in the dcl for setting scale to fit and then i want my pulldownlist to grey-ed ou and then of course set my plot scale to fit. But as mentioned before i cant figure this one out.
Here is the code what i got so far.

Code: [Select]
printview : dialog {label = "Print Views 2006";                                                     
: spacer { height = 1;}
: row {                                                                                           
    : boxed_column { label = "< Selecteer Views> ";                                                     
      : list_box { key = "viewbox";  width = 25; height = 20; multiple_select = true; }             
                                                                                                 
   
: spacer { height = 1;}


: row
           { : button { key = "selall"; label = "&Select All";}
             : button { key = "clrall"; label = "&Clear All";}
           } }


    : column {                                                                                     
      : radio_column { label = "< Selecteer Papier Formaat > "; key = "papierformaat";                           
        : radio_button { label = "A4 210x297 mm"; key = "ISO A4 (210.00 x 297.00 MM)";}             
        : radio_button { label = "A3 297x420 mm"; key = "ISO A3 (297.00 x 420.00 MM)"; value = "1";}
      }                                                                                             


: spacer { height = 1;}
      : boxed_row { label = "< Selecteer Printer >";                                                         
        : popup_list { key = "printers"; width = 30;}                                             
      }

      : boxed_column { label = "< Selecteer schaal >";                                                         
        : popup_list { key = "printschaallijst"; width = 30;}
        : toggle { key = "FIT";  label = "Fit to Paper";}
      }

      : boxed_row { label = "< Selecteer Print Stijl >";                                                         
        : popup_list { key = "printstijlctb"; width = 30;}                                             
      }
    }
  }
  ok_cancel_help ;                                                                                       
}



Code: [Select]
(defun getnames (tablename / data result)
  (while (setq data (tblnext tablename (null data)))
    (setq result (cons (list (cdr (assoc 2 data))
                             (cdr (assoc 40 data))
                             (cdr (assoc 41 data))
                       ) ;_ end of LIST
                       result
                 ) ;_ end of CONS
    ) ;_ end of SETQ
  ) ;_ end of WHILE
) ;_ end of DEFUN

  ;;--------------------------------------------------------------------
  ;help message for dialog box.
  (defun txtbox_infohelp ()
    (alert
      (strcat
        "Deze routine print de geselecteerde views naar de standaard Printer.       \n\n"
        "Deze views worden geprint op de geselecteerde schaal en peninstellingen.\n"
        "Orientatie word automatisch geregeld.\n"
        "Klik op OK om dit venster te sluiten.\n\n"
        "Please report any problems you may have.\n\n"
       )
    )
  )
  ;;--------------------------------------------------------------------



;Start routine
(defun c:printview3 (/           ocmd        ocmddia     oexpert
                    oosmode     viewlijst   dianummer   viewselect
                    papierformaat           teller      item
                    orientatie  viewnaam    hoogte      breedte
                   ) ;Save values of variables to change

(setvar "cmdecho" 1)


  (init_vars1)
  (make_device_list)
  (init_vars2)
  (make_plotstyle_list)

  (setq viewlijst ;Get list of views and sort it
         (vl-sort (getnames "view")
                  (function (lambda (a b) (< (nth 0 a) (nth 0 b))))
         ) ;_ end of VL-SORT
  ) ;_ end of SETQ
 
  (setq dianummer (load_dialog "printview3.DCL")) ;Start dialog to select views
  (new_dialog "printview" dianummer)
  (setq teller 0)
  (start_list "viewbox")
  (repeat (length viewlijst)
    (add_list (car (nth teller viewlijst)))
    (setq teller (+ 1 teller))
  ) ;_ end of REPEAT
  (end_list)


 ;;;--- Sort the plotstylelist
  (setq printstijl (acad_strlsort plotstyle-list))
  ;;;--- Add the list to the dialog box
  (start_list "printstijlctb" )
  (mapcar 'add_list plotstyle-list)
  (end_list)

 ;;;--- Sort the plotterlist
  (setq printer (acad_strlsort device-list))
  ;;;--- Add the list to the dialog box
  (start_list "printers" )
  (mapcar 'add_list device-list)
  (end_list)

(setq printschaallijst(list "1=1" "1=2" "1=5" "1=10" "1=20" "1=50" "1=100" "1=200" "1=500" "1=1000"))
(start_list "printschaallijst")
(mapcar 'add_list printschaallijst)
(end_list)

  (action_tile
    "accept"
    "(progn
     (setq viewselect (get_tile \"viewbox\"))
     (setq papierformaat (get_tile \"papierformaat\"))
     (setq printschaal (get_tile \"printschaallijst\"))
     (setq printers (get_tile \"printers\"))
     (setq printctb (get_tile \"printstijlctb\"))
    (done_dialog)
    )"
  )

 
;;  ) ;_ end of ACTION_TILE


  ;;  CAB start
  (set_tile "viewbox" (if viewselect viewselect "")) ; default to none selected
  (action_tile "selall" "(select_all)")
  (action_tile "clrall" "(set_tile \"viewbox\" \"\")")
 (defun select_all (/ sel cnt)
    (setq cnt 0
  sel ""
    )
    (repeat (length viewlijst)
      (setq sel (strcat sel (itoa cnt) " "))
      (setq cnt (1+ cnt))
    )
    (set_tile "viewbox" sel)
  )
  ;;  CAB end vl-list


 
(set_tile "printers" "6")
(set_tile "printstijlctb" "11")
(set_tile "printschaallijst" "2")
   
(action_tile "fit" "(mode_tile \"printschaallijst\" (- 1 (atoi $value))))")

  (action_tile "cancel" "(setq viewselect \"\")(done_dialog)")
  (action_tile "help" "(txtbox_infohelp)")
(start_dialog)
  (unload_dialog dianummer) ;If a view is selected, then print it
  (if (/= viewselect "")
    (progn (setq viewselect (read (strcat "(" viewselect ")"))) ;Convert string to list
           (setq teller 0)
           (repeat (length viewselect) ;Loop to process all selected views
             (setq item     (nth teller viewselect)
                   viewnaam (car (nth item viewlijst)) ; Name of view
                   hoogte   (cadr (nth item viewlijst)) ; Height of view
                   breedte  (car (cddr (nth item viewlijst))) ; Width of view
             ) ;_ end of SETQ
             (if (< breedte hoogte) ;Set paperorientation according to height/width
               (setq orientatie "Portrait")
               (setq orientatie "Landscape")
             ) ;_ end of IF
             (command "-plot" ; Print view
                      "yes" ;Detailed plot configuration? [Yes/No] <No>
                      "model" ;Enter a layout name or [?] <Model>
(nth (atoi printers) device-list) ;Enter an output device name
papierformaat ;Enter paper size:
                      "M" ;Inches/milimeters
                      orientatie ;Enter drawing orientation:
                      "n" ;Plot upside down:
                      "view" ;Enter plot area:
                      viewnaam ;Enter view name:
(nth (atoi printschaal) printschaallijst);Enter plot scale
                      "Center" ;Enter plot offset
                      "y" ;Plot with plot styles:
(nth (atoi printctb) plotstyle-list) ;Enter plot style table name
                      "y" ;Plot with lineweights:
                      "n" ;Remove hidden lines
                      "n" ;Write the plot to a file [Yes/No] <N>:
                      "n" ;Save changes to model tab [Yes/No]? <N>
                      "y" ;Proceed with plot [Yes/No] <Y>:
             ) ;_ end of COMMAND

             (setq teller (+ 1 teller))
           ) ;_ end of REPEAT
    ) ;_ end of PROGN
  (princ "\nJe hebt geen views geselecteerd en er is dus ook niets geprint.....!") ; Display text if no view or cancel is selected
  ) ;_ end of IF

  (princ)
) ;_ end of DEFUN
;|«Visual LISP© Format Options»
(72 2 1 2 T "end of " 60 9 1 1 0 T nil T T)
;*** DO NOT add text below the comment! ***|;
;;;; end routine;;;;;;;;

;;===============================================
(defun make_device_list (/ curdwg pslayout)
  (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object))
    pslayout (vla-get-Layout (vla-get-PaperSpace curdwg))
  )
  (vla-RefreshPlotDeviceInfo pslayout)
  (vlax-safearray->list (vlax-variant-value (vla-GetPlotDeviceNames pslayout)))
) ; End make_device_list


(defun make_plotstyle_list (/ curdwg pslayout)
  (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object))
    pslayout (vla-get-Layout (vla-get-PaperSpace curdwg))
  )
  (vla-RefreshPlotDeviceInfo pslayout)
  (vlax-safearray->list (vlax-variant-value (vla-GetPlotStyleTableNames pslayout)))
) ; End make_plotstyle_list

;;===============================================
  (defun init_vars1 ()
    (if (not PLOTALL-DEVICE) (setq PLOTALL-DEVICE "None"))
         (setq  device-list (make_device_list))
          (if (and PLOTALL-DEVICE (member PLOTALL-DEVICE device-list))
      (setq device# (- (length device-list) (length (member PLOTALL-DEVICE device-list)))
      )
      (setq device# 0)
    )
  ) ; End init_vars1

  (defun init_vars2 ()
    (if (not PLOTSTYLE-DEVICE)(setq PLOTSTYLE-DEVICE "None"))
         (setq  plotstyle-list (make_plotstyle_list))
          (if (and PLOTSTYLE-DEVICE (member PLOTSTYLE-DEVICE plotstyle-list))
      (setq plotctb# (- (length plotstyle-list) (length (member PLOTSTYLE-DEVICE plotstyle-list)))
      )
      (setq plotctb# 0)
    )
  ) ; End init_vars2

;;===============================================


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Help with Print Views Routine...
« Reply #42 on: April 05, 2006, 08:09:57 AM »
Try this
Code: [Select]
(action_tile "fit" "(mode_tile \"printschaallijst\" (if (= $value \"1\") 1 0))")
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.

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #43 on: April 05, 2006, 09:59:18 AM »
This is not working for me..

MvdP

  • Guest
Re: Help with Print Views Routine...
« Reply #44 on: April 11, 2006, 04:17:29 AM »
Previous issue not solved yet but here is another question.
Is it possible to add a quantity dropdown list (as in the common autocad plot dialog)in this routine.
There is as far as i know not a variable in cad.How can this be done so it will pint in sequence the the quantity i select.?
(example 1,2,3,4,1,2,3,4,1,2,3,4  and NOT 1,1,1 2,2,2,3,3,3,4,4,4)
« Last Edit: April 11, 2006, 04:38:29 AM by MvdP »