@thatopen/services 0.35.1 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +66 -66
  2. package/dist/built-in/index.d.ts +13 -13
  3. package/dist/cli/lib/browser-session.d.ts +17 -0
  4. package/dist/cli/lib/config.d.ts +6 -0
  5. package/dist/cli.js +334 -38
  6. package/dist/cli.js.map +1 -1
  7. package/dist/core/browser-sign-in.d.ts +50 -0
  8. package/dist/core/browser-sign-in.test.d.ts +1 -0
  9. package/dist/core/builtin-recipes/index.d.ts +2 -2
  10. package/dist/core/builtin-recipes/layer-to-native.d.ts +19 -0
  11. package/dist/core/builtin-recipes/records-to-native.d.ts +43 -0
  12. package/dist/core/builtin-recipes/shapes-to-families.d.ts +9 -4
  13. package/dist/core/builtin-recipes/shared.d.ts +8 -11
  14. package/dist/core/channel.d.ts +1 -1
  15. package/dist/core/client.d.ts +46 -2
  16. package/dist/core/frag-items.d.ts +1 -1
  17. package/dist/core/history.d.ts +9 -9
  18. package/dist/core/op-builder.d.ts +2 -2
  19. package/dist/core/platform-client.d.ts +6 -3
  20. package/dist/core/project-recipes.d.ts +1 -1
  21. package/dist/core/recipes.d.ts +31 -5
  22. package/dist/index.cjs.js +23 -20
  23. package/dist/index.cjs.js.map +1 -1
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.es.js +4284 -3455
  26. package/dist/index.es.js.map +1 -1
  27. package/dist/vite-env.d.ts +1 -1
  28. package/docs/ai-quickstart.md +548 -548
  29. package/docs/builtin/paths.json +130 -130
  30. package/docs/cli/create.md +29 -29
  31. package/docs/cli/local-server.md +38 -38
  32. package/docs/cli/login.md +35 -32
  33. package/docs/cli/mcp.md +46 -46
  34. package/docs/cli/publish.md +31 -31
  35. package/docs/cli/run.md +26 -26
  36. package/docs/cli/serve.md +43 -43
  37. package/docs/cli/swap.md +30 -30
  38. package/docs/client/paths.json +2 -2
  39. package/docs/cloud/GaussianSplatConverter.md +43 -43
  40. package/docs/cloud/PointCloudConverter.md +53 -53
  41. package/docs/flow-architecture.md +393 -393
  42. package/docs/flow-plugin-guide.md +354 -354
  43. package/docs/platform-token.md +81 -81
  44. package/docs/rate-limits.md +133 -133
  45. package/docs/recipes-guide.md +243 -243
  46. package/docs/revit-collab-quickstart.md +445 -445
  47. package/docs/rhino-interop-quickstart.md +387 -387
  48. package/docs/sheet-sets-guide.md +69 -69
  49. package/package.json +1 -1
  50. package/resources/AGENTS.md +57 -57
  51. package/src/built-in/CDEManager/example.ts +214 -214
  52. package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
  53. package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
  54. package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
  55. package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
  56. package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
  57. package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
  58. package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
  59. package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
  60. package/src/built-in/ClashesManager/example.ts +283 -283
  61. package/src/built-in/GISManager/example.ts +355 -355
  62. package/src/built-in/ProjectManager/example.ts +124 -124
  63. package/src/built-in/UIManager/src/app/example.ts +97 -97
  64. package/src/built-in/UIManager/src/app/examples/AppState/example.ts +140 -140
  65. package/src/built-in/UIManager/src/app/examples/Banner/example.ts +159 -159
  66. package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +123 -123
  67. package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +124 -124
  68. package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +90 -90
  69. package/src/built-in/UIManager/src/app/examples/Modal/example.ts +163 -163
  70. package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +133 -133
  71. package/src/built-in/UIManager/src/app/examples/ProjectFileStorage/example.ts +150 -150
  72. package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +105 -105
  73. package/src/built-in/UIManager/src/clashes-panel/example.ts +183 -183
  74. package/src/built-in/UIManager/src/gis-panel/example.ts +163 -163
  75. package/src/built-in/UIManager/src/gis-properties-panel/example.ts +168 -168
  76. package/src/built-in/UIManager/src/git-history-panel/example.ts +70 -70
  77. package/src/built-in/UIManager/src/map-panel/example.ts +189 -189
  78. package/src/built-in/UIManager/src/models-list/example.ts +181 -181
  79. package/src/built-in/UIManager/src/settings-panel/example.ts +303 -303
  80. package/src/built-in/UIManager/src/topics-panel/example.ts +170 -170
  81. package/src/built-in/UIManager/src/viewer/example.ts +182 -182
  82. package/src/built-in/UIManager/src/viewer-toolbar/example.ts +376 -376
  83. package/src/built-in/index.ts +2995 -2995
  84. package/src/cli/templates/app/README.md +250 -250
  85. package/src/cli/templates/app/index.html +35 -35
  86. package/src/cli/templates/app/package.json +32 -32
  87. package/src/cli/templates/app/src/app.ts +37 -37
  88. package/src/cli/templates/app/src/assets/tool-placeholder.ts +50 -50
  89. package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -95
  90. package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
  91. package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
  92. package/src/cli/templates/app/src/bim-components/index.ts +1 -1
  93. package/src/cli/templates/app/src/globals.ts +1 -1
  94. package/src/cli/templates/app/src/main.history.ts +191 -191
  95. package/src/cli/templates/app/src/main.ts +226 -226
  96. package/src/cli/templates/app/src/setups/channel.ts +76 -76
  97. package/src/cli/templates/app/src/setups/reality-capture/lib/hidden-tiles-plugin.ts +88 -88
  98. package/src/cli/templates/app/src/setups/reality-capture/lib/point-tile-plugin.ts +166 -166
  99. package/src/cli/templates/app/src/setups/reality-capture/lib/render-frame.ts +31 -31
  100. package/src/cli/templates/app/src/setups/reality-capture/lib/splat-tile-plugin.ts +51 -51
  101. package/src/cli/templates/app/src/setups/reality-capture-viewer.ts +1383 -1383
  102. package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -26
  103. package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -1
  104. package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -15
  105. package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -37
  106. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -1
  107. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -14
  108. package/src/cli/templates/app/src/ui-components/index.ts +2 -2
  109. package/src/cli/templates/app/tsconfig.json +16 -16
  110. package/src/cli/templates/app/vite.config.js +57 -57
  111. package/src/cli/templates/cloud-component/README.md +205 -205
  112. package/src/cli/templates/cloud-component/_thatopen +5 -5
  113. package/src/cli/templates/cloud-component/declarations.json +4 -4
  114. package/src/cli/templates/cloud-component/package.json +21 -21
  115. package/src/cli/templates/cloud-component/src/main.ts +70 -70
  116. package/src/cli/templates/cloud-component/tsconfig.json +16 -16
  117. package/src/cli/templates/cloud-component/vite.config.js +46 -46
  118. package/src/cli/templates/shared/AGENTS.md +8 -8
  119. package/src/cli/templates/shared/CLAUDE.md +1 -1
  120. package/src/cli/templates/shared/_gitignore +5 -5
  121. package/src/core/examples/.env.example +7 -7
  122. package/src/core/examples/apps.ts +67 -67
  123. package/src/core/examples/batch-reads.ts +99 -99
  124. package/src/core/examples/channel.ts +65 -65
  125. package/src/core/examples/components.ts +91 -91
  126. package/src/core/examples/execution.ts +75 -75
  127. package/src/core/examples/file-metadata.ts +94 -94
  128. package/src/core/examples/files.ts +81 -81
  129. package/src/core/examples/folders.ts +82 -82
  130. package/src/core/examples/hidden-files.ts +88 -88
  131. package/src/core/examples/history.ts +103 -103
  132. package/src/core/examples/icons.ts +68 -68
  133. package/src/core/examples/permissions.ts +87 -87
  134. package/dist/core/builtin-recipes/records-to-revit.d.ts +0 -28
  135. package/dist/core/builtin-recipes/rhino-to-revit.d.ts +0 -16
