0

I am working on automating the process of converting DWG files to PDF using AutoCAD. However, I am encountering some issues when executing the script. I would like to request your help regarding the following problems. Issue: In the AutoCAD script (.scr), even though I set the Portrait orientation, the output is being changed to Fit.

Script File: This issue arises when using an AutoCAD script in the .scr format.

Script:

-PLOT / No / Model / DWG To PDF.pc3 / ISO_full_bleed_A3_(420.00_x_297.00_MM) / Millimeters / Portrait / Scale to Fit / Y / QUIT

Error Message: Below is the error message received from the Design Automation API, specifically during the final phase (WorkItems) via the reportURL. The message shows the C command error and the orientation being set to Fit instead of Portrait.

Command: -PLOT Detailed plot configuration? [Yes/No] : Y ... Enter paper size or [?] <ANSI A (11.00 x 8.50 Inches)>: ISO_full_bleed_A3_(420.00_x_297.00_MM) Enter paper units [Inches/Millimeters] : M Enter drawing orientation [Portrait/Landscape] : Fit Command: C Unknown command "C". Press F1 for help. End AutoCAD Core Engine standard output dump. Error: AutoCAD Core Console output contains error(s).

Analysis: It seems that the issue arises from the C command error and the orientation being set to Fit instead of Portrait, which suggests there might be an issue with the script.

Requests: Could you confirm if there is a way to resolve the issue where Portrait orientation is being changed to Fit in the AutoCAD script (.scr)?

Please advise on why the C command error occurs and how to resolve it.

Are there any additional settings required in the AutoCAD script (.scr) to maintain the Portrait orientation correctly?

For your reference, I am using NestJS to convert the DWG file to PDF. Any additional help would be appreciated.

Thank you.

0

1 Answer 1

0

You're encountering the following prompt in your script:

Enter drawing orientation [Portrait/Landscape]:

This means AutoCAD is expecting a drawing orientation (Portrait or Landscape) at that point, but your script mistakenly provides something else—like FIT, which is not valid for this input.

Correct Usage Examples

Case 1: Minimal PLOT Script (No Configuration)

If you do not want to configure page setup details like paper size or orientation, you can skip them. In such cases:

  • Use No for the initial prompt.

  • If you don’t have a named page setup, leave that input blank (just press Enter between Model and .pc3 file).

  • This script simply sends the plot to file using default settings:


-PLOT\nNo\nModel\n\nDWG To PDF.pc3\noutput.pdf\nNo\nYes\n

Case 2: Full PLOT Script With Custom Configuration

If you want to specify detailed settings like paper size, orientation, scale, and style:


-PLOT\nYes\nModel\nDWG To PDF.pc3\nISO full bleed A3 (420.00 x 297.00 MM)\nM\nPortrait\nNo\nExtents\nFit\nCenter\nYes\nacad.ctb\nNo\n_A\noutput.pdf\nNo\nYes\n

  • Always provide Portrait or Landscape exactly at the orientation prompt.

  • "Fit" is intended for plot scale, not orientation.

  • _A in the end means As Displayed for shade plot settings

    This is how it gets run on APS Design Automation Engine

    enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.