Jump to content

Print PDF Lisp-Need Changed From Layout to Model Space


Recommended Posts

Posted

Not sure why but everything I typed didn't save.  Again, I found the about Lisp.  It looks like it will work, but it's wanting to print from the Layout Tab.  I prefer Model Space.  Can someone take a glance at it and let me know what, if any, changes to make to make this happen?  Please and thank you.

Posted (edited)
(if (= (getvar "tilemode") 0)
  ;paperspace
  (command
   ".-Plot"             ;command
   "Yes"                ;detailed
   ""                   ;layout name
   "Dwg To PDF.pc3"     ;printername
   "ISO A1 (279.40 x 431.80 MM)"   ;papersize
   "Millimeters"        ;millimeters
   "Landscape"          ;landscape/portrait
   "No"                 ;plot upside down
   "E"                  ;plotarea (Display/Extends/Layout...)
   "Fit"                ;plotscale
   "0,0"                ;offset OR center
   "Yes"                ;plot with styles
   "acad.ctb"           ;plotstyle name
   "Yes"                ;plot with lineweights
   "No"                 ;scale lineweights with scale
   "No"                 ;plot paperspace last
   "No"                 ;remove hidden lines
   "No"                 ;write plot to a file
   "No"                 ;save changes to lay-out
   "Yes"                ;proceed with plot
  )
  ; modelspace
  (command
   ".-Plot"             ;command
   "Yes"                ;detailed
   ""                   ;layout name
   "Dwg To PDF.pc3"     ;printername
   "ISO A1 (279.40 x 431.80 MM)" ;papersize
   "Millimeters"        ;millimeters
   "Landscape"          ;landscape/portrait
   "No"                 ;plot upside down
   "E"                  ;plotarea (Display/Extents/Limits/View/Window)
   "Fit"                ;plotscale
   "Center"             ;offset
   "Yes"                ;plot with styles
   "acad.ctb"           ;plotstyle name
   "Yes"                ;plot with lineweights
   ""                   ;shade plot setting [As displayed/Wireframe/Hidden/Rendered] <as displayed>
   "No"                 ;write plot to a file
   "No"                 ;save changes to model-tab
   "Yes"                ;proceed with plot
  )
 )
)
	

 

Edited by rlx
Posted
15 hours ago, Jim Clayton said:

Not sure why but everything I typed didn't save.  Again, I found the about Lisp.  It looks like it will work, but it's wanting to print from the Layout Tab.  I prefer Model Space.  Can someone take a glance at it and let me know what, if any, changes to make to make this happen?  Please and thank you.

If you have a complex title block or you find it difficult to understand the lisp - attach an example dwg file with your title block.

Posted

Are you wanting to plot only 1 title block in "Model" or multiple this does make a difference. If you have multiple plot areas but using the one title block you can look at each one get the scale of the title block and plot it to correct sheet size.  

Posted (edited)

OP's code begins with

 (command "tilemode" "0")

This is a command and not a test to obtain the value of tilemode.

so the program actively forces autocad to switch to paperspace. This has nothing to do with the complexity of the titleblock. Code I posted only plots whatever value of tilemode. If you want  to actively switch to modelspace mode change code to

 (command "tilemode" "1")

But I'm not sure this is the kind of behavier OP wants. Be aware the number of prompts for model and paperspace are different.

Edited by rlx
Posted

Apologies for the delay.
BigAl: Only wanting 1 Title block and the contents within printed in Model.
Rlx:   For one reason or another I'm having trouble actually getting the above lisp to perform.  Not sure what the issue is.  Want to look into it further unfortunately I haven't had much time the past few days.  Plan on revisiting it when I get a chance.

Posted
6 minutes ago, Jim Clayton said:

Apologies for the delay.
BigAl: Only wanting 1 Title block and the contents within printed in Model.
Rlx:   For one reason or another I'm having trouble actually getting the above lisp to perform.  Not sure what the issue is.  Want to look into it further unfortunately I haven't had much time the past few days.  Plan on revisiting it when I get a chance.

 

no worries , this site will still be here when you're back 🐉

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...