|

Automate AutoCAD PUBLISH with DSD and -PUBLISH

Use DSD sheet lists as a stable publishing input instead of rebuilding a multi-DWG sheet list inside every AutoLISP routine.

Main idea: Let AutoCAD’s DSD/PUBLISH system own the sheet list; let AutoLISP or SCR choose, validate and launch that known list.

Best use: Repeat issue sets that already use a saved DSD publish list.

Start with the manual workflow

Build and save the sheet list manually first. Confirm page setups, order and PDF behavior before automating -PUBLISH.

Build the automation in small layers

Step 1 — Create a known-good DSD

Where: PUBLISH dialog

Do this: Assemble the sheets, configure output and save the list.

Check: The DSD publishes correctly by hand.

Step 2 — Store the DSD in a controlled path

Where: Project or standards folder

Do this: Use a predictable file location.

Check: Automation can find the exact list.

Step 3 — Choose the launcher

Where: SCR or AutoLISP

Do this: Use -PUBLISH with the DSD path; AutoLISP can add validation or path logic.

Check: The command-line workflow is stable.

Step 4 — Run in a test project

Where: -PUBLISH

Do this: Launch the saved list and read the publish log.

Check: The same sheets and order are produced.

Step 5 — Add preflight before launch

Where: AutoLISP wrapper

Do this: Check DSD existence and any project prerequisites.

Check: Missing inputs fail before publishing starts.

Why DSD is useful for repeat issue sets

A DSD records a publish sheet list that AutoCAD already understands. If a weekly issue always contains the same group of drawings, the DSD can preserve that sheet assembly while your automation focuses on checking that the file exists, selecting the correct project version and launching -PUBLISH.

That is often more maintainable than teaching custom code to rebuild every sheet entry. The automation becomes a thin, verifiable wrapper around a native AutoCAD publishing object rather than a replacement for the whole publishing system.

What the code should control

  • DSD file path
  • -PUBLISH command
  • Publish log
  • Page Setup overrides embedded in the workflow
  • Output folder/naming configured by the DSD

What you should deliberately leave manual at first

Do not generate or edit DSD internals until you have a compelling reason. Reusing AutoCAD’s own saved list is usually easier to support.

Failure modes to design for

  • The DSD points to moved DWGs.
  • A referenced Page Setup/PC3 no longer exists.
  • The script launches the wrong DSD from a remembered default path.
  • The publish log is ignored after a partial failure.

When this becomes a production tool

Version or archive DSD files with issue sets so a published package can be reproduced later.

Official Autodesk references

Frequently asked questions

Why use DSD instead of coding the sheet list?

DSD is AutoCAD’s native saved publish list and already carries the sheet order and publish configuration.

Can -PUBLISH be run from a script?

Yes. Autodesk documents the command-line PUBLISH interface specifically for script control.

Does BACKGROUNDPLOT matter inside a script?

Autodesk notes that PLOT/PUBLISH commands used in SCR scripts are processed in the foreground regardless of BACKGROUNDPLOT.

Explore more in AutoLISP Plotting & PDF Automation.