@@ -1,387 +1,387 @@
1
- # Rhino → Revit, start to finish
2
-
3
- You are an assistant. Somebody is modelling in Rhino for a project whose model lives in Revit, and
4
- they want what they draw to become real Revit elements. This is the whole path, in the order it
5
- happens, with the numbers from a run that actually worked.
6
-
7
- It assumes the collaboration side is already set up — a central published, a project on the
8
- platform. If it is not, that is
9
- **[the Revit collaboration quick start](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/revit-collab-quickstart.md)**, and it comes first.
10
-
11
- ## What is actually happening
12
-
13
- Five steps, and it is worth saying them plainly before touching anything, because the shape is what
14
- people get wrong:
15
-
16
- 1. Rhino **publishes** its model to the project as a `.frag`. That is all the plug-in does. It
17
- mentions Revit nowhere.
18
- 2. In Revit, the person whose model it is chooses the **`rhino-to-revit` recipe**: **That Open >
19
- Select recipe**, source: that Rhino model; settings: the Rhino layer and the Revit type.
20
- 3. **That Open > Update.** The recipe — the platform's code, in neither plug-in — reads the
21
- `.frag` and says what it means in Revit's vocabulary; the Revit add-in writes it in **one**
22
- transaction. Ctrl+Z undoes it whole.
23
- 4. They **sync**, and it becomes a commit like any other, marked as the recipe's, naming the Rhino
24
- model and the version it read.
25
- 5. Rhino changes, publishes again, and **Update again** writes only the difference: new
26
- objects become new instances, moved ones move theirs, deleted ones have theirs removed.
27
-
28
- > **Known gap, today.** Revit's Select recipe can only offer settings that are booleans or Revit
29
- > family types. `rhino-to-revit` also asks for a **Rhino layer, read from the source**, so Select
30
- > recipe does not offer it yet. Steps 2 and 3 are how this path works once the dialog can show a
31
- > list read from the source; until then, say so plainly rather than improvising another route.
32
-
33
- **No element is ever tied to an element.** The only thing linking a Rhino object to a Revit column
34
- is the recipe's own record, in the Revit model's That Open data, of what it made from which object.
35
- Nothing is written into the Rhino model, and no Revit element carries a link. Anybody proposing to
36
- store a link between the two models is proposing the thing this architecture exists to avoid.
37
-
38
- ## Before anything
39
-
40
- Log in: **[Logging in to That Open Platform](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/platform-token.md)**. The Rhino plug-in reads
41
- `~/.thatopen/config.json`, the same file the CLI writes. It deliberately does not read the Revit
42
- add-in's session — same machine, but one plug-in reading another's private state is coupling nobody
43
- can undo later.
44
-
45
- Install the plug-in. **Rhino has to be closed**; the installer holds its files.
46
-
47
- ```bash
48
- thatopen rhino install
49
- ```
50
-
51
- ## Driving Rhino without a keyboard
52
-
53
- The plug-in runs a local HTTP server, exactly like the Revit add-in. This is what lets you do the
54
- whole job while the user watches, instead of dictating commands for them to type.
55
-
56
- The port and the token are written to `%APPDATA%\ThatOpen\rhino-addin.json`:
57
-
58
- ```json
59
- { "port": 5620, "token": "…", "pid": 5436 }
60
- ```
61
-
62
- Every request is a POST with a JSON body and the header `X-RhinoFlow-Token`. **Never print the
63
- token**, and never write it into a script you are about to show.
64
-
65
- There is also a `script` endpoint that runs Rhino's own command line. Use it for drawing, which is
66
- what it is good at. **Never use it for a command that asks a question** — the import command wants
67
- the project id the first time it runs, and a scripted command has nobody to answer, so Rhino sits
68
- there with no error and no progress. That is why `import-model` and `publish` take their answers as
69
- parameters instead of being reachable through `script`.
70
-
71
- ## 1. Bring the team's model into Rhino
72
-
73
- ```
74
- POST /import-model { "project": "<projectId>", "document": "<doc>" }
75
- ```
76
-
77
- ```json
78
- { "ok": true, "model": "rstadvancedsampleproject.frag",
79
- "layer": "ThatOpen reference — rstadvancedsampleproject",
80
- "added": 907, "skipped": 0 }
81
- ```
82
-
83
- It lands on a **locked layer**, with no properties, and it cannot be sent back. Say why if the user
84
- asks, because it looks like a limitation and it is a decision: a `.frag` is a tessellation — what a
85
- Revit wall LOOKS like, not what it IS — so editing one in Rhino and returning it could only produce
86
- a worse version of a model Revit already owns. The lock stops somebody editing a mesh that is really
87
- somebody else's wall and then publishing that as though it were theirs.
88
-
89
- If the folder holds more than one model the call comes back with `available` listing them and no
90
- import. Ask which; do not pick the first. Somebody spending an afternoon modelling against the wrong
91
- building is a bad afternoon.
92
-
93
- ## 2. Find out where things are, before you place anything
94
-
95
- Do not invent coordinates. Ask the model:
96
-
97
- ```
98
- POST /objects { "limit": 3000 }
99
- ```
100
-
101
- Each object comes back with `min`, `max`, `center`, its layer, and the user strings the import
102
- stamped on it — including `ThatOpen:Category`, which is Revit's own category name.
103
-
104
- **Group before you conclude.** Reading the first few rows of that list is not measuring, and it will
105
- mislead you. Measured on the sample project: the first four columns in the list were 750×750, based
106
- at Z −2500, 2500 tall. They were the basement — four out of seventy. The building's actual column is
107
- **450×450, based at Z 0, 3500 tall**, which is 63 of the 70. Taking the section from the first rows
108
- produced columns that were too fat and buried, twice.
109
-
110
- The same query gives you the grid. Sort each row of columns by X, look at the gaps, and the midpoint
111
- of a wide one is a defensible place for a new column — it sits under the beam spanning that bay.
112
-
113
- ## 3. Place the columns
114
-
115
- There is no "make me a column" endpoint, and there should not be. This plug-in moves data and
116
- decides nothing about what any of it means; the moment it grows a command called `columns` it has an
117
- opinion about buildings, and that opinion belongs in the recipe. Rhino's own commands do the job:
118
-
119
- ```
120
- POST /script { "script": "_-Layer _New \"flow:columns\" _Current \"flow:columns\" _Enter" }
121
- POST /script { "script": "_-Point -5544,-1413,0" }
122
- POST /script { "script": "_-Box -5769,-1638,0 -5319,-1188,0 3500" }
123
- ```
124
-
125
- Verified: that produces a point at the given coordinate and a 450×450×3500 extrusion centred on it.
126
- `_-Box` takes two opposite corners of the base and then a height, so a 450 square centred on
127
- `(x, y)` runs from `(x−225, y−225)` to `(x+225, y+225)`.
128
-
129
- **Place BOTH, and understand why.** `rhino-to-revit` places one Revit instance at each object of the
130
- chosen layer that has a `Position` — a point is exactly that; anything else on the layer with a `Position` becomes an instance too, so keep the layer for the points. But a point
131
- is invisible at building scale, so a Rhino file of "the new columns" looks like an empty file —
132
- impossible to work with and impossible to show anybody. So the point is the data, and the box is the
133
- picture. Put them on sibling layers (`flow:columns` and `flow:columns (view)`) so the recipe's layer
134
- holds nothing but points.
135
-
136
- Nothing downstream reads the box. If somebody later writes a recipe that reads solids, the point
137
- layer goes away and everything else still works.
138
-
139
- **Sizes and coordinates are in the DOCUMENT's units.** `POST /status` reports them. The sample
140
- project is in millimetres, where a column of `0.45` is an invisible splinter. Converting from metres
141
- behind the user's back would put everything a thousand times too far away.
142
-
143
- ### The whole thing, worked
144
-
145
- Four columns down one bay of the sample project, at the midpoints of a 7315 mm gap that repeats row
146
- after row. This is exactly what was run:
147
-
148
- ```
149
- _-Layer _New "flow:columns" _Enter
150
- _-Layer _New "flow:columns (view)" _Enter
151
-
152
- _-Layer _Current "flow:columns" _Enter
153
- _-Point -5544,-5769,0
154
- _-Point -5544,-1413,0
155
- _-Point -5544,530,0
156
- _-Point -5544,6829,0
157
-
158
- _-Layer _Current "flow:columns (view)" _Enter
159
- _-Box -5769,-5994,0 -5319,-5544,0 3500
160
- _-Box -5769,-1638,0 -5319,-1188,0 3500
161
- _-Box -5769,305,0 -5319,755,0 3500
162
- _-Box -5769,6604,0 -5319,7054,0 3500
163
- ```
164
-
165
- One `POST /script` per line, or several lines in one call. Check `objectsAfter` in the reply: it is
166
- the only thing that tells a command that did nothing from one that worked.
167
-
168
- ### And then anything else
169
-
170
- Nothing above is about columns. It is: make a layer, put geometry on it, and let a recipe say what
171
- it means. The same shape covers whatever the user actually wants —
172
-
173
- | want | command |
174
- | --- | --- |
175
- | a point | `_-Point x,y,z` |
176
- | a box | `_-Box x1,y1,z1 x2,y2,z2 <height>` |
177
- | a line | `_-Line x1,y1,z1 x2,y2,z2` |
178
- | a circle | `_-Circle x,y,z <radius>` |
179
- | a layer, made current | `_-Layer _New "name" _Current "name" _Enter` |
180
-
181
- The leading `-` is what matters: it is Rhino's command-line form, which takes its arguments inline
182
- instead of opening a dialog. Without it the command puts a window on screen and waits for a person,
183
- and there is no person.
184
-
185
- Two rules carry over to anything you draw here. The geometry the recipe reads goes on **its own
186
- layer, holding nothing else**, because the recipe selects by layer and cannot tell your helper
187
- geometry from your data. And the coordinates are always in the **document's units**.
188
-
189
- ## 4. Publish
190
-
191
- ```
192
- POST /publish { "project": "<projectId>", "document": "<doc>", "name": "rhino-columns.frag" }
193
- ```
194
-
195
- ```json
196
- { "ok": true, "file": "rhino-columns.frag", "items": 8, "withGeometry": 4, "bytes": 10529 }
197
- ```
198
-
199
- **Check that number.** Eight items is four points and four boxes. The first version of this uploaded
200
- 915 items and 3.4 MB, because the 907 reference meshes went back up with everything else — a
201
- tessellated copy of the Revit model, republished under the Rhino model's name. Objects stamped
202
- `ThatOpen:Source` are excluded now, but if you ever see the item count in the hundreds, that is what
203
- happened.
204
-
205
- Points count as items without geometry. That is correct: they are the data the recipe reads, not
206
- something to draw.
207
-
208
- Once published, the Rhino model is a document of the project, and that is what Revit's Select recipe
209
- lists as a source. Publishing again makes a new version of it; the next Apply reads that one.
210
-
211
- ## 5. The recipe
212
-
213
- This is the part that is **not** in either plug-in, and should not be. It reads the published
214
- `.frag`, decides what it means in Revit, and returns the changes; the Revit add-in applies them.
215
-
216
- The one that exists is the built-in **`rhino-to-revit`** (`src/core/builtin-recipes/rhino-to-revit.ts`
217
- in `@thatopen/services`): each placed object of a chosen Rhino layer becomes an instance of a chosen
218
- Revit family type. It is written to be read and then rewritten as a project recipe — the next person
219
- wants walls from curves, or louvres from blocks — and
220
- **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**
221
- is how. Four steps survive any rewrite:
222
-
223
- 1. read the source model's own data, in the source's own units
224
- 2. ask what this recipe already made in this model (`made`, which the add-in hands it)
225
- 3. decide: new ones are added, known ones updated, vanished ones removed
226
- 4. return the changes, or `UpToDate` when there are none
227
-
228
- It persists nothing of its own. What it made is kept by the Revit add-in in the model's That Open
229
- data, so Apply behaves the same from any machine with that model.
230
-
231
- The byte contract is **[Writing a flow plugin](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-plugin-guide.md)**, and the reasoning
232
- behind the shape is **[the architecture notes](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-architecture.md)**.
233
-
234
- Everything below is what a run of this cost to find out. None of it is guessable, and all of it
235
- fails quietly when it is wrong.
236
-
237
- ### What Rhino actually publishes
238
-
239
- One item per Rhino object, category `IFCBUILDINGELEMENTPROXY`, carrying these attributes:
240
-
241
- | attribute | example | note |
242
- | --- | --- | --- |
243
- | `Layer` | `flow:columns` | |
244
- | `Type` | `Point` | `Point`, `Extrusion`, `Curve`, … |
245
- | `Name` | | the object's name, usually empty |
246
- | `Position` | `"-5544.4,-1413,0"` | a **string**, in the document's units |
247
- | `Rhino:Definition` | | block definition, when there is one |
248
-
249
- **The layers are published as items too**, category `IFCBUILDINGSTOREY`, geometry-less, carrying a
250
- single `Name` attribute holding the layer's full path. They have no `Layer` and no `Position`. So a
251
- recipe that matches the layer name loosely, or that assumes every item it sees has a position,
252
- reads a layer as a column. Test both fields, positively:
253
-
254
- ```ts
255
- if (attrs.Layer !== "flow:columns") continue;
256
- if (attrs.Type !== "Point") continue; // and this is what separates points from everything else on it
257
- ```
258
-
259
- `Type` is Rhino's own geometry class name: `Point` for a point, `Extrusion` for a `_-Box`, `Curve`
260
- for a line. It is the only thing distinguishing the data from the helper geometry if somebody ends up
261
- putting both on one layer.
262
-
263
- Reading it in a recipe, which imports nothing: the tools are on `context.kit`.
264
-
265
- ```js
266
- const { picked, contents } = await context.kit.readPickedFrag(context, context.input);
267
- // contents.metadata, and contents.items: [{ localId, guid, category, attrs }]
268
- ```
269
-
270
- `readPickedFrag` downloads the source document at the version picked in Revit and reads it;
271
- `kit.readFrag(bytes)` does the same for any `.frag` bytes you already have.
272
-
273
- ### Units, and why the envelope has no units field
274
-
275
- **Print both files' metadata BEFORE you write a line of a recipe.** This is an ordering
276
- instruction, not advice. The whole conversion rests on what those two files declare, and it takes
277
- thirty seconds to find out:
278
-
279
- ```ts
280
- import { readFrag } from '@thatopen/services';
281
- for (const id of [rhinoFileId, revitFileId]) {
282
- const res = await client.downloadFile(id);
283
- const { metadata } = await readFrag(new Uint8Array(await res.arrayBuffer()));
284
- console.log(id, metadata);
285
- }
286
- ```
287
-
288
- Measured on a live demo, 2026-08-05: a converter was written the other way round, four hundred lines
289
- first and the check afterwards, and the target's metadata turned out to be `{}`. Everything above the
290
- units gate was correct and none of it could run. Read the two files, then write the recipe around
291
- what is actually in them.
292
-
293
- A recipe's changes are in the terms of **what the target published**. When Revit's export declares
294
- anything, it says so itself:
295
-
296
- ```json
297
- "data": { "units": "ft", "axes": "z-up", "note": "Revit's own terms, untouched. Operations are written in these." }
298
- ```
299
-
300
- Rhino publishes its document units in the same place, `model.metadata()`, under `data.units`. On the
301
- sample project that is `Millimeters`. So the recipe divides by **304.8**, and it is the recipe's
302
- job precisely because it is the only piece that knows both sides. `rhino-to-revit` reads
303
- `data.units` and **refuses** a Rhino model that does not declare one it knows, rather than guess.
304
-
305
- **When the target declares nothing.** Models published by add-in versions before 1.2.27 carry empty
306
- metadata on their first commit, so `{}` is a state you will meet on any project created before then.
307
- Revit's internal length unit is always decimal feet, so the factor is not actually in doubt; what is
308
- missing is the file saying so. Take feet, say out loud that you are taking it, and then **prove it
309
- from the data** rather than leaving it as an assumption:
310
-
311
- - Read one existing column's `Position` out of the target, and compare it against the same column
312
- measured in the source. On the sample project: `-30.19028688187479` ft times 304.8 is **-9202 mm**,
313
- which is exactly the bay edge measured in Rhino.
314
- - Keep a sanity check on every converted point: refuse anything landing more than about ten metres
315
- from an existing element of the same category. That is what catches a factor-of-1000 error, and it
316
- works whether or not the file declared anything.
317
-
318
- **What you must never do is guess silently.** A wrong factor puts the columns a thousand times too
319
- far away, and nothing about the result says why. Refusing is a worse demo and a better outcome.
320
-
321
- ### Building the changes
322
-
323
- A recipe builds what it returns with `kit.OperationBuilder` — `add(attrs, { position, source })`,
324
- `set(id, attrs, placement)`, `remove(id)`, then `build(opId)` — which writes the geometry-less
325
- `.frag` and its envelope. Nobody assembles those bytes by hand any more. The rules that make a
326
- re-apply write only the difference — a stable `source` key on every add (the Rhino object's guid),
327
- removing only what the recipe made — are in
328
- **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**.
329
-
330
- ### Do not learn the format from files on the machine
331
-
332
- The tempting shortcut is the `.frag` files lying around under `%APPDATA%\ThatOpen` and in
333
- `flow-reconcile`. They are somebody's earlier session. One of them held four points on a layer
334
- called `Columnas`, left over from an older run, and reading it as current would have built a
335
- converter against a layer name nobody was using any more.
336
-
337
- The tables above are here so nobody has to do that. If you still want to see real bytes, publish
338
- something small and read it back with `readFrag`, or run the recipe without Revit and read the
339
- changes it would write with `describeChanges` (section 5 of the recipes guide).
340
-
341
- ## 6. Apply it in Revit
342
-
343
- In Revit, with the model open:
344
-
345
- 1. **That Open > Select recipe.** Recipe: **Rhino to Revit**. Source: the Rhino model published in
346
- step 4, from the list of the project's documents. Settings: the **Rhino layer** (`flow:columns`)
347
- and the **Revit type** every point becomes.
348
- 2. **That Open > Update.** The recipe runs inside the add-in and the instances are written at
349
- once, in **one** Revit transaction: Ctrl+Z undoes it whole.
350
-
351
- **This is the known gap from the top of this guide.** Select recipe can only offer settings that are
352
- booleans or Revit family types, and `rhino-to-revit`'s layer is a list read from the source, so the
353
- dialog does not offer this recipe yet. Say so to the user if they reach this step; do not work
354
- around it by writing into the model some other way.
355
-
356
- Applying again after Rhino publishes a new version writes only the difference; with no change it
357
- says "Nothing imported". The change is in their local only. They still sync.
358
-
359
- ## 7. Sync, and look at it
360
-
361
- Revit's own Synchronize with Central. The add-in rides it: the work reaches the team and the commit
362
- lands in the history, with the new columns in it, viewable in the app like any other change. The
363
- history panel marks it as a recipe's commit, with its title and the Rhino model and version it was
364
- made from.
365
-
366
- ## Traps, all of them paid for
367
-
368
- - **Rhino must be closed to install or update the plug-in.** It holds its own files, and a partial
369
- copy leaves a plug-in that is neither version.
370
- - **`script` deadlocks on any command that asks a question.** Use the endpoints.
371
- - **Units are the document's**, everywhere. Ask `POST /status` rather than assuming metres.
372
- - **The recipe places points, not solids.** Somebody modelling a beautiful steel section will
373
- convert nothing at all, with no error to explain it.
374
- - **A Rhino model that does not declare its units is refused.** That is the recipe refusing to
375
- guess a factor of 1000, not a failure.
376
- - **Select recipe does not offer `rhino-to-revit` yet.** Its layer setting is read from the source,
377
- and the Revit dialog only shows booleans and family types today. A known gap; say so.
378
- - **Do not publish what you imported.** If the item count is in the hundreds, reference geometry is
379
- going back up.
380
- - **Group before concluding anything about the model.** The first rows of a listing are a sample,
381
- and on this project the sample was the exception twice running.
382
- - **Stray `.frag` files on the machine are not the current format.** They are an earlier session.
383
- - **Read the two files' metadata before writing a recipe, not after.** Everything the
384
- conversion rests on is declared in them, or is not, and finding out costs thirty seconds at the
385
- start and four hundred lines at the end.
386
- - **Read these guides verbatim.** A fetch that summarises gives you the shape of the thing and none
387
- of the numbers, and every number here was paid for. Use the raw URL.
1
+ # Rhino → Revit, start to finish
2
+
3
+ You are an assistant. Somebody is modelling in Rhino for a project whose model lives in Revit, and
4
+ they want what they draw to become real Revit elements. This is the whole path, in the order it
5
+ happens, with the numbers from a run that actually worked.
6
+
7
+ It assumes the collaboration side is already set up — a central published, a project on the
8
+ platform. If it is not, that is
9
+ **[the Revit collaboration quick start](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/revit-collab-quickstart.md)**, and it comes first.
10
+
11
+ ## What is actually happening
12
+
13
+ Five steps, and it is worth saying them plainly before touching anything, because the shape is what
14
+ people get wrong:
15
+
16
+ 1. Rhino **publishes** its model to the project as a `.frag`. That is all the plug-in does. It
17
+ mentions Revit nowhere.
18
+ 2. In Revit, the person whose model it is chooses the **`rhino-to-revit` recipe**: **That Open >
19
+ Select recipe**, source: that Rhino model; settings: the Rhino layer and the Revit type.
20
+ 3. **That Open > Update.** The recipe — the platform's code, in neither plug-in — reads the
21
+ `.frag` and says what it means in Revit's vocabulary; the Revit add-in writes it in **one**
22
+ transaction. Ctrl+Z undoes it whole.
23
+ 4. They **sync**, and it becomes a commit like any other, marked as the recipe's, naming the Rhino
24
+ model and the version it read.
25
+ 5. Rhino changes, publishes again, and **Update again** writes only the difference: new
26
+ objects become new instances, moved ones move theirs, deleted ones have theirs removed.
27
+
28
+ > **Known gap, today.** Revit's Select recipe can only offer settings that are booleans or Revit
29
+ > family types. `rhino-to-revit` also asks for a **Rhino layer, read from the source**, so Select
30
+ > recipe does not offer it yet. Steps 2 and 3 are how this path works once the dialog can show a
31
+ > list read from the source; until then, say so plainly rather than improvising another route.
32
+
33
+ **No element is ever tied to an element.** The only thing linking a Rhino object to a Revit column
34
+ is the recipe's own record, in the Revit model's That Open data, of what it made from which object.
35
+ Nothing is written into the Rhino model, and no Revit element carries a link. Anybody proposing to
36
+ store a link between the two models is proposing the thing this architecture exists to avoid.
37
+
38
+ ## Before anything
39
+
40
+ Log in: **[Logging in to That Open Platform](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/platform-token.md)**. The Rhino plug-in reads
41
+ `~/.thatopen/config.json`, the same file the CLI writes. It deliberately does not read the Revit
42
+ add-in's session — same machine, but one plug-in reading another's private state is coupling nobody
43
+ can undo later.
44
+
45
+ Install the plug-in. **Rhino has to be closed**; the installer holds its files.
46
+
47
+ ```bash
48
+ thatopen rhino install
49
+ ```
50
+
51
+ ## Driving Rhino without a keyboard
52
+
53
+ The plug-in runs a local HTTP server, exactly like the Revit add-in. This is what lets you do the
54
+ whole job while the user watches, instead of dictating commands for them to type.
55
+
56
+ The port and the token are written to `%APPDATA%\ThatOpen\rhino-addin.json`:
57
+
58
+ ```json
59
+ { "port": 5620, "token": "…", "pid": 5436 }
60
+ ```
61
+
62
+ Every request is a POST with a JSON body and the header `X-RhinoFlow-Token`. **Never print the
63
+ token**, and never write it into a script you are about to show.
64
+
65
+ There is also a `script` endpoint that runs Rhino's own command line. Use it for drawing, which is
66
+ what it is good at. **Never use it for a command that asks a question** — the import command wants
67
+ the project id the first time it runs, and a scripted command has nobody to answer, so Rhino sits
68
+ there with no error and no progress. That is why `import-model` and `publish` take their answers as
69
+ parameters instead of being reachable through `script`.
70
+
71
+ ## 1. Bring the team's model into Rhino
72
+
73
+ ```
74
+ POST /import-model { "project": "<projectId>", "document": "<doc>" }
75
+ ```
76
+
77
+ ```json
78
+ { "ok": true, "model": "rstadvancedsampleproject.frag",
79
+ "layer": "ThatOpen reference — rstadvancedsampleproject",
80
+ "added": 907, "skipped": 0 }
81
+ ```
82
+
83
+ It lands on a **locked layer**, with no properties, and it cannot be sent back. Say why if the user
84
+ asks, because it looks like a limitation and it is a decision: a `.frag` is a tessellation — what a
85
+ Revit wall LOOKS like, not what it IS — so editing one in Rhino and returning it could only produce
86
+ a worse version of a model Revit already owns. The lock stops somebody editing a mesh that is really
87
+ somebody else's wall and then publishing that as though it were theirs.
88
+
89
+ If the folder holds more than one model the call comes back with `available` listing them and no
90
+ import. Ask which; do not pick the first. Somebody spending an afternoon modelling against the wrong
91
+ building is a bad afternoon.
92
+
93
+ ## 2. Find out where things are, before you place anything
94
+
95
+ Do not invent coordinates. Ask the model:
96
+
97
+ ```
98
+ POST /objects { "limit": 3000 }
99
+ ```
100
+
101
+ Each object comes back with `min`, `max`, `center`, its layer, and the user strings the import
102
+ stamped on it — including `ThatOpen:Category`, which is Revit's own category name.
103
+
104
+ **Group before you conclude.** Reading the first few rows of that list is not measuring, and it will
105
+ mislead you. Measured on the sample project: the first four columns in the list were 750×750, based
106
+ at Z −2500, 2500 tall. They were the basement — four out of seventy. The building's actual column is
107
+ **450×450, based at Z 0, 3500 tall**, which is 63 of the 70. Taking the section from the first rows
108
+ produced columns that were too fat and buried, twice.
109
+
110
+ The same query gives you the grid. Sort each row of columns by X, look at the gaps, and the midpoint
111
+ of a wide one is a defensible place for a new column — it sits under the beam spanning that bay.
112
+
113
+ ## 3. Place the columns
114
+
115
+ There is no "make me a column" endpoint, and there should not be. This plug-in moves data and
116
+ decides nothing about what any of it means; the moment it grows a command called `columns` it has an
117
+ opinion about buildings, and that opinion belongs in the recipe. Rhino's own commands do the job:
118
+
119
+ ```
120
+ POST /script { "script": "_-Layer _New \"flow:columns\" _Current \"flow:columns\" _Enter" }
121
+ POST /script { "script": "_-Point -5544,-1413,0" }
122
+ POST /script { "script": "_-Box -5769,-1638,0 -5319,-1188,0 3500" }
123
+ ```
124
+
125
+ Verified: that produces a point at the given coordinate and a 450×450×3500 extrusion centred on it.
126
+ `_-Box` takes two opposite corners of the base and then a height, so a 450 square centred on
127
+ `(x, y)` runs from `(x−225, y−225)` to `(x+225, y+225)`.
128
+
129
+ **Place BOTH, and understand why.** `rhino-to-revit` places one Revit instance at each object of the
130
+ chosen layer that has a `Position` — a point is exactly that; anything else on the layer with a `Position` becomes an instance too, so keep the layer for the points. But a point
131
+ is invisible at building scale, so a Rhino file of "the new columns" looks like an empty file —
132
+ impossible to work with and impossible to show anybody. So the point is the data, and the box is the
133
+ picture. Put them on sibling layers (`flow:columns` and `flow:columns (view)`) so the recipe's layer
134
+ holds nothing but points.
135
+
136
+ Nothing downstream reads the box. If somebody later writes a recipe that reads solids, the point
137
+ layer goes away and everything else still works.
138
+
139
+ **Sizes and coordinates are in the DOCUMENT's units.** `POST /status` reports them. The sample
140
+ project is in millimetres, where a column of `0.45` is an invisible splinter. Converting from metres
141
+ behind the user's back would put everything a thousand times too far away.
142
+
143
+ ### The whole thing, worked
144
+
145
+ Four columns down one bay of the sample project, at the midpoints of a 7315 mm gap that repeats row
146
+ after row. This is exactly what was run:
147
+
148
+ ```
149
+ _-Layer _New "flow:columns" _Enter
150
+ _-Layer _New "flow:columns (view)" _Enter
151
+
152
+ _-Layer _Current "flow:columns" _Enter
153
+ _-Point -5544,-5769,0
154
+ _-Point -5544,-1413,0
155
+ _-Point -5544,530,0
156
+ _-Point -5544,6829,0
157
+
158
+ _-Layer _Current "flow:columns (view)" _Enter
159
+ _-Box -5769,-5994,0 -5319,-5544,0 3500
160
+ _-Box -5769,-1638,0 -5319,-1188,0 3500
161
+ _-Box -5769,305,0 -5319,755,0 3500
162
+ _-Box -5769,6604,0 -5319,7054,0 3500
163
+ ```
164
+
165
+ One `POST /script` per line, or several lines in one call. Check `objectsAfter` in the reply: it is
166
+ the only thing that tells a command that did nothing from one that worked.
167
+
168
+ ### And then anything else
169
+
170
+ Nothing above is about columns. It is: make a layer, put geometry on it, and let a recipe say what
171
+ it means. The same shape covers whatever the user actually wants —
172
+
173
+ | want | command |
174
+ | --- | --- |
175
+ | a point | `_-Point x,y,z` |
176
+ | a box | `_-Box x1,y1,z1 x2,y2,z2 <height>` |
177
+ | a line | `_-Line x1,y1,z1 x2,y2,z2` |
178
+ | a circle | `_-Circle x,y,z <radius>` |
179
+ | a layer, made current | `_-Layer _New "name" _Current "name" _Enter` |
180
+
181
+ The leading `-` is what matters: it is Rhino's command-line form, which takes its arguments inline
182
+ instead of opening a dialog. Without it the command puts a window on screen and waits for a person,
183
+ and there is no person.
184
+
185
+ Two rules carry over to anything you draw here. The geometry the recipe reads goes on **its own
186
+ layer, holding nothing else**, because the recipe selects by layer and cannot tell your helper
187
+ geometry from your data. And the coordinates are always in the **document's units**.
188
+
189
+ ## 4. Publish
190
+
191
+ ```
192
+ POST /publish { "project": "<projectId>", "document": "<doc>", "name": "rhino-columns.frag" }
193
+ ```
194
+
195
+ ```json
196
+ { "ok": true, "file": "rhino-columns.frag", "items": 8, "withGeometry": 4, "bytes": 10529 }
197
+ ```
198
+
199
+ **Check that number.** Eight items is four points and four boxes. The first version of this uploaded
200
+ 915 items and 3.4 MB, because the 907 reference meshes went back up with everything else — a
201
+ tessellated copy of the Revit model, republished under the Rhino model's name. Objects stamped
202
+ `ThatOpen:Source` are excluded now, but if you ever see the item count in the hundreds, that is what
203
+ happened.
204
+
205
+ Points count as items without geometry. That is correct: they are the data the recipe reads, not
206
+ something to draw.
207
+
208
+ Once published, the Rhino model is a document of the project, and that is what Revit's Select recipe
209
+ lists as a source. Publishing again makes a new version of it; the next Apply reads that one.
210
+
211
+ ## 5. The recipe
212
+
213
+ This is the part that is **not** in either plug-in, and should not be. It reads the published
214
+ `.frag`, decides what it means in Revit, and returns the changes; the Revit add-in applies them.
215
+
216
+ The one that exists is the built-in **`rhino-to-revit`** (`src/core/builtin-recipes/layer-to-native.ts`
217
+ in `@thatopen/services`): each placed object of a chosen Rhino layer becomes an instance of a chosen
218
+ Revit family type. It is written to be read and then rewritten as a project recipe — the next person
219
+ wants walls from curves, or louvres from blocks — and
220
+ **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**
221
+ is how. Four steps survive any rewrite:
222
+
223
+ 1. read the source model's own data, in the source's own units
224
+ 2. ask what this recipe already made in this model (`made`, which the add-in hands it)
225
+ 3. decide: new ones are added, known ones updated, vanished ones removed
226
+ 4. return the changes, or `UpToDate` when there are none
227
+
228
+ It persists nothing of its own. What it made is kept by the Revit add-in in the model's That Open
229
+ data, so Apply behaves the same from any machine with that model.
230
+
231
+ The byte contract is **[Writing a flow plugin](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-plugin-guide.md)**, and the reasoning
232
+ behind the shape is **[the architecture notes](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-architecture.md)**.
233
+
234
+ Everything below is what a run of this cost to find out. None of it is guessable, and all of it
235
+ fails quietly when it is wrong.
236
+
237
+ ### What Rhino actually publishes
238
+
239
+ One item per Rhino object, category `IFCBUILDINGELEMENTPROXY`, carrying these attributes:
240
+
241
+ | attribute | example | note |
242
+ | --- | --- | --- |
243
+ | `Layer` | `flow:columns` | |
244
+ | `Type` | `Point` | `Point`, `Extrusion`, `Curve`, … |
245
+ | `Name` | | the object's name, usually empty |
246
+ | `Position` | `"-5544.4,-1413,0"` | a **string**, in the document's units |
247
+ | `Rhino:Definition` | | block definition, when there is one |
248
+
249
+ **The layers are published as items too**, category `IFCBUILDINGSTOREY`, geometry-less, carrying a
250
+ single `Name` attribute holding the layer's full path. They have no `Layer` and no `Position`. So a
251
+ recipe that matches the layer name loosely, or that assumes every item it sees has a position,
252
+ reads a layer as a column. Test both fields, positively:
253
+
254
+ ```ts
255
+ if (attrs.Layer !== "flow:columns") continue;
256
+ if (attrs.Type !== "Point") continue; // and this is what separates points from everything else on it
257
+ ```
258
+
259
+ `Type` is Rhino's own geometry class name: `Point` for a point, `Extrusion` for a `_-Box`, `Curve`
260
+ for a line. It is the only thing distinguishing the data from the helper geometry if somebody ends up
261
+ putting both on one layer.
262
+
263
+ Reading it in a recipe, which imports nothing: the tools are on `context.kit`.
264
+
265
+ ```js
266
+ const { picked, contents } = await context.kit.readPickedFrag(context, context.input);
267
+ // contents.metadata, and contents.items: [{ localId, guid, category, attrs }]
268
+ ```
269
+
270
+ `readPickedFrag` downloads the source document at the version picked in Revit and reads it;
271
+ `kit.readFrag(bytes)` does the same for any `.frag` bytes you already have.
272
+
273
+ ### Units, and why the envelope has no units field
274
+
275
+ **Print both files' metadata BEFORE you write a line of a recipe.** This is an ordering
276
+ instruction, not advice. The whole conversion rests on what those two files declare, and it takes
277
+ thirty seconds to find out:
278
+
279
+ ```ts
280
+ import { readFrag } from '@thatopen/services';
281
+ for (const id of [rhinoFileId, revitFileId]) {
282
+ const res = await client.downloadFile(id);
283
+ const { metadata } = await readFrag(new Uint8Array(await res.arrayBuffer()));
284
+ console.log(id, metadata);
285
+ }
286
+ ```
287
+
288
+ Measured on a live demo, 2026-08-05: a converter was written the other way round, four hundred lines
289
+ first and the check afterwards, and the target's metadata turned out to be `{}`. Everything above the
290
+ units gate was correct and none of it could run. Read the two files, then write the recipe around
291
+ what is actually in them.
292
+
293
+ A recipe's changes are in the terms of **what the target published**. When Revit's export declares
294
+ anything, it says so itself:
295
+
296
+ ```json
297
+ "data": { "units": "ft", "axes": "z-up", "note": "Revit's own terms, untouched. Operations are written in these." }
298
+ ```
299
+
300
+ Rhino publishes its document units in the same place, `model.metadata()`, under `data.units`. On the
301
+ sample project that is `Millimeters`. So the recipe divides by **304.8**, and it is the recipe's
302
+ job precisely because it is the only piece that knows both sides. `rhino-to-revit` reads
303
+ `data.units` and **refuses** a Rhino model that does not declare one it knows, rather than guess.
304
+
305
+ **When the target declares nothing.** Models published by add-in versions before 1.2.27 carry empty
306
+ metadata on their first commit, so `{}` is a state you will meet on any project created before then.
307
+ Revit's internal length unit is always decimal feet, so the factor is not actually in doubt; what is
308
+ missing is the file saying so. Take feet, say out loud that you are taking it, and then **prove it
309
+ from the data** rather than leaving it as an assumption:
310
+
311
+ - Read one existing column's `Position` out of the target, and compare it against the same column
312
+ measured in the source. On the sample project: `-30.19028688187479` ft times 304.8 is **-9202 mm**,
313
+ which is exactly the bay edge measured in Rhino.
314
+ - Keep a sanity check on every converted point: refuse anything landing more than about ten metres
315
+ from an existing element of the same category. That is what catches a factor-of-1000 error, and it
316
+ works whether or not the file declared anything.
317
+
318
+ **What you must never do is guess silently.** A wrong factor puts the columns a thousand times too
319
+ far away, and nothing about the result says why. Refusing is a worse demo and a better outcome.
320
+
321
+ ### Building the changes
322
+
323
+ A recipe builds what it returns with `kit.OperationBuilder` — `add(attrs, { position, source })`,
324
+ `set(id, attrs, placement)`, `remove(id)`, then `build(opId)` — which writes the geometry-less
325
+ `.frag` and its envelope. Nobody assembles those bytes by hand any more. The rules that make a
326
+ re-apply write only the difference — a stable `source` key on every add (the Rhino object's guid),
327
+ removing only what the recipe made — are in
328
+ **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**.
329
+
330
+ ### Do not learn the format from files on the machine
331
+
332
+ The tempting shortcut is the `.frag` files lying around under `%APPDATA%\ThatOpen` and in
333
+ `flow-reconcile`. They are somebody's earlier session. One of them held four points on a layer
334
+ called `Columnas`, left over from an older run, and reading it as current would have built a
335
+ converter against a layer name nobody was using any more.
336
+
337
+ The tables above are here so nobody has to do that. If you still want to see real bytes, publish
338
+ something small and read it back with `readFrag`, or run the recipe without Revit and read the
339
+ changes it would write with `describeChanges` (section 5 of the recipes guide).
340
+
341
+ ## 6. Apply it in Revit
342
+
343
+ In Revit, with the model open:
344
+
345
+ 1. **That Open > Select recipe.** Recipe: **Rhino to Revit**. Source: the Rhino model published in
346
+ step 4, from the list of the project's documents. Settings: the **Rhino layer** (`flow:columns`)
347
+ and the **Revit type** every point becomes.
348
+ 2. **That Open > Update.** The recipe runs inside the add-in and the instances are written at
349
+ once, in **one** Revit transaction: Ctrl+Z undoes it whole.
350
+
351
+ **This is the known gap from the top of this guide.** Select recipe can only offer settings that are
352
+ booleans or Revit family types, and `rhino-to-revit`'s layer is a list read from the source, so the
353
+ dialog does not offer this recipe yet. Say so to the user if they reach this step; do not work
354
+ around it by writing into the model some other way.
355
+
356
+ Applying again after Rhino publishes a new version writes only the difference; with no change it
357
+ says "Nothing imported". The change is in their local only. They still sync.
358
+
359
+ ## 7. Sync, and look at it
360
+
361
+ Revit's own Synchronize with Central. The add-in rides it: the work reaches the team and the commit
362
+ lands in the history, with the new columns in it, viewable in the app like any other change. The
363
+ history panel marks it as a recipe's commit, with its title and the Rhino model and version it was
364
+ made from.
365
+
366
+ ## Traps, all of them paid for
367
+
368
+ - **Rhino must be closed to install or update the plug-in.** It holds its own files, and a partial
369
+ copy leaves a plug-in that is neither version.
370
+ - **`script` deadlocks on any command that asks a question.** Use the endpoints.
371
+ - **Units are the document's**, everywhere. Ask `POST /status` rather than assuming metres.
372
+ - **The recipe places points, not solids.** Somebody modelling a beautiful steel section will
373
+ convert nothing at all, with no error to explain it.
374
+ - **A Rhino model that does not declare its units is refused.** That is the recipe refusing to
375
+ guess a factor of 1000, not a failure.
376
+ - **Select recipe does not offer `rhino-to-revit` yet.** Its layer setting is read from the source,
377
+ and the Revit dialog only shows booleans and family types today. A known gap; say so.
378
+ - **Do not publish what you imported.** If the item count is in the hundreds, reference geometry is
379
+ going back up.
380
+ - **Group before concluding anything about the model.** The first rows of a listing are a sample,
381
+ and on this project the sample was the exception twice running.
382
+ - **Stray `.frag` files on the machine are not the current format.** They are an earlier session.
383
+ - **Read the two files' metadata before writing a recipe, not after.** Everything the
384
+ conversion rests on is declared in them, or is not, and finding out costs thirty seconds at the
385
+ start and four hundred lines at the end.
386
+ - **Read these guides verbatim.** A fetch that summarises gives you the shape of the thing and none
387
+ of the numbers, and every number here was paid for. Use the raw URL.