- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I write AutoLisp scripts poorly at best, but I have created a function called csplot (cut sheet plot) that allows me to make multiple PDFs from 1 Paper Space Tab. I designate the number of sheets, click the bottom left corner of the 8.5x11 borders and send the specified number of PDFs to a specific location where I combine them into 1 PDF.
I know using individual tabs would solve the problem through Plot/Publish, but it isn't practical because of the volume of these individual sheets we make (it's hundreds throughout the project).
I Always space my sheets the same in these viewports, and I realized that if I know how many sheets I'm making, I can automate the window selection process for the plots based on the first border I click. How do I modify the location of a variable with the Getpoint info?
I attempted googling the answer, but I'm not familiar enough with the AutoLisp Terms to find what I'm looking for.
Below is the function as it is. I intend on starting the loop after the getpoint, but I felt context would be helpful.
;CSPLOT.lsp
(
defun C:csplot ()
(command "FILEDIA")
(command "0")
(setq a 1)
(setq times (getint "\nEnter Number of Sheets: "))
(while (<= a times)
(setq startpoint (getpoint "Click on bottom left corner of 8.5 x 11 border"))
(setq str2 (itoa a))
(setq str (strcat "C:\\CSPLOT\\" str2 ".pdf"))
(command "-PLOT")
(command "YES")
(command " ")
(command "DWG TO PDF.PC3")
(command "LETTER")
(command "inches")
(command "PORTRAIT")
(command "NO")
(command "WINDOW")
(command startpoint)
(command "@8,10.2")
(command "1:1")
(command "CENTER")
(command "yes")
(command "W2K_LJ5")
(command "YES")
(command "YES")
(command "NO")
(command "NO")
(command str)
(command "N")
(command "Y")
(princ)
(princ)
(setq a (1+ a))
(princ)
(princ)
)
(command "FILEDIA")
(command "1")
)
Solved! Go to Solution.