Forma Sequence · DevCon 2027 class evidence
Build Your Construction Sequence in Revit. Play It Back with APS.
We wanted our planners to press play and watch an entire warehouse go up in the order they drew in Revit.
Luis Eduardo Cortés González, Hermosillo
Class film, 1 min 59 s: write the order as Revit Marks, play two published models in APS Viewer, then the same sequence realistic in the browser.
About the class
We’ll show how our numbering tool writes the planned order into Revit, then how the APS Viewer SDK brings both published models together. Three.js renders the same sequence as a realistic 3D view you can pause, reverse and inspect. Today, the viewer places untagged elements by construction stage, elevation and bay. Our next step is to use AI to predict when those elements belong in the build, using the tagged elements as examples.
What the class teaches
-
Write the planned sequence into Revit instance Marks and use the APS Viewer SDK to play two published models together.
Proven in code
Writes each element’s place in the sequence into its instance Mark, in one Revit transaction. NumberingScene.cs· lines 100–117using var t = new Transaction(doc, "Number by Line");t.Start();progress?.Plan(new PhaseEstimate("numbering.save", numbered.Count));progress?.Begin(new ProgressStage("Writing Marks", Total: numbered.Count, EstimateKey: "numbering.write", EstimateUnits: numbered.Count));foreach (var n in numbered){ if (progress?.CancelRequested == true) { t.RollBack(); throw new ProgressCancelledException(); } var e = doc.GetElement(new ElementId(n.Id)); var p = e == null ? null : MarkParameter(e); string? error = p == null ? "No Mark parameter" : p.IsReadOnly ? "Mark is read-only" : null; if (error == null) { try { if (!p!.Set(n.Mark)) error = "Revit refused the value"; } catch (Exception ex) { error = ex.Message; } } results.Add(new MarkWrite(n.Id, n.Category, n.Mark, error)); progress?.Report(results.Count);}NumberingScene.csrevit-numbering/Everything the numbering tool reads from or writes to Revit: the elements in the view, the planner’s clicked path, and each element’s instance Mark, written in one transaction.LineNumbering.csrevit-numbering/Core/Finds the elements the planner's line touches and gives each its Mark in order along the line (001, 002, …).models.mjssequence-viewer/Resolves both ACC items to their published viewables through the Data Management API (item tip, version, derivative).dashboard.mjssequence-viewer/Mints a short-lived, view-only APS token (viewables:read) for the browser; credentials stay on the server.viewer.jssequence-viewer/src/Starts the APS Viewer SDK and loads both models into one view on their shared Revit reference points.federation.jssequence-viewer/src/Builds one federation from both models and reads every element's Mark to choose its step.
-
Pause and reverse the same construction step in APS Viewer and the realistic Three.js view to inspect what appears.
Proven in code
Seeks forward or backward: shows or hides whole steps in the APS Viewer, in batches. sequence.js· lines 80–96export function seek(viewer, model, root, steps, previous, next) { if (previous === null) { viewer.clearSelection(); viewer.isolate([], model); viewer.hide(root, model); previous = 0; } const action = next >= previous ? 'show' : 'hide'; let batch = []; for (let i = Math.min(previous, next); i < Math.max(previous, next); i++) { for (const id of steps[i].ids) { batch.push(id); if (batch.length === 2000) { viewer[action](batch, model); batch = []; } } } if (batch.length) viewer[action](batch, model);}sequence.jssequence-viewer/web/The step model shared by both views: makes the steps, seeks forward and backward, and times the reveal.native-playback.jssequence-viewer/src/Plays, pauses and reverses the steps inside APS Viewer, holding the last complete frame while the next one draws.studio.jssequence-viewer/src/The realistic Three.js view of the same published geometry: each element is revealed along its own shape, step by step, with sky, materials and sun shadows.sequence.test.mjssequence-viewer/test/Node tests for step order, seeking both ways, and resolving each model to its own derivative.
-
Design a test for AI-predicted steps by hiding known Revit Marks and comparing predictions with the planner’s order.
Next step: proposed test, no code yet
The class presents this as the next step. The film shows the proposed test as an illustration; there are no prediction results yet.
How it fits together
- RevitThe numbering tool writes the order as instance Marks
- Autodesk FormaArchitecture and structure, published as two models
- APS Data ManagementFinds each model's published viewable
- APS Viewer SDKLines both models up and reads every Mark
- Three.jsThe same sequence, realistic, pause and reverse
Screenshots



What's in this repository
| Path | What it is |
|---|---|
revit-numbering | From the Revit add-in: the numbering command that writes instance Marks, its ordering core and its unit tests (C#). |
sequence-viewer | The sequence viewer (Node and browser JavaScript): a local server for ACC lookups and tokens, the APS Viewer playback, the Three.js realistic view, and tests. |
This repository is evidence for a class proposal, not a product. It holds a curated selection of the real source files behind the class. Identifiers are read from environment variables such as ACC_PROJECT_ID or replaced with placeholders, and credentials are read from the environment.