Skip to main content

Module model

Module model 

Source
Expand description

The instructions block: everything an instructions document authors.

An instructions document places its target assembly as one grounded component and keeps the authored instructions in this top-level block. The block is plain data: a tree of steps. A step adds parts and may hold child steps, the group it installs: the children build the group (and see only it), then the step places it over what its earlier siblings built. Reading order is children first, then their parent, depth first. A sub-assembly is such a step: its parts’ steps are its children. Views are PMI views of the document, named by id; everything else a step shows is here.

Schema 1 kept chapters (one per assembly level) of flat steps; it reads as the same tree (Instructions::from_value).

Structs§

Add
Parts one step adds: one part, at one or more occurrences.
Arrow
Callout
FrontMatter
The cover and the lists before the steps.
Instructions
OccurrenceChange
One occurrence in a re-target diff.
PartsRow
One row of the parts list.
Retarget
A re-target waiting for approval: what changed between the two assembly revisions and the steps it touches.
Signoff
Step
Target
One revision of the target assembly.
Template
The printed page template, one per document.
ToolUse
A tool a step uses: a tools-library entry by id, with a snapshot of its name and spec so printed and offline copies need no server.
Torque

Enums§

CalloutKind
Orientation
Style
How a document’s steps are drawn: in the PDF, the step images, the HTML player and the in-app player alike.
TorqueSource

Constants§

BLOCK_KEY
The document key the block is stored under.
DOCUMENT_CLASS
The documentClass value of an instructions document.
EXTENSION
The file extension of an instructions document, dot included.
FASTENER_ATTRIBUTE
The part attribute that marks a fastener (bool).
SCHEMA
The block’s schema version.
SERIAL_TRACKED_ATTRIBUTE
The part attribute that marks a serial-tracked part (bool).
STEPS_PER_PAGE
The steps-per-page counts a template offers.
TORQUE_ATTRIBUTE
The part attribute holding a fastener’s torque, as text with its unit.

Functions§

for_each_step_mut
f on every step of the tree, parents before children.
retain_steps
Keep the steps keep accepts, at every level.