sheet set
auto_sheet_setGroups AutoCAD layouts into a publish-ready sheet set, writes a .dsd file, and can plot a multi-page PDF with plot-style checks and optional discovery.
Instructions
Group shopdrawings into one publish set and, with publish, plot it.
Each entry is {dwg, layout, setup?}: the drawing to take the sheet from,
the layout tab on it, and optionally the page setup to plot that sheet with
(blank = the layout's own). dwg may be relative to base_dir.
With discover (and no entries) the sheet list is read from the tree
under base_dir instead of being supplied: every drawing's paper-space
layouts, minus the empty ones, ordered by drawing then layout. include /
exclude narrow that scan.
The set is written as a .dsd sheet list at dsd_path -- the file
AutoCAD's Publish dialog and -PUBLISH both read -- and pdf_path is
the single multi-page PDF the set targets (default: dsd_path with a
.pdf suffix). publish runs -PUBLISH on the live backend and
reports the PDF it wrote; a row whose drawing is not on disk is reported in
issues and left out, since -PUBLISH fails the whole job on it.
Publishing holds the seat clear of the DST File Not Found dialog (the Sheet
Set Manager is stopped from opening itself for the duration, and a box that
still appears is pressed away), and judges success by the PDF on disk: see
publish_set for the state it reports.
Before publishing, every sheet's layout is read and its plot style checked
against the styles AutoCAD has installed. A sheet naming a style that is not
installed -- -PUBLISH would plot it anyway, leaving a warning only in the
plot log -- blocks the run: nothing is plotted and plot_styles names the
gap. Fix the layout's page setup (or install the style file) and publish
again; pass allow_missing_styles to publish despite a known gap (the
overridden flag in plot_styles says the override was used).
A set published straight from discovery comes out in discovery order --
by drawing file name -- which is not the reference OUTPUT's order. order
reorders the sheets the way OUTPUT groups them: by the sheet number a layout
ends with (every .01 sheet, then every .02), and by code inside a
run. The sheets that belong to no run, or that close one, are named in
pin ({"layout": ..., "where": "first" | "last"}): the drawing list
goes first, the elevation and the title last in their own run. A
layout whose name carries no sheet number (the elevation is laid out as
plain Layout1) names the run it closes: "run": "01". See
order_rows.
plot_style moves every sheet onto one plot style for the run -- the
project's own colour table (the profile's plot.style, and the default
when this is left blank), which is what gives OUTPUT its screened grey
background, where the INPUT layouts are not uniform -- and takes the change
back once the set is plotted, so no drawing is written. Because the run
replaces every layout's style anyway, a forced style is not blocked by the
styles the layouts already name: the change the seat did not take is in
plot_style_change, and what the undo put back in plot_style_restored.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "auto_sheet_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pin | No | ||
| order | No | ||
| entries | No | ||
| exclude | No | ||
| include | No | ||
| publish | No | ||
| base_dir | No | ||
| discover | No | ||
| dsd_path | No | ||
| pdf_path | No | ||
| plot_style | No | ||
| allow_missing_styles | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||