Skip to content
Archee Docs

Sheets and reports

Declare drawing sheets with paper ids, views, a bill of materials and a title, and assemble reports from parts.

Sheets

A sheet belongs to a part. It sets the paper, the scale and the views.

sheet a0 landscape {
  scale 1:2
  view top = cut(gbox, through = a1)
  view front = proj(top)
  view side = proj(front, top)
  bom auto
  title from req
}
LineMeaning
sheet PAPER [landscape or portrait]The sheet and its paper id
scale 1:2The drawing scale
view NAME = cut(...), proj(...), detail(...)A view of a part, or a projection of another view
bom autoThe bill of materials from the assembly’s parts, or bom PATH
title from PATH or title "text"The title block source

Views are expressions over parts, so a projected view stays aligned with the view it comes from.

Paper ids

PAPER is an id from the paper table, in any case, or a custom W x H mm.

FamilyIdsStandard
ISO Aa0 to a4ISO 216
ISO Bb0 to b4ISO 216
ANSIansi_a to ansi_eASME Y14.1
ARCHarch_a to arch_e, arch_e1ASME Y14.1

An unknown id reports N01 with the nearest ids. The sheet size is data, so the same part moves from A3 to A1 by changing one id.

Reports

An artifact assembles a report, a bill of materials, a quote, a drawing set or a notice.

arc 0.1
use gbox = rec/gbox.arc

artifact report kind report {
  section "1. Select shaft dimensions" {
    prose "Shaft II torque is {gbox.T2:Nm:0}. The preliminary diameter is {gbox.shaft2.d_min:mm:1}."
  }
  for s in parts(gbox, kind = shaft) {
    section "Shaft" {
      prose "Shaft {s.name} has d1 = {s.d1}."
      table dims = s.out
    }
  }
  section "Drawings" {
    figure gbox.a0
  }
}
  • section "title" { ... } holds prose, table and figure lines.
  • prose strings interpolate values: {path}, {path:unit} and {path:unit:digits}.
  • table NAME = PATH.out lists the out values of a part. table NAME = PATH.bom lists its leaf parts as item, name, qty, material, designation and notes.
  • figure PATH places a sheet.
  • for s in parts(PATH, kind = KIND) repeats its sections once per part of that kind. {s.name} is the instance name.

A prose section remembers a hash of each value it shows once you run agentcad arc check rec/ --pin. When a value changes, agentcad arc check reports the section as stale (A02) so you review it.

Write the artifact with agentcad render rec/report.arc --to pdf (or docx, tex, typ, md). A bill or quote also writes --to csv. A figure embeds figures/NAME.png (or .svg, .pdf) beside the file.