Page Setup doesn't change when run from Script but works when done from within ACAD

Page Setup doesn't change when run from Script but works when done from within ACAD

c.niven
Participant Participant
493 Views
3 Replies
Message 1 of 4

Page Setup doesn't change when run from Script but works when done from within ACAD

c.niven
Participant
Participant

I have a lisp for importing a page setup and then applying that page setup to all layouts. When run from either ScriptPro or Multi-Batch the page layout is applied but the page in the layout tab is not updated (the border is going off the page).

 

If I run the lisp from within AutoCAD or apply the page setup manually the paper view updates and the border fits nicely on the sheet. Has anyone else experienced this or know a workaround?

 

The lisp I am using is from this post:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/import-page-setup-and-make-it-curren...

 

If script is run from outside ACAD:

cniven_0-1632237576715.png

 

If run from within ACAD:

cniven_1-1632237597974.png

 

0 Likes
Accepted solutions (1)
494 Views
3 Replies
Replies (3)
Message 2 of 4

c.niven
Participant
Participant

I just checked the current page layout after running the script vs the imported layout and it appears that it is not correctly switching the plot area to LAYOUT but is instead setting it to EXTENTS

0 Likes
Message 3 of 4

pendean
Community Legend
Community Legend
Turn LOGFILEON (look up usage, how to turn it off, and where to locate that log file on your computer), run that LISP through your batch-processing tools, then open it and find what error messages where created if any so you can know for sure what the problem really is.

Share that here if you find something not easy to fix.

HTH
Message 4 of 4

c.niven
Participant
Participant
Accepted solution

Reviewing the log files it doesn't show any errors. I have figured out a workaround for now. I added the normal -PAGESETUP command to the end of the script. After running my lisp I correct the plot area using the -PAGESETUP command and setting the plot area to Layouts and scale to 1:1. Seems to be working both manually running the script and when used from the batch utility.

0 Likes