Hi everyone,
I've been trying to automate a batch plotting process using an AutoLISP script in AutoCAD, but I'm encountering multiple errors that I can't seem to resolve. Here's a brief description of my script and the issues:
Script Overview:
The script is designed to batch plot multiple areas into PDFs based on predefined coordinates. It should set the plotting parameters and execute the plotting command for each area. However, when I run the script, the commands and parameters are not recognized as expected.
Errors:
- Commands like 'Y' and 'N' for confirming plot dialog options are not recognized ("Unknown command").
- The plotting device and configurations like 'Model', 'ALPDF', 'Inches', 'Landscape', 'Window' are not recognized and lead to repeated prompts.
- File paths and output commands are not executed correctly, causing the script to fail to save the plotted PDFs.
Here are some snippets of the error messages I am receiving:
```
Command: Y Unknown command "Y". Press F1 for help.
Command: _.delay Enter delay time in milliseconds: 2000
Command: -PLOT Detailed plot configuration? [Yes(Y)/No(N)] <No>: N
Batch name or [?]: Model
Enter plot configuration name <>: ALPDF <ALPDF> not found.
Enter plot configuration name <>: Output device name or [?] <DWF6 ePlot.pc3>: Inches <Inches> not found.
```
I have attempted different configurations and checked my syntax multiple times, but the errors persist. Here's a part of the script where the issue seems to manifest:
```
(command "-PLOT" "N" "Model" "ALPDF" "" "Inches" "Landscape" "Y" "Window"
(strcat (rtos xMin 2 2) "," (rtos yMin 2 2))
(strcat (rtos xMax 2 2) "," (rtos yMax 2 2))
"Fit" "Center" "Y" "" "Y" "N" "N" "N" "Y"
(strcat outputPath "Output_" (itoa (1+ (setq i (1+ i)))) ".pdf")
"Y")
```
Could anyone help identify what might be going wrong or suggest how to correct these issues? Any advice or examples of similar scripts that work correctly would be greatly appreciated.
Thank you in advance for your help!
Solved! Go to Solution.