Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISPs running slower

4 REPLIES 4
Reply
Message 1 of 5
christopher.l.evans
306 Views, 4 Replies

LISPs running slower

I have 24 LISP that are all the same except for referencing different Xref layers in the drawing packages.  What I notice is when I have made some changes to the packages then run the corrispoding LISP to generate PDF's by the 3rd to 4th one its taking 4 times longer to run.  I am wondering if I need to clear something when the LISP ends to prevent this or???

4 REPLIES 4
Message 2 of 5

Can you post one of the lsp files?

Message 3 of 5

 

(defun C:PDFPLOT (/ layouts num )
	(setq layouts (layoutlist));list all paperspace layouts in the drawing
	(setq num 0);zero counter
	(repeat (length layouts);Repeats the plot command on all layouts
		(cond
			((= (nth num layouts) "Sheet 5");flags sheet 5 for layer varibles
				(command "-layer" "p" "n" "ER400|A-CTRAY,ER400|A-EFIXT,ER400|A-EQPM" "");turns on/off xref drawing layers for plot
			);Sheet 5 Condition
			((= (nth num layouts) "Sheet 6");flags sheet 6 for layer varibles
				(command "-layer" "p" "p" "ER400|A-EQPM" "");turns on/off xref drawing layers for plot
			);;Sheet 6 Condition
			((= (nth num layouts) "Sheet 7");flags sheet 7 for layer varibles
				(command "-layer" "p" "n" "ER400|A-EQPM" "p" "p" "ER400|A-EFIXT" "");turns on/off xref drawing layers for plot
			);Sheet 7 Condition
			((= (nth num layouts) "Sheet 8");flags sheet 8 for layer varibles
				(command "-layer" "p" "n" "ER400|A-EFIXT" "p" "p" "ER400|A-CTRAY" "");turns on/off xref drawing layers for plot
			);Sheet 8 Condition
		);; cond
		(command ".-PLOT" "Y" (nth num layouts) "DWG TO PDF.PC3" "ANSI D (34.00 X 22.00 INCHES)" "I" "L" "N" "W" "0,0" "34,22" "1:1" "C" "Y" "Black & White.ctb" "Y" "Y" "N" "N" (STRCAT (GETVAR "DWGPREFIX") (strcat (vl-filename-base (getvar "dwgname")) " ") (GETVAR "CTAB") ".pdf") "N" "Y");pdf plot routine
		(setq num (1+ num)); Increment counter
	); end repeat
	(command "-layer" "p" "p" "ER400|A-EFIXT,ER400|A-EQPM" "");turns plot layers off back on
); end

 

Message 4 of 5

Nothing pops out as incorrect on your routine.  Does the problem get continually worse?  That is, you said it takes four times as long on the fourth pdf sheet, does it take eight times as long on the eighth sheet?  The display will need to regen after turning layers on and off.  Does the level of detail or amount of detail increase as the page numbers increase?

Message 5 of 5

It's not the sheet but the next package I open in Autocad then I load its corresponding LISP.  I eventually just close and reopen Autocad because of the time it takes to process.  Backgroundplot is set to 0, if I try using 1 or 3 I get the another job is already in progress dialog box.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost