×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Command for advancing to the next layout

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.

RE: Command for advancing to the next layout

Darken99,

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

(OP)
I want to write lisp programs that involve multiple layouts.

RE: Command for advancing to the next layout

(OP)
Anyone else have an idea.

Thanks

RE: Command for advancing to the next layout

In vlisp, get the Layouts collection and then toggle through it (set the property of the active layout to the one you want).

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: Command for advancing to the next layout

(OP)
I will explain what I want to do.

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

The way I suggested does that. Cycle through the layout collection (all of the layouts) and then one by one (setting them as active layout), run your setups.

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: Command for advancing to the next layout

Heres an example...

(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

(OP)
Ok, I will give that a try.

Thanks

RE: Command for advancing to the next layout

(OP)
Ok, I am now a step closer.
 
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

(OP)
Ok I am also working on a program for changing all my layouts to windows default printer.  I am getting an error at the end of the program.  It does what I want but I am unable to get it to batch because of the error.


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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources