Command for advancing to the next layout
Command for advancing to the next layout
(OP)
I am looking for the command line command to advance to the next layout. I don't want to use layout names since they could be different.
Thanks in advance.
Thanks in advance.





RE: Command for advancing to the next layout
why do you need a command line command?
I use the shortkeys ctrl+pageup/down
Lothar
ADT 2004
ACAD 2002
RE: Command for advancing to the next layout
RE: Command for advancing to the next layout
Thanks
RE: Command for advancing to the next layout
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: Command for advancing to the next layout
I have a drawing Library of 700+ drawings. Each drawing contains 2 to 15 layouts. I want to set up lisp programs to do batch changes to plot options, ploting & block updates. None of the drawings have the same layout names, so that isn't an option. Is there no command to advance to the next layout?
Thanks again
RE: Command for advancing to the next layout
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: Command for advancing to the next layout
(vl-load-com)
(setq ThisDwg (vla-Get-ActiveDocument (vlax-Get-Acad-Object)))
(vlax-for each (vla-get-Layouts ThisDwg)
(vla-put-activelayout ThisDwg each)
(YOUR STUFF GOES HERE)
)
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: Command for advancing to the next layout
Thanks
RE: Command for advancing to the next layout
I am warming up by writing a lisp program to print all the layouts. I can get them all to print off, but they are in layout alphabetical order and not the order they appear in AutoCAD.
Any ideas how to fix this?
Thanks
RE: Command for advancing to the next layout
This is the lisp program I am working on.
(vl-load-com)
(setq ThisDwg (vla-Get-ActiveDocument (vlax-Get-Acad-Object)))
(vlax-for each (vla-get-Layouts ThisDwg)
(vla-put-activelayout ThisDwg each)
(COMMAND "-ZOOM" "E")
(COMMAND "-PLOT" "Y" "" "Default Windows System Printer.pc3" "LETTER" "" "" "" "E" "" "" "" "" "" "" "" "" "" "Y" "n" )
)
This is the command line info. It seems to want to update the drawing the way I want, but it kills it after each drawing is completed.
Command: layup
Regenerating model - caching viewports.
ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: E
Command: PLOT Detailed plot configuration? [Yes/No] <No>: Y
Enter a layout name or [?] <Model>: Enter an output device name or [?] <None>:
Default Windows System Printer.pc3 Enter paper size or [?] <Letter>: LETTER
Enter paper units [Inches/Millimeters] <Inches>: Enter drawing orientation
[Portrait/Landscape] <Landscape>: Plot upside down? [Yes/No] <No>: Enter plot
area [Display/Extents/Limits/View/Window] <Display>: E Enter plot scale
(Plotted Inches=Drawing Units) or [Fit] <Fit>: Enter plot offset (x,y) or
[Center] <0.00,0.00>: Plot with plot styles? [Yes/No] <Yes>: Enter plot style
table name or [?] (enter . for none) <Default R14 pen assignments.ctb>:
Command: LAYUP Unknown command "LAYUP". Press F1 for help.
Command: LAYUP Unknown command "LAYUP". Press F1 for help.
Command: LAYUP Unknown command "LAYUP". Press F1 for help.
Command: LAYUP Unknown command "LAYUP". Press F1 for help.
Command: LAYUP Unknown command "LAYUP". Press F1 for help.
Command: Y Unknown command "Y". Press F1 for help.
Command: n Unknown command "N". Press F1 for help.
Command: Restoring cached viewports - Regenerating layout.
ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: E
Command: PLOT Detailed plot configuration? [Yes/No] <No>: Y
Enter a layout name or [?] <VENT TUBE>: Enter an output device name or [?]
<\\S1\HP LaserJet 8150 Series PS>: Default Windows System Printer.pc3 Enter
paper size or [?] <Letter>: LETTER Enter paper units [Inches/Millimeters]
<Inches>: Enter drawing orientation [Portrait/Landscape] <Landscape>: Plot
upside down? [Yes/No] <No>: Enter plot area
[Display/Extents/Limits/View/Window] <Extents>: E Enter plot scale (Plotted
Inches=Drawing Units) or [Fit] <1=1.01>: Enter plot offset (x,y) or [Center]
<Center>: Plot with plot styles? [Yes/No] <Yes>: Enter plot style table name or
[?] (enter . for none) <monochrome.ctb>: Plot with lineweights? [Yes/No] <Yes>:
Scale lineweights with plot scale? [Yes/No] <No>: Plot paper space first?
[Yes/No] <No>: Hide paperspace objects? [Yes/No] <No>: Write the plot to a file
[Yes/No] <N>: Save changes to page setup [Yes/No]? <N> Y Proceed with plot
[Yes/No] <Y>: n
Command: ; error: no function definition: LEYPLOT
Command: *Cancel*
Command: *Cancel*
Command: <Switching to: Model>
Restoring cached viewports.