Multiple drawings in Model - Export or Print All to PDF

Does someone use or can provide insights on how to create a LISP routine that performs the subject line operation? I am now a novice programmer capable of making relatively simple modifications to LISP programs only.

Comments

  • DFLY
    edited October 2023
    It's a bit tricky I think. First you would need to determine the drawing area for each sheet in model space. And then print each area consecutively. The only way I can think of how to do, is to have a dedicated layer to put rectangles around each drawing sheet. A simple solution would be to use the layout tabs to show one drawing per layout and then publish the layouts. No code needed. I'v attached an example of what I mean. It's a bit crude, because I don't work that way. But I have received plenty of drawings from companies that do.
    Actually after a bit of searching, it doesn't seem possible to print from the command line. You can call the print dialogue box from command line, but that's no good for printing and setting windows with lisp, at least it makes it way more complicated if at all possible.
  • With the -Plot command (note the dash) you can print from the command line.
  • Yes can plot all sheets in model space, but as suggested using layouts makes life so much easier. There is lots of examples of creating layouts with a fixed title block then using a mview at desired scale.

    One example is pick a point on the objects enter a scale and a layout is auto made.

    I have auto make layouts but its more for Civil works where you have sheets of a fixed size and scale, but in saying that part 2 is plotting the layouts with mixed scales and orientations. Yes lisp using -PLOT.

    Back to you provided you have say a block re rectang, at desired scale yes can be done. The attached will need changes to suit your dwg.

  • Clint2U
    edited October 2023
    All (3) three responses to date are highly valued.
    Thanks to each of you!

    ---

    As an experienced CAD user, I am a layout fan and use it for all self-created scaled drawings at former employers in full-time design drafting positions.

    As a new employee and not now directly working in CAD every day, I offered my assistance to a CAD user in an environment where 2D and model space are the accepted standard work method.

    Among other issues, I was called on to provide ideas on solutions for this issue.

    ALANH,
    Your programmed solution will be explored.
  • It's been over 30 years, but I think this is what we used to do:
    - Select the rectangle around drawing 1 in your file.
    - Use Zoom OBject to make that drawing the current view.
    - Use -View Save to give that view a name, say DWG1.
    - Repeat for each drawing.
    Then the lisp function can print with Plot Area = View = DWG1, etc.
    Or it can do a -View Restore of each named view and print with View = Current view.
  • It's been over 30 years, but I think this is what we used to do:
    - Select the rectangle around drawing 1 in your file.
    - Use Zoom OBject to make that drawing the current view.
    - Use -View Save to give that view a name, say DWG1.
    - Repeat for each drawing.
    Then the lisp function can print with Plot Area = View = DWG1, etc.
    Or it can do a -View Restore of each named view and print with View = Current view.

    Anthony,

    Your response provides a practical solution.

    Personally, I realize and have leveraged layout's benefits in this regard but this is not a current reality. Perhaps, it will be here.

    Thanks,
    Clint
  • Ok Plot all in Model space. This is just a start as it expects fixed size sheets, if different scales then need to add that factor compared to title block.

    Check out Plotting by Maratovich on other forums.
  • Hi ALANH,

    I thank you for the LISP file and direction. I will also search for the thread you suggest.
  • Checking in to see if you found or created a solution?

    In a recent Lisp Training session I did for a client, one of the sample Lisp programs redefined the Save command to ask if you wanted to Export all the Layout Tabs to PDFs... When exiting the Dwg, the prompt appeared and the user could simply hit "Y" or "N" to execute the sequence. I also showed how to create two separate functions to make either the "Y" or "N" the default, so that Enter or Spacebar would be an option, etc...
  • vinceaman said:

    Checking in to see if you found or created a solution?

    In a recent Lisp Training session I did for a client, one of the sample Lisp programs redefined the Save command to ask if you wanted to Export all the Layout Tabs to PDFs... When exiting the Dwg, the prompt appeared and the user could simply hit "Y" or "N" to execute the sequence. I also showed how to create two separate functions to make either the "Y" or "N" the default, so that Enter or Spacebar would be an option, etc...

    I am constrained to the company-standard model space-based workflow. Yours is a great idea!
  • Clint, You could easily create Views in Model space with specific Sheet Names, then Export/Print the views that exist on Exit... not hard to automate ;-)
  • Look seriously at using layouts get out of the 80's you will never look back. There are so many tools out there to make layouts, like pick a point enter scale, layout is made.

    From a civil point of view a road job 80+ layouts made in 1 go, each layout is twisted to match the orientation of a road centreline. Grid layouts and so on.

    For us press 1 menu option and watch the layout sheets being plotted.
  • Clint2U
    edited November 2023
    Hi again Alan,

    To be clear, I am a fan of layouts, setting up, introducing, teaching others, and leveraging the significant advantages of layouts on a daily basis at past employers for over twenty years.
    In a lengthier tenure, I even produced layout-based diagrams.

    My current landscape has me outside of direct CAD production.
    The detailers here include many seasoned CAD users in my new industry.
    As a newbie and out of deference to industry veterans, I tread lightly.

    While I was an early adopter, there were negative views back in 2000 and there are many that maintain a negative view of the "paper space" or layout paradigm for various reasons.
    I feel this is simply human nature in resisting change and the fear of an unfamiliar workflow.

    I may approach layout use in due time.
    I am still within my first year in a design R & D role.