@thatopen/services 0.35.0 → 0.35.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.
- package/README.md +66 -66
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/docs/ai-quickstart.md +548 -548
- package/docs/builtin/paths.json +130 -130
- package/docs/cli/create.md +29 -29
- package/docs/cli/local-server.md +38 -38
- package/docs/cli/login.md +32 -32
- package/docs/cli/mcp.md +46 -46
- package/docs/cli/publish.md +31 -31
- package/docs/cli/run.md +26 -26
- package/docs/cli/serve.md +43 -43
- package/docs/cli/swap.md +30 -30
- package/docs/cloud/GaussianSplatConverter.md +43 -43
- package/docs/cloud/PointCloudConverter.md +53 -53
- package/docs/flow-architecture.md +393 -393
- package/docs/flow-plugin-guide.md +354 -354
- package/docs/platform-token.md +81 -81
- package/docs/rate-limits.md +133 -133
- package/docs/recipes-guide.md +243 -243
- package/docs/revit-collab-quickstart.md +445 -445
- package/docs/rhino-interop-quickstart.md +387 -387
- package/docs/sheet-sets-guide.md +69 -69
- package/package.json +1 -1
- package/resources/AGENTS.md +57 -57
- package/src/built-in/CDEManager/example.ts +214 -214
- package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
- package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
- package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
- package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
- package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
- package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
- package/src/built-in/ClashesManager/example.ts +283 -283
- package/src/built-in/GISManager/example.ts +355 -355
- package/src/built-in/ProjectManager/example.ts +124 -124
- package/src/built-in/UIManager/src/app/example.ts +97 -97
- package/src/built-in/UIManager/src/app/examples/AppState/example.ts +140 -140
- package/src/built-in/UIManager/src/app/examples/Banner/example.ts +159 -159
- package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +123 -123
- package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +124 -124
- package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +90 -90
- package/src/built-in/UIManager/src/app/examples/Modal/example.ts +163 -163
- package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +133 -133
- package/src/built-in/UIManager/src/app/examples/ProjectFileStorage/example.ts +150 -150
- package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +105 -105
- package/src/built-in/UIManager/src/clashes-panel/example.ts +183 -183
- package/src/built-in/UIManager/src/gis-panel/example.ts +163 -163
- package/src/built-in/UIManager/src/gis-properties-panel/example.ts +168 -168
- package/src/built-in/UIManager/src/git-history-panel/example.ts +70 -70
- package/src/built-in/UIManager/src/map-panel/example.ts +189 -189
- package/src/built-in/UIManager/src/models-list/example.ts +181 -181
- package/src/built-in/UIManager/src/settings-panel/example.ts +303 -303
- package/src/built-in/UIManager/src/topics-panel/example.ts +170 -170
- package/src/built-in/UIManager/src/viewer/example.ts +182 -182
- package/src/built-in/UIManager/src/viewer-toolbar/example.ts +376 -376
- package/src/built-in/index.ts +2995 -2995
- package/src/cli/templates/app/README.md +250 -250
- package/src/cli/templates/app/index.html +35 -35
- package/src/cli/templates/app/package.json +32 -32
- package/src/cli/templates/app/src/app.ts +37 -37
- package/src/cli/templates/app/src/assets/tool-placeholder.ts +50 -50
- package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -95
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
- package/src/cli/templates/app/src/bim-components/index.ts +1 -1
- package/src/cli/templates/app/src/globals.ts +1 -1
- package/src/cli/templates/app/src/main.history.ts +191 -191
- package/src/cli/templates/app/src/main.ts +226 -226
- package/src/cli/templates/app/src/setups/channel.ts +76 -76
- package/src/cli/templates/app/src/setups/reality-capture/lib/hidden-tiles-plugin.ts +88 -88
- package/src/cli/templates/app/src/setups/reality-capture/lib/point-tile-plugin.ts +166 -166
- package/src/cli/templates/app/src/setups/reality-capture/lib/render-frame.ts +31 -31
- package/src/cli/templates/app/src/setups/reality-capture/lib/splat-tile-plugin.ts +51 -51
- package/src/cli/templates/app/src/setups/reality-capture-viewer.ts +1383 -1383
- package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -26
- package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -1
- package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -15
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -37
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -1
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -14
- package/src/cli/templates/app/src/ui-components/index.ts +2 -2
- package/src/cli/templates/app/tsconfig.json +16 -16
- package/src/cli/templates/app/vite.config.js +57 -57
- package/src/cli/templates/cloud-component/README.md +205 -205
- package/src/cli/templates/cloud-component/_thatopen +5 -5
- package/src/cli/templates/cloud-component/declarations.json +4 -4
- package/src/cli/templates/cloud-component/package.json +21 -21
- package/src/cli/templates/cloud-component/src/main.ts +70 -70
- package/src/cli/templates/cloud-component/tsconfig.json +16 -16
- package/src/cli/templates/cloud-component/vite.config.js +46 -46
- package/src/cli/templates/shared/AGENTS.md +8 -8
- package/src/cli/templates/shared/CLAUDE.md +1 -1
- package/src/cli/templates/shared/_gitignore +5 -5
- package/src/core/examples/.env.example +7 -7
- package/src/core/examples/apps.ts +67 -67
- package/src/core/examples/batch-reads.ts +99 -99
- package/src/core/examples/channel.ts +65 -65
- package/src/core/examples/components.ts +91 -91
- package/src/core/examples/execution.ts +75 -75
- package/src/core/examples/file-metadata.ts +94 -94
- package/src/core/examples/files.ts +81 -81
- package/src/core/examples/folders.ts +82 -82
- package/src/core/examples/hidden-files.ts +88 -88
- package/src/core/examples/history.ts +103 -103
- package/src/core/examples/icons.ts +68 -68
- package/src/core/examples/permissions.ts +87 -87
|
@@ -1,445 +1,445 @@
|
|
|
1
|
-
# That Open — Revit Collaboration Quickstart (for AI assistants)
|
|
2
|
-
|
|
3
|
-
You are an AI assistant. A user pointed you at this guide so you can set up or join **real-time
|
|
4
|
-
Revit collaboration** through the That Open platform, and bring other things of the project (an IFC,
|
|
5
|
-
a Rhino model…) into their model with **recipes**. Follow the steps **in order**. Ask the user for anything you don't already have.
|
|
6
|
-
**You may run the setup commands yourself** — install the CLI, install the add-in, launch Revit —
|
|
7
|
-
*except* where a step says only the user can.
|
|
8
|
-
|
|
9
|
-
Works with **Revit 2024, 2025, 2026 and 2027**, and needs add-in **1.3.1 or later**.
|
|
10
|
-
`thatopen revit status` prints `addinVersion`; if it is older, Step 2 updates it. Several things
|
|
11
|
-
below did not exist or behaved differently before that.
|
|
12
|
-
|
|
13
|
-
## What this does
|
|
14
|
-
|
|
15
|
-
Two halves, and they are independent. A team can use the first without ever touching the second.
|
|
16
|
-
|
|
17
|
-
**Collaboration.** Several people work on **one shared Revit central** using Revit's own
|
|
18
|
-
worksharing. The central lives on the platform. Everyone has their own local; syncing sends their
|
|
19
|
-
changes up and brings the team's down. Syncs are **queued**, so the central never diverges.
|
|
20
|
-
|
|
21
|
-
**Recipes.** Something of the project made *outside* this Revit model — an IFC, a Rhino model, a
|
|
22
|
-
`.frag` — is brought in by a recipe, chosen and applied from inside Revit by the person working
|
|
23
|
-
there. Its changes land in one Revit transaction: an ordinary Revit edit that undoes in one step and
|
|
24
|
-
syncs like any other. Nobody else writes into the model.
|
|
25
|
-
|
|
26
|
-
Recipes are **open on purpose**. Three ship built in (`ifc-to-revit`, `frag-to-revit`,
|
|
27
|
-
`rhino-to-revit`), and a project can add its own, usually written with an AI starting from a
|
|
28
|
-
built-in: **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**.
|
|
29
|
-
|
|
30
|
-
## Rules (follow throughout)
|
|
31
|
-
|
|
32
|
-
- **Never** print, echo, store, or commit the user's access token.
|
|
33
|
-
- **Ask, don't assume.** Missing a project id, file path, or central name? Ask first.
|
|
34
|
-
- Prefer the **`thatopen` CLI** for platform actions. For the things it does not cover — reading
|
|
35
|
-
who holds what, and where elements are — talk to the **add-in's local API** as described in
|
|
36
|
-
*Talking to the add-in directly* below. Do not call the platform's own HTTP API by hand.
|
|
37
|
-
- You may **install software and launch Revit** on the user's machine. Say what you are about to
|
|
38
|
-
run, briefly, before you run it.
|
|
39
|
-
- After each command, **check the output** before moving on. A command that answered is not the
|
|
40
|
-
same as a command that did what you wanted.
|
|
41
|
-
- **Whatever you find already set up on this machine is somebody's previous session, not this
|
|
42
|
-
user's choice.** A saved login, an environment, a joined project, a model already open in Revit:
|
|
43
|
-
none of it is an answer to a question you have not asked. Report what you found and ask. This is
|
|
44
|
-
the single most likely way to get the whole thing wrong while every command succeeds.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Step 0 — Ask what the user wants to do
|
|
49
|
-
|
|
50
|
-
**Only if they have not already told you.** "I want to start a new collaborative project in Revit
|
|
51
|
-
and here is my file" is (A), said plainly. Reading it back as a four-way menu costs the user a
|
|
52
|
-
whole turn to answer something they just said, and that is the single most common way this guide
|
|
53
|
-
wastes somebody's time. Work out which one it is, say which one you took it to be in one line, and
|
|
54
|
-
carry on. Ask only for what is genuinely missing.
|
|
55
|
-
|
|
56
|
-
> "What would you like to do?
|
|
57
|
-
> (A) **Share** a Revit model with my team for the first time.
|
|
58
|
-
> (B) **Connect** to a shared central a teammate already uploaded.
|
|
59
|
-
> (C) I **already have my local open** in Revit — just sync it.
|
|
60
|
-
> (D) **Bring something into my model** — an IFC, a Rhino model — with a recipe."
|
|
61
|
-
|
|
62
|
-
Then collect what that choice needs. Ask now; you will need it below.
|
|
63
|
-
|
|
64
|
-
- **(A) Share:** the **absolute path** to the `.rvt`, a short lowercase **name** for the shared
|
|
65
|
-
central (e.g. `tower-central`), and the platform **Project ID**. The file may or may not already
|
|
66
|
-
be a workshared central — Step 3 checks. Either way **the user's original file is never
|
|
67
|
-
modified**; a copy is uploaded.
|
|
68
|
-
|
|
69
|
-
**Sharing a new central means a new project. Always send them to make one, every time:**
|
|
70
|
-
|
|
71
|
-
> "A shared central lives inside a platform project, so let's make one for it. Open
|
|
72
|
-
> **https://platform.thatopen.com/dashboard/projects**, create a project, then paste me either its
|
|
73
|
-
> id or just the URL of the page you land on — I can take the id out of the URL."
|
|
74
|
-
|
|
75
|
-
Take the **URL** if that is easier for them; the id is the segment after `/projects/`. Asking
|
|
76
|
-
somebody to copy a hex string off a settings page is a worse experience than asking for the
|
|
77
|
-
address bar, and it is the same information.
|
|
78
|
-
|
|
79
|
-
**You cannot do this part for them.** The CLI has no command to list projects and none to create
|
|
80
|
-
one, so there is no menu to offer and nothing to pick from — which also means: do not guess an id,
|
|
81
|
-
and do not reuse one you saw in `status`. Every command after this needs it, and a wrong one fails
|
|
82
|
-
with a 403 that reads like a permissions problem rather than a typo.
|
|
83
|
-
|
|
84
|
-
- **(B) Connect:** identify the existing central by **one** of:
|
|
85
|
-
- the **project folder id** of the central — the `revit-<name>` folder inside the project's
|
|
86
|
-
`bimterop` folder in the dashboard, or
|
|
87
|
-
- the **local path**, if they already have it: `C:\ThatOpenShared\<project>\<name>\<file>.rvt`.
|
|
88
|
-
|
|
89
|
-
- **(C):** nothing extra, but Revit must have their local open.
|
|
90
|
-
- **(D):** Revit must have their model open, and what they want to bring in must already be a
|
|
91
|
-
document of the same project (a file uploaded to the project through the CDE, which makes it a document).
|
|
92
|
-
|
|
93
|
-
Do **not** ask for the access token yet. That is Step 1.
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Step 1 — CLI and login
|
|
98
|
-
|
|
99
|
-
1. **CLI:**
|
|
100
|
-
```
|
|
101
|
-
npm install -g @thatopen/services@latest
|
|
102
|
-
```
|
|
103
|
-
Check `thatopen --version` prints something. Needs Node.js 18+; if `node -v` fails, ask the user
|
|
104
|
-
to install Node.js first.
|
|
105
|
-
|
|
106
|
-
2. **Token.** Ask for it, and say exactly where to get it:
|
|
107
|
-
|
|
108
|
-
> "To log in I need a That Open Platform **access token**. You create it yourself:
|
|
109
|
-
> **https://platform.thatopen.com/dashboard/data → API Tokens → create → copy**, then paste it
|
|
110
|
-
> here."
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
thatopen login --token <TOKEN>
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
That command is already right: **it logs in to production, which is where everybody is.** Do not
|
|
117
|
-
ask the user to choose an environment — there is a dev platform, it is for the people building
|
|
118
|
-
That Open Platform, and they will say so without being asked.
|
|
119
|
-
|
|
120
|
-
**Log in even if the machine is already logged in.** A saved login is whoever used this machine
|
|
121
|
-
last. Never print the token back.
|
|
122
|
-
|
|
123
|
-
[Logging in to That Open Platform](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/platform-token.md) is the short page for when this does not
|
|
124
|
-
go smoothly: what to do if the machine turns out to be pointed at dev, and why `Unauthorized` and
|
|
125
|
-
`403` mean different things.
|
|
126
|
-
|
|
127
|
-
**Log in before Step 2**, not after: installing the add-in downloads a private package and needs
|
|
128
|
-
these credentials.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Step 2 — The add-in
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
thatopen revit status
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
- Prints `"loaded": true` → the add-in is running. Check `addinVersion` is **1.3.1 or later**; if
|
|
139
|
-
not, update it with the same command as below. Then go to Step 3.
|
|
140
|
-
|
|
141
|
-
> **`status` also reports a `project`, a `doc` and a `central`. Do not use any of them.** They are
|
|
142
|
-
> whatever this machine did last, which on a colleague's laptop or a shared machine is somebody
|
|
143
|
-
> else's work. Say what you found and ask:
|
|
144
|
-
>
|
|
145
|
-
> > "This machine is still connected to project `<id>`, document `<doc>`. Do you want to keep
|
|
146
|
-
> > working on that one, connect to a different project, or share a new model?"
|
|
147
|
-
>
|
|
148
|
-
> Publishing into the wrong project succeeds, looks completely normal, and puts somebody's model
|
|
149
|
-
> somewhere their team cannot see it.
|
|
150
|
-
- Errors *"The That Open Revit add-in is not running"* → work through (a), then (b).
|
|
151
|
-
|
|
152
|
-
**(a) Is Revit open?** If not, ask the user which Revit year they work in (2024 to 2027; a machine
|
|
153
|
-
can have several) and launch that one:
|
|
154
|
-
```
|
|
155
|
-
powershell -Command "Start-Process 'C:\Program Files\Autodesk\Revit <year>\Revit.exe'"
|
|
156
|
-
```
|
|
157
|
-
A cold start takes a while. Re-run `thatopen revit status`.
|
|
158
|
-
|
|
159
|
-
**(b) Revit is open but status still errors → install the add-in.** Revit must be **closed** for
|
|
160
|
-
this, because it holds its add-in files open while it runs. Ask the user to close it, then:
|
|
161
|
-
```
|
|
162
|
-
thatopen revit install
|
|
163
|
-
```
|
|
164
|
-
This fetches the current package from the registry and runs the installer that ships inside it.
|
|
165
|
-
It installs for **every** supported Revit year on the machine at once, each in its own folder.
|
|
166
|
-
`--version <v>` pins a specific one; the default is the latest.
|
|
167
|
-
|
|
168
|
-
On Revit 2024 and 2025, a recipe that attaches a wall's top to a roof or floor leaves that wall
|
|
169
|
-
unattached and says so in its notes: Revit only exposes wall attachment to add-ins from 2026.
|
|
170
|
-
|
|
171
|
-
Then **launch Revit again**. On the first start after an install, Revit shows an **unsigned add-in**
|
|
172
|
-
prompt. **Only the user can answer it — ask them to choose "Always Load".** There is no way around
|
|
173
|
-
it from a script, and it comes back after every update until the add-in is signed.
|
|
174
|
-
|
|
175
|
-
Re-run `thatopen revit status` every ten seconds or so until `"loaded": true`.
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## Step 3 — Do the action
|
|
180
|
-
|
|
181
|
-
### (A) Share a model — one command
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
thatopen revit share --file "<FILE>" --project <PROJECT>
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
That is the whole of it. `share` installs the add-in if nothing is listening, starts Revit and
|
|
188
|
-
waits for it, checks whether the file is already a central, publishes it, and opens the user's own
|
|
189
|
-
local. It prints each of the five steps as it reaches them, so a long silence is always a step you
|
|
190
|
-
can name.
|
|
191
|
-
|
|
192
|
-
- **`--doc <name>`** is optional. Left out, it comes from the file name, kebab-cased.
|
|
193
|
-
- **`--project`** takes the dashboard URL as happily as the id.
|
|
194
|
-
- **The original file is never modified.** Everything happens on a copy, which is why `share` does
|
|
195
|
-
not need to ask before converting: there is nothing to lose. Say so rather than asking.
|
|
196
|
-
- **It joins at the end on purpose.** Sharing a model and then carrying on in the original file is
|
|
197
|
-
the one reliable way to end up outside your own team.
|
|
198
|
-
|
|
199
|
-
Steps 1 and 2 (CLI, login, add-in) still have to have happened: `share` installs the add-in but it
|
|
200
|
-
cannot log in for somebody.
|
|
201
|
-
|
|
202
|
-
If you need the pieces separately — a central that already exists, a different convert decision,
|
|
203
|
-
scripting around it — they are still there: `thatopen revit inspect --file`, then
|
|
204
|
-
`thatopen revit publish-central --project --doc --file [--convert]`, then `thatopen revit join`.
|
|
205
|
-
|
|
206
|
-
### (B) Connect to a central — `join`
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
thatopen revit join --folder-id <FOLDER_ID>
|
|
210
|
-
thatopen revit join --path "C:\ThatOpenShared\<project>\<name>\<file>.rvt"
|
|
211
|
-
```
|
|
212
|
-
`--project <PROJECT> --doc <DOC>` also works when the user knows both. This downloads the central,
|
|
213
|
-
creates the user's local, and opens it.
|
|
214
|
-
|
|
215
|
-
### (C) Already have a local open — `sync`
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
thatopen revit sync
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### (D) Bring something in with a recipe
|
|
222
|
-
|
|
223
|
-
Go to **Step 6**.
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Step 4 — Work, then sync
|
|
228
|
-
|
|
229
|
-
Tell the user to **model normally**. To send their changes and pull the team's, they use **Revit's
|
|
230
|
-
own Synchronize with Central** on the Collaborate tab, exactly as on any worksharing job. The add-in
|
|
231
|
-
listens for it: it takes a turn in the team queue and brings the central up to date *before* Revit
|
|
232
|
-
merges, then publishes the result. A corner notice reports each step and ends with
|
|
233
|
-
`Synced. vN → vM.`
|
|
234
|
-
|
|
235
|
-
There is no "sync to team" button, on purpose. Two buttons that must mean the same thing are a
|
|
236
|
-
question nobody should have to answer twice a day.
|
|
237
|
-
|
|
238
|
-
For a script or an agent, the same round trip is `thatopen revit sync`.
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Step 5 — Worksets, so two people don't edit the same thing
|
|
243
|
-
|
|
244
|
-
**Claiming one is Revit's own dialog:** Collaborate → Worksets, tick *Editable* on the row you want.
|
|
245
|
-
Same dialog, same rules and same messages as any Revit job. Ownership reaches everybody within
|
|
246
|
-
seconds, because the add-in replicates the worksharing files the central keeps beside it and each
|
|
247
|
-
Revit re-reads them by itself.
|
|
248
|
-
|
|
249
|
-
Only **one person at a time** owns a workset, and **Revit** enforces it: a teammate who tries to
|
|
250
|
-
take what you hold is told who holds it. That also means only *you* can give yours back — there is
|
|
251
|
-
no API that relinquishes on somebody else's behalf, so "ask them to release it" is the real answer
|
|
252
|
-
rather than a workaround.
|
|
253
|
-
|
|
254
|
-
**Release** by relinquishing in Revit, or simply by syncing, which relinquishes as part of the
|
|
255
|
-
dialog's terms.
|
|
256
|
-
|
|
257
|
-
From a script:
|
|
258
|
-
```
|
|
259
|
-
thatopen revit worksets # who holds what
|
|
260
|
-
thatopen revit take --workset "<NAME>"
|
|
261
|
-
thatopen revit untake --workset "<NAME>"
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
> Editing an element makes you its **borrower** automatically, element by element. Taking a workset
|
|
265
|
-
> makes you its **owner**. Revit only blocks editing worksets owned by **somebody else**; free ones
|
|
266
|
-
> are borrowed on demand.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Step 6 — Recipes: bring something into the model
|
|
271
|
-
|
|
272
|
-
A recipe brings something of the project — an IFC, a Rhino model, a `.frag` — into this Revit model
|
|
273
|
-
as native Revit elements. It is chosen and applied **from inside Revit**, by the person whose model
|
|
274
|
-
it is, in one go. There is nothing to send, approve or wait for.
|
|
275
|
-
|
|
276
|
-
**The source has to be in the project first.** An IFC uploaded to the project, a Rhino model
|
|
277
|
-
published from Rhino (**[Rhino → Revit, start to finish](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/rhino-interop-quickstart.md)**
|
|
278
|
-
covers that side). The recipe reads it from the platform, at the version it is on.
|
|
279
|
-
|
|
280
|
-
Tell the user the two commands on the **That Open** ribbon:
|
|
281
|
-
|
|
282
|
-
1. **That Open > Select recipe.** Pick the recipe — the built-ins (`ifc-to-revit`, `frag-to-revit`,
|
|
283
|
-
`rhino-to-revit`) and any the project made itself, marked "this project" with their version —
|
|
284
|
-
then its **source** from the list of the project's documents it can read, then its settings.
|
|
285
|
-
"More…" shows what the recipe does and what it leaves out. The choice is remembered with the
|
|
286
|
-
model, so this is done once.
|
|
287
|
-
2. **That Open > Update.** The recipe runs inside the add-in and its changes are written at
|
|
288
|
-
once, in **one** Revit transaction. **Ctrl+Z undoes it whole**; closing without saving, or going
|
|
289
|
-
back in the history, reverts it like any other edit.
|
|
290
|
-
|
|
291
|
-
**Applying again writes only what changed** in the source since the last apply. With no change it
|
|
292
|
-
says **"Nothing imported"** — that is the answer, not an error. What each recipe made is remembered
|
|
293
|
-
in the model's own That Open data on the platform, so this works from any machine with that model.
|
|
294
|
-
|
|
295
|
-
The change is in the local only; the user still syncs (Step 4) to publish it. That commit is
|
|
296
|
-
marked as a recipe's: the history panel shows it with a recipe mark and a title such as
|
|
297
|
-
«IFC to Revit: 6 level(s), 47 wall(s)…», «from racbasicsampleproject.ifc v1» — which recipe, and
|
|
298
|
-
which version of which source, made it.
|
|
299
|
-
|
|
300
|
-
**Expect this one, it is not a bug:** elements a recipe adds land on the document's **active**
|
|
301
|
-
workset, so whoever applies has to be able to edit *that* one — often `Workset1`, which nobody
|
|
302
|
-
thinks of as theirs.
|
|
303
|
-
|
|
304
|
-
**Verify with coordinates, not with the word "applied".** After applying, `POST /where` with
|
|
305
|
-
`{ "uids": [ … ] }` gives each element's position in metres. If the title says four columns, check
|
|
306
|
-
that four columns are where the source put them. "Applied" and "applied to three of the four" read
|
|
307
|
-
identically in a notice and differently in a model.
|
|
308
|
-
|
|
309
|
-
If the user wants a recipe that does not exist yet — *"a column at every point of this layer"*,
|
|
310
|
-
*"a room for every space of this spreadsheet"* — that is
|
|
311
|
-
**[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**:
|
|
312
|
-
written with you, tested without Revit, saved in the project, and then listed in Select recipe.
|
|
313
|
-
If they want their own application to take part — be a source, or updates itself —
|
|
314
|
-
**[Writing a flow plugin](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-plugin-guide.md)** is the byte
|
|
315
|
-
contract, and **[the architecture notes](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-architecture.md)** say why it is shaped that way.
|
|
316
|
-
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## Step 7 — Offer them a viewer that shows the progress
|
|
320
|
-
|
|
321
|
-
**Offer this as soon as the central exists — right after Step 3, before they start working.** Not
|
|
322
|
-
at the end. Every sync from that moment on becomes a commit they can watch arrive, and setting it up
|
|
323
|
-
costs the same on day one as on day thirty. Left to the end it sounds like an extra; offered at the
|
|
324
|
-
start it is the thing that makes the rest visible.
|
|
325
|
-
|
|
326
|
-
Every sync is a commit, and the platform keeps the lot: who changed what, when, and the geometry as
|
|
327
|
-
it was at each version. Nothing in Revit shows that back, and it is the first thing people ask —
|
|
328
|
-
*what has changed since Friday?*
|
|
329
|
-
|
|
330
|
-
Say it plainly and wait:
|
|
331
|
-
|
|
332
|
-
> "Everything you sync is stored as a history. Would you like a viewer that shows it — pick any
|
|
333
|
-
> version and see what was created, modified and deleted, coloured in 3D?"
|
|
334
|
-
|
|
335
|
-
If they say yes, that is an **app**, and building one is
|
|
336
|
-
**[the platform AI quick start](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/ai-quickstart.md)** — scaffold with the `app` template and follow
|
|
337
|
-
it.
|
|
338
|
-
|
|
339
|
-
**Do not ask them how to add the panel.** Add a **new layout** called `History`, and leave the
|
|
340
|
-
scaffold's own layouts alone. It is a two-line change, it keeps the app they were given intact, and
|
|
341
|
-
it is the answer every time — asking hands somebody a UI decision about a screen they have not seen
|
|
342
|
-
yet.
|
|
343
|
-
|
|
344
|
-
```ts
|
|
345
|
-
app.elements = {
|
|
346
|
-
...app.elements,
|
|
347
|
-
history: () => html`<top-git-history></top-git-history>`,
|
|
348
|
-
};
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
**For the layout, copy one of the scaffold's own panel layouts and swap its panel for `history`** —
|
|
352
|
-
same side, same width, same shape. Do not choose a side and do not pick a width: the app already
|
|
353
|
-
answered both, and the answer is written in `app.layouts` right there in `main.ts`.
|
|
354
|
-
|
|
355
|
-
A panel that opens on the opposite side from every other one, at a different size, is the first
|
|
356
|
-
thing anybody notices, and it reads as bolted on however good the contents are.
|
|
357
|
-
|
|
358
|
-
For the layout's `icon`, use **`at-icons:git-branch`** — That Open's own icon set, and the branch
|
|
359
|
-
mark is what the panel actually shows.
|
|
360
|
-
|
|
361
|
-
What makes it a history viewer rather than an empty viewer is a built-in component that already
|
|
362
|
-
exists, so nobody writes this part:
|
|
363
|
-
|
|
364
|
-
- **`GitHistoryManager`** — the headless half. It reads `revitflow_history.json` and the per-commit
|
|
365
|
-
`revitflow_frag_<N>.frag` files the add-in writes under `bimterop/revit-<docId>/`, loads the
|
|
366
|
-
model, and colours a commit's elements: **green created, blue modified, red deleted**. It has an
|
|
367
|
-
`isolateChanges` mode that ghosts everything else, which is the one people keep on.
|
|
368
|
-
- **`top-git-history`** — the panel, registered by `UIManager`. It only asks the manager for things
|
|
369
|
-
and listens; all the viewer work is on the manager.
|
|
370
|
-
|
|
371
|
-
Two things to say honestly when you offer it. The history only goes back as far as the team's first
|
|
372
|
-
sync through this add-in — it is not read out of the `.rvt`. And a commit's colours come from what
|
|
373
|
-
the add-in recorded at sync time, so a change somebody made and never synced is not in it, the same
|
|
374
|
-
way it is not in anybody else's model.
|
|
375
|
-
|
|
376
|
-
---
|
|
377
|
-
|
|
378
|
-
## Talking to the add-in directly
|
|
379
|
-
|
|
380
|
-
The add-in serves a small HTTP API on **127.0.0.1**, and it is the same surface the CLI drives: a
|
|
381
|
-
person clicking and a script deciding are the same operation. Use it for what the CLI does not
|
|
382
|
-
cover. Do not use it to skip a CLI command that exists.
|
|
383
|
-
|
|
384
|
-
**Find it.** The port and the token change every launch, so read them rather than configuring them:
|
|
385
|
-
|
|
386
|
-
```
|
|
387
|
-
%APPDATA%\ThatOpen\revit-addin.json → { "port": …, "token": "…", "pid": … }
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
Send the token as the header **`X-RevitFlow-Token`**, POST JSON, read JSON back. The endpoints this
|
|
391
|
-
guide uses are `status`, `where` and `worksets`.
|
|
392
|
-
|
|
393
|
-
Three things that will otherwise mislead you:
|
|
394
|
-
|
|
395
|
-
- **`worksets` has `revitOwner` and `tocOwner`, and no field called `owner`.** Reading `owner`
|
|
396
|
-
returns nothing for every row, which looks exactly like "nobody owns anything" and is a lie.
|
|
397
|
-
`revitOwner` is Revit's answer, and Revit's answer is the one that decides.
|
|
398
|
-
- **The add-in serves one request at a time.** A machine in the middle of a sync answers nothing,
|
|
399
|
-
and from outside that is indistinguishable from a crash. Diagnose from
|
|
400
|
-
`%APPDATA%\ThatOpen\revitflow.log`, which keeps being written throughout. Never conclude anything
|
|
401
|
-
from a timeout alone.
|
|
402
|
-
- **A modal dialog in Revit stops everything.** The add-in does its work when Revit is idle, and a
|
|
403
|
-
dialog waiting for a click means Revit never is. If a call hangs, ask the user to look at Revit's
|
|
404
|
-
window before assuming something is broken.
|
|
405
|
-
|
|
406
|
-
---
|
|
407
|
-
|
|
408
|
-
## Troubleshooting
|
|
409
|
-
|
|
410
|
-
- **`thatopen login` fails with "Unauthorized"** → the token is invalid, expired, or from the other
|
|
411
|
-
environment. Production tokens use no `--api-url`; dev tokens use
|
|
412
|
-
`--api-url https://dev.platform.thatopen.com`. Ask for a fresh one from the same environment.
|
|
413
|
-
- **HTTP 403 on `item/folder?projectId=…`** → login worked, but that account has no access to that
|
|
414
|
-
Project ID. Confirm the id and the environment with the user.
|
|
415
|
-
- **"add-in not running" while Revit is open** → it is not installed. Step 2(b).
|
|
416
|
-
- **`thatopen revit install` refuses** → Revit is still open. Close it.
|
|
417
|
-
- **`take` answers `taken: false` with `deniedBy`** → somebody else holds that workset. Expected,
|
|
418
|
-
not an error. Ask them to release and sync, or take another.
|
|
419
|
-
- **`take` answers `offline: true`** → the platform is unreachable. The take is **refused, not
|
|
420
|
-
queued**, and deliberately: the platform is what arbitrates the race, so with it gone nobody can
|
|
421
|
-
know whether a colleague already holds it. Nothing was changed. Retry when `status` says
|
|
422
|
-
`online: true`.
|
|
423
|
-
- **`locks` answers `offline: true` instead of a list** → the same outage. That is **not** an empty
|
|
424
|
-
list; claims still stand. `worksets` still answers from Revit with `registry: false`, and that
|
|
425
|
-
half needs no network at all — use it to see what the user themselves holds.
|
|
426
|
-
- **A teammate can still edit "my" workset** → ownership has not reached them yet. You must sync
|
|
427
|
-
after taking it, and they must sync afterwards.
|
|
428
|
-
- **Update is refused on a workset nobody seems to own** → it is probably the **active**
|
|
429
|
-
workset, where the recipe's new elements land. See Step 6.
|
|
430
|
-
- **Update says "Nothing imported"** → the source has not changed since the last apply.
|
|
431
|
-
Expected. Publish or upload a new version of the source first.
|
|
432
|
-
- **Everything hangs and nothing new is in the log** → a Revit dialog is waiting for a click.
|
|
433
|
-
|
|
434
|
-
---
|
|
435
|
-
|
|
436
|
-
## Rules recap (for the AI)
|
|
437
|
-
|
|
438
|
-
- Ask for every value you do not have. Never guess a project id, a file path or a central name.
|
|
439
|
-
- Never echo or store the token.
|
|
440
|
-
- You may install the CLI and the add-in and launch Revit. Only the "Always Load" prompt needs the
|
|
441
|
-
user — and so does applying a recipe, which is an edit of their model made from their Revit.
|
|
442
|
-
- CLI first; the add-in's local API for reading ownership and positions; never the platform's own
|
|
443
|
-
HTTP API by hand.
|
|
444
|
-
- Read each answer before the next step, and prefer a measured value to a status word: coordinates
|
|
445
|
-
over "applied", `revitOwner` over "it should be fine".
|
|
1
|
+
# That Open — Revit Collaboration Quickstart (for AI assistants)
|
|
2
|
+
|
|
3
|
+
You are an AI assistant. A user pointed you at this guide so you can set up or join **real-time
|
|
4
|
+
Revit collaboration** through the That Open platform, and bring other things of the project (an IFC,
|
|
5
|
+
a Rhino model…) into their model with **recipes**. Follow the steps **in order**. Ask the user for anything you don't already have.
|
|
6
|
+
**You may run the setup commands yourself** — install the CLI, install the add-in, launch Revit —
|
|
7
|
+
*except* where a step says only the user can.
|
|
8
|
+
|
|
9
|
+
Works with **Revit 2024, 2025, 2026 and 2027**, and needs add-in **1.3.1 or later**.
|
|
10
|
+
`thatopen revit status` prints `addinVersion`; if it is older, Step 2 updates it. Several things
|
|
11
|
+
below did not exist or behaved differently before that.
|
|
12
|
+
|
|
13
|
+
## What this does
|
|
14
|
+
|
|
15
|
+
Two halves, and they are independent. A team can use the first without ever touching the second.
|
|
16
|
+
|
|
17
|
+
**Collaboration.** Several people work on **one shared Revit central** using Revit's own
|
|
18
|
+
worksharing. The central lives on the platform. Everyone has their own local; syncing sends their
|
|
19
|
+
changes up and brings the team's down. Syncs are **queued**, so the central never diverges.
|
|
20
|
+
|
|
21
|
+
**Recipes.** Something of the project made *outside* this Revit model — an IFC, a Rhino model, a
|
|
22
|
+
`.frag` — is brought in by a recipe, chosen and applied from inside Revit by the person working
|
|
23
|
+
there. Its changes land in one Revit transaction: an ordinary Revit edit that undoes in one step and
|
|
24
|
+
syncs like any other. Nobody else writes into the model.
|
|
25
|
+
|
|
26
|
+
Recipes are **open on purpose**. Three ship built in (`ifc-to-revit`, `frag-to-revit`,
|
|
27
|
+
`rhino-to-revit`), and a project can add its own, usually written with an AI starting from a
|
|
28
|
+
built-in: **[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**.
|
|
29
|
+
|
|
30
|
+
## Rules (follow throughout)
|
|
31
|
+
|
|
32
|
+
- **Never** print, echo, store, or commit the user's access token.
|
|
33
|
+
- **Ask, don't assume.** Missing a project id, file path, or central name? Ask first.
|
|
34
|
+
- Prefer the **`thatopen` CLI** for platform actions. For the things it does not cover — reading
|
|
35
|
+
who holds what, and where elements are — talk to the **add-in's local API** as described in
|
|
36
|
+
*Talking to the add-in directly* below. Do not call the platform's own HTTP API by hand.
|
|
37
|
+
- You may **install software and launch Revit** on the user's machine. Say what you are about to
|
|
38
|
+
run, briefly, before you run it.
|
|
39
|
+
- After each command, **check the output** before moving on. A command that answered is not the
|
|
40
|
+
same as a command that did what you wanted.
|
|
41
|
+
- **Whatever you find already set up on this machine is somebody's previous session, not this
|
|
42
|
+
user's choice.** A saved login, an environment, a joined project, a model already open in Revit:
|
|
43
|
+
none of it is an answer to a question you have not asked. Report what you found and ask. This is
|
|
44
|
+
the single most likely way to get the whole thing wrong while every command succeeds.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step 0 — Ask what the user wants to do
|
|
49
|
+
|
|
50
|
+
**Only if they have not already told you.** "I want to start a new collaborative project in Revit
|
|
51
|
+
and here is my file" is (A), said plainly. Reading it back as a four-way menu costs the user a
|
|
52
|
+
whole turn to answer something they just said, and that is the single most common way this guide
|
|
53
|
+
wastes somebody's time. Work out which one it is, say which one you took it to be in one line, and
|
|
54
|
+
carry on. Ask only for what is genuinely missing.
|
|
55
|
+
|
|
56
|
+
> "What would you like to do?
|
|
57
|
+
> (A) **Share** a Revit model with my team for the first time.
|
|
58
|
+
> (B) **Connect** to a shared central a teammate already uploaded.
|
|
59
|
+
> (C) I **already have my local open** in Revit — just sync it.
|
|
60
|
+
> (D) **Bring something into my model** — an IFC, a Rhino model — with a recipe."
|
|
61
|
+
|
|
62
|
+
Then collect what that choice needs. Ask now; you will need it below.
|
|
63
|
+
|
|
64
|
+
- **(A) Share:** the **absolute path** to the `.rvt`, a short lowercase **name** for the shared
|
|
65
|
+
central (e.g. `tower-central`), and the platform **Project ID**. The file may or may not already
|
|
66
|
+
be a workshared central — Step 3 checks. Either way **the user's original file is never
|
|
67
|
+
modified**; a copy is uploaded.
|
|
68
|
+
|
|
69
|
+
**Sharing a new central means a new project. Always send them to make one, every time:**
|
|
70
|
+
|
|
71
|
+
> "A shared central lives inside a platform project, so let's make one for it. Open
|
|
72
|
+
> **https://platform.thatopen.com/dashboard/projects**, create a project, then paste me either its
|
|
73
|
+
> id or just the URL of the page you land on — I can take the id out of the URL."
|
|
74
|
+
|
|
75
|
+
Take the **URL** if that is easier for them; the id is the segment after `/projects/`. Asking
|
|
76
|
+
somebody to copy a hex string off a settings page is a worse experience than asking for the
|
|
77
|
+
address bar, and it is the same information.
|
|
78
|
+
|
|
79
|
+
**You cannot do this part for them.** The CLI has no command to list projects and none to create
|
|
80
|
+
one, so there is no menu to offer and nothing to pick from — which also means: do not guess an id,
|
|
81
|
+
and do not reuse one you saw in `status`. Every command after this needs it, and a wrong one fails
|
|
82
|
+
with a 403 that reads like a permissions problem rather than a typo.
|
|
83
|
+
|
|
84
|
+
- **(B) Connect:** identify the existing central by **one** of:
|
|
85
|
+
- the **project folder id** of the central — the `revit-<name>` folder inside the project's
|
|
86
|
+
`bimterop` folder in the dashboard, or
|
|
87
|
+
- the **local path**, if they already have it: `C:\ThatOpenShared\<project>\<name>\<file>.rvt`.
|
|
88
|
+
|
|
89
|
+
- **(C):** nothing extra, but Revit must have their local open.
|
|
90
|
+
- **(D):** Revit must have their model open, and what they want to bring in must already be a
|
|
91
|
+
document of the same project (a file uploaded to the project through the CDE, which makes it a document).
|
|
92
|
+
|
|
93
|
+
Do **not** ask for the access token yet. That is Step 1.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Step 1 — CLI and login
|
|
98
|
+
|
|
99
|
+
1. **CLI:**
|
|
100
|
+
```
|
|
101
|
+
npm install -g @thatopen/services@latest
|
|
102
|
+
```
|
|
103
|
+
Check `thatopen --version` prints something. Needs Node.js 18+; if `node -v` fails, ask the user
|
|
104
|
+
to install Node.js first.
|
|
105
|
+
|
|
106
|
+
2. **Token.** Ask for it, and say exactly where to get it:
|
|
107
|
+
|
|
108
|
+
> "To log in I need a That Open Platform **access token**. You create it yourself:
|
|
109
|
+
> **https://platform.thatopen.com/dashboard/data → API Tokens → create → copy**, then paste it
|
|
110
|
+
> here."
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
thatopen login --token <TOKEN>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
That command is already right: **it logs in to production, which is where everybody is.** Do not
|
|
117
|
+
ask the user to choose an environment — there is a dev platform, it is for the people building
|
|
118
|
+
That Open Platform, and they will say so without being asked.
|
|
119
|
+
|
|
120
|
+
**Log in even if the machine is already logged in.** A saved login is whoever used this machine
|
|
121
|
+
last. Never print the token back.
|
|
122
|
+
|
|
123
|
+
[Logging in to That Open Platform](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/platform-token.md) is the short page for when this does not
|
|
124
|
+
go smoothly: what to do if the machine turns out to be pointed at dev, and why `Unauthorized` and
|
|
125
|
+
`403` mean different things.
|
|
126
|
+
|
|
127
|
+
**Log in before Step 2**, not after: installing the add-in downloads a private package and needs
|
|
128
|
+
these credentials.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Step 2 — The add-in
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
thatopen revit status
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- Prints `"loaded": true` → the add-in is running. Check `addinVersion` is **1.3.1 or later**; if
|
|
139
|
+
not, update it with the same command as below. Then go to Step 3.
|
|
140
|
+
|
|
141
|
+
> **`status` also reports a `project`, a `doc` and a `central`. Do not use any of them.** They are
|
|
142
|
+
> whatever this machine did last, which on a colleague's laptop or a shared machine is somebody
|
|
143
|
+
> else's work. Say what you found and ask:
|
|
144
|
+
>
|
|
145
|
+
> > "This machine is still connected to project `<id>`, document `<doc>`. Do you want to keep
|
|
146
|
+
> > working on that one, connect to a different project, or share a new model?"
|
|
147
|
+
>
|
|
148
|
+
> Publishing into the wrong project succeeds, looks completely normal, and puts somebody's model
|
|
149
|
+
> somewhere their team cannot see it.
|
|
150
|
+
- Errors *"The That Open Revit add-in is not running"* → work through (a), then (b).
|
|
151
|
+
|
|
152
|
+
**(a) Is Revit open?** If not, ask the user which Revit year they work in (2024 to 2027; a machine
|
|
153
|
+
can have several) and launch that one:
|
|
154
|
+
```
|
|
155
|
+
powershell -Command "Start-Process 'C:\Program Files\Autodesk\Revit <year>\Revit.exe'"
|
|
156
|
+
```
|
|
157
|
+
A cold start takes a while. Re-run `thatopen revit status`.
|
|
158
|
+
|
|
159
|
+
**(b) Revit is open but status still errors → install the add-in.** Revit must be **closed** for
|
|
160
|
+
this, because it holds its add-in files open while it runs. Ask the user to close it, then:
|
|
161
|
+
```
|
|
162
|
+
thatopen revit install
|
|
163
|
+
```
|
|
164
|
+
This fetches the current package from the registry and runs the installer that ships inside it.
|
|
165
|
+
It installs for **every** supported Revit year on the machine at once, each in its own folder.
|
|
166
|
+
`--version <v>` pins a specific one; the default is the latest.
|
|
167
|
+
|
|
168
|
+
On Revit 2024 and 2025, a recipe that attaches a wall's top to a roof or floor leaves that wall
|
|
169
|
+
unattached and says so in its notes: Revit only exposes wall attachment to add-ins from 2026.
|
|
170
|
+
|
|
171
|
+
Then **launch Revit again**. On the first start after an install, Revit shows an **unsigned add-in**
|
|
172
|
+
prompt. **Only the user can answer it — ask them to choose "Always Load".** There is no way around
|
|
173
|
+
it from a script, and it comes back after every update until the add-in is signed.
|
|
174
|
+
|
|
175
|
+
Re-run `thatopen revit status` every ten seconds or so until `"loaded": true`.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Step 3 — Do the action
|
|
180
|
+
|
|
181
|
+
### (A) Share a model — one command
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
thatopen revit share --file "<FILE>" --project <PROJECT>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
That is the whole of it. `share` installs the add-in if nothing is listening, starts Revit and
|
|
188
|
+
waits for it, checks whether the file is already a central, publishes it, and opens the user's own
|
|
189
|
+
local. It prints each of the five steps as it reaches them, so a long silence is always a step you
|
|
190
|
+
can name.
|
|
191
|
+
|
|
192
|
+
- **`--doc <name>`** is optional. Left out, it comes from the file name, kebab-cased.
|
|
193
|
+
- **`--project`** takes the dashboard URL as happily as the id.
|
|
194
|
+
- **The original file is never modified.** Everything happens on a copy, which is why `share` does
|
|
195
|
+
not need to ask before converting: there is nothing to lose. Say so rather than asking.
|
|
196
|
+
- **It joins at the end on purpose.** Sharing a model and then carrying on in the original file is
|
|
197
|
+
the one reliable way to end up outside your own team.
|
|
198
|
+
|
|
199
|
+
Steps 1 and 2 (CLI, login, add-in) still have to have happened: `share` installs the add-in but it
|
|
200
|
+
cannot log in for somebody.
|
|
201
|
+
|
|
202
|
+
If you need the pieces separately — a central that already exists, a different convert decision,
|
|
203
|
+
scripting around it — they are still there: `thatopen revit inspect --file`, then
|
|
204
|
+
`thatopen revit publish-central --project --doc --file [--convert]`, then `thatopen revit join`.
|
|
205
|
+
|
|
206
|
+
### (B) Connect to a central — `join`
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
thatopen revit join --folder-id <FOLDER_ID>
|
|
210
|
+
thatopen revit join --path "C:\ThatOpenShared\<project>\<name>\<file>.rvt"
|
|
211
|
+
```
|
|
212
|
+
`--project <PROJECT> --doc <DOC>` also works when the user knows both. This downloads the central,
|
|
213
|
+
creates the user's local, and opens it.
|
|
214
|
+
|
|
215
|
+
### (C) Already have a local open — `sync`
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
thatopen revit sync
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### (D) Bring something in with a recipe
|
|
222
|
+
|
|
223
|
+
Go to **Step 6**.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Step 4 — Work, then sync
|
|
228
|
+
|
|
229
|
+
Tell the user to **model normally**. To send their changes and pull the team's, they use **Revit's
|
|
230
|
+
own Synchronize with Central** on the Collaborate tab, exactly as on any worksharing job. The add-in
|
|
231
|
+
listens for it: it takes a turn in the team queue and brings the central up to date *before* Revit
|
|
232
|
+
merges, then publishes the result. A corner notice reports each step and ends with
|
|
233
|
+
`Synced. vN → vM.`
|
|
234
|
+
|
|
235
|
+
There is no "sync to team" button, on purpose. Two buttons that must mean the same thing are a
|
|
236
|
+
question nobody should have to answer twice a day.
|
|
237
|
+
|
|
238
|
+
For a script or an agent, the same round trip is `thatopen revit sync`.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Step 5 — Worksets, so two people don't edit the same thing
|
|
243
|
+
|
|
244
|
+
**Claiming one is Revit's own dialog:** Collaborate → Worksets, tick *Editable* on the row you want.
|
|
245
|
+
Same dialog, same rules and same messages as any Revit job. Ownership reaches everybody within
|
|
246
|
+
seconds, because the add-in replicates the worksharing files the central keeps beside it and each
|
|
247
|
+
Revit re-reads them by itself.
|
|
248
|
+
|
|
249
|
+
Only **one person at a time** owns a workset, and **Revit** enforces it: a teammate who tries to
|
|
250
|
+
take what you hold is told who holds it. That also means only *you* can give yours back — there is
|
|
251
|
+
no API that relinquishes on somebody else's behalf, so "ask them to release it" is the real answer
|
|
252
|
+
rather than a workaround.
|
|
253
|
+
|
|
254
|
+
**Release** by relinquishing in Revit, or simply by syncing, which relinquishes as part of the
|
|
255
|
+
dialog's terms.
|
|
256
|
+
|
|
257
|
+
From a script:
|
|
258
|
+
```
|
|
259
|
+
thatopen revit worksets # who holds what
|
|
260
|
+
thatopen revit take --workset "<NAME>"
|
|
261
|
+
thatopen revit untake --workset "<NAME>"
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
> Editing an element makes you its **borrower** automatically, element by element. Taking a workset
|
|
265
|
+
> makes you its **owner**. Revit only blocks editing worksets owned by **somebody else**; free ones
|
|
266
|
+
> are borrowed on demand.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Step 6 — Recipes: bring something into the model
|
|
271
|
+
|
|
272
|
+
A recipe brings something of the project — an IFC, a Rhino model, a `.frag` — into this Revit model
|
|
273
|
+
as native Revit elements. It is chosen and applied **from inside Revit**, by the person whose model
|
|
274
|
+
it is, in one go. There is nothing to send, approve or wait for.
|
|
275
|
+
|
|
276
|
+
**The source has to be in the project first.** An IFC uploaded to the project, a Rhino model
|
|
277
|
+
published from Rhino (**[Rhino → Revit, start to finish](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/rhino-interop-quickstart.md)**
|
|
278
|
+
covers that side). The recipe reads it from the platform, at the version it is on.
|
|
279
|
+
|
|
280
|
+
Tell the user the two commands on the **That Open** ribbon:
|
|
281
|
+
|
|
282
|
+
1. **That Open > Select recipe.** Pick the recipe — the built-ins (`ifc-to-revit`, `frag-to-revit`,
|
|
283
|
+
`rhino-to-revit`) and any the project made itself, marked "this project" with their version —
|
|
284
|
+
then its **source** from the list of the project's documents it can read, then its settings.
|
|
285
|
+
"More…" shows what the recipe does and what it leaves out. The choice is remembered with the
|
|
286
|
+
model, so this is done once.
|
|
287
|
+
2. **That Open > Update.** The recipe runs inside the add-in and its changes are written at
|
|
288
|
+
once, in **one** Revit transaction. **Ctrl+Z undoes it whole**; closing without saving, or going
|
|
289
|
+
back in the history, reverts it like any other edit.
|
|
290
|
+
|
|
291
|
+
**Applying again writes only what changed** in the source since the last apply. With no change it
|
|
292
|
+
says **"Nothing imported"** — that is the answer, not an error. What each recipe made is remembered
|
|
293
|
+
in the model's own That Open data on the platform, so this works from any machine with that model.
|
|
294
|
+
|
|
295
|
+
The change is in the local only; the user still syncs (Step 4) to publish it. That commit is
|
|
296
|
+
marked as a recipe's: the history panel shows it with a recipe mark and a title such as
|
|
297
|
+
«IFC to Revit: 6 level(s), 47 wall(s)…», «from racbasicsampleproject.ifc v1» — which recipe, and
|
|
298
|
+
which version of which source, made it.
|
|
299
|
+
|
|
300
|
+
**Expect this one, it is not a bug:** elements a recipe adds land on the document's **active**
|
|
301
|
+
workset, so whoever applies has to be able to edit *that* one — often `Workset1`, which nobody
|
|
302
|
+
thinks of as theirs.
|
|
303
|
+
|
|
304
|
+
**Verify with coordinates, not with the word "applied".** After applying, `POST /where` with
|
|
305
|
+
`{ "uids": [ … ] }` gives each element's position in metres. If the title says four columns, check
|
|
306
|
+
that four columns are where the source put them. "Applied" and "applied to three of the four" read
|
|
307
|
+
identically in a notice and differently in a model.
|
|
308
|
+
|
|
309
|
+
If the user wants a recipe that does not exist yet — *"a column at every point of this layer"*,
|
|
310
|
+
*"a room for every space of this spreadsheet"* — that is
|
|
311
|
+
**[Writing a recipe](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/recipes-guide.md)**:
|
|
312
|
+
written with you, tested without Revit, saved in the project, and then listed in Select recipe.
|
|
313
|
+
If they want their own application to take part — be a source, or updates itself —
|
|
314
|
+
**[Writing a flow plugin](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-plugin-guide.md)** is the byte
|
|
315
|
+
contract, and **[the architecture notes](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/flow-architecture.md)** say why it is shaped that way.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Step 7 — Offer them a viewer that shows the progress
|
|
320
|
+
|
|
321
|
+
**Offer this as soon as the central exists — right after Step 3, before they start working.** Not
|
|
322
|
+
at the end. Every sync from that moment on becomes a commit they can watch arrive, and setting it up
|
|
323
|
+
costs the same on day one as on day thirty. Left to the end it sounds like an extra; offered at the
|
|
324
|
+
start it is the thing that makes the rest visible.
|
|
325
|
+
|
|
326
|
+
Every sync is a commit, and the platform keeps the lot: who changed what, when, and the geometry as
|
|
327
|
+
it was at each version. Nothing in Revit shows that back, and it is the first thing people ask —
|
|
328
|
+
*what has changed since Friday?*
|
|
329
|
+
|
|
330
|
+
Say it plainly and wait:
|
|
331
|
+
|
|
332
|
+
> "Everything you sync is stored as a history. Would you like a viewer that shows it — pick any
|
|
333
|
+
> version and see what was created, modified and deleted, coloured in 3D?"
|
|
334
|
+
|
|
335
|
+
If they say yes, that is an **app**, and building one is
|
|
336
|
+
**[the platform AI quick start](https://raw.githubusercontent.com/ThatOpen/platform_services/main/docs/ai-quickstart.md)** — scaffold with the `app` template and follow
|
|
337
|
+
it.
|
|
338
|
+
|
|
339
|
+
**Do not ask them how to add the panel.** Add a **new layout** called `History`, and leave the
|
|
340
|
+
scaffold's own layouts alone. It is a two-line change, it keeps the app they were given intact, and
|
|
341
|
+
it is the answer every time — asking hands somebody a UI decision about a screen they have not seen
|
|
342
|
+
yet.
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
app.elements = {
|
|
346
|
+
...app.elements,
|
|
347
|
+
history: () => html`<top-git-history></top-git-history>`,
|
|
348
|
+
};
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**For the layout, copy one of the scaffold's own panel layouts and swap its panel for `history`** —
|
|
352
|
+
same side, same width, same shape. Do not choose a side and do not pick a width: the app already
|
|
353
|
+
answered both, and the answer is written in `app.layouts` right there in `main.ts`.
|
|
354
|
+
|
|
355
|
+
A panel that opens on the opposite side from every other one, at a different size, is the first
|
|
356
|
+
thing anybody notices, and it reads as bolted on however good the contents are.
|
|
357
|
+
|
|
358
|
+
For the layout's `icon`, use **`at-icons:git-branch`** — That Open's own icon set, and the branch
|
|
359
|
+
mark is what the panel actually shows.
|
|
360
|
+
|
|
361
|
+
What makes it a history viewer rather than an empty viewer is a built-in component that already
|
|
362
|
+
exists, so nobody writes this part:
|
|
363
|
+
|
|
364
|
+
- **`GitHistoryManager`** — the headless half. It reads `revitflow_history.json` and the per-commit
|
|
365
|
+
`revitflow_frag_<N>.frag` files the add-in writes under `bimterop/revit-<docId>/`, loads the
|
|
366
|
+
model, and colours a commit's elements: **green created, blue modified, red deleted**. It has an
|
|
367
|
+
`isolateChanges` mode that ghosts everything else, which is the one people keep on.
|
|
368
|
+
- **`top-git-history`** — the panel, registered by `UIManager`. It only asks the manager for things
|
|
369
|
+
and listens; all the viewer work is on the manager.
|
|
370
|
+
|
|
371
|
+
Two things to say honestly when you offer it. The history only goes back as far as the team's first
|
|
372
|
+
sync through this add-in — it is not read out of the `.rvt`. And a commit's colours come from what
|
|
373
|
+
the add-in recorded at sync time, so a change somebody made and never synced is not in it, the same
|
|
374
|
+
way it is not in anybody else's model.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Talking to the add-in directly
|
|
379
|
+
|
|
380
|
+
The add-in serves a small HTTP API on **127.0.0.1**, and it is the same surface the CLI drives: a
|
|
381
|
+
person clicking and a script deciding are the same operation. Use it for what the CLI does not
|
|
382
|
+
cover. Do not use it to skip a CLI command that exists.
|
|
383
|
+
|
|
384
|
+
**Find it.** The port and the token change every launch, so read them rather than configuring them:
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
%APPDATA%\ThatOpen\revit-addin.json → { "port": …, "token": "…", "pid": … }
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Send the token as the header **`X-RevitFlow-Token`**, POST JSON, read JSON back. The endpoints this
|
|
391
|
+
guide uses are `status`, `where` and `worksets`.
|
|
392
|
+
|
|
393
|
+
Three things that will otherwise mislead you:
|
|
394
|
+
|
|
395
|
+
- **`worksets` has `revitOwner` and `tocOwner`, and no field called `owner`.** Reading `owner`
|
|
396
|
+
returns nothing for every row, which looks exactly like "nobody owns anything" and is a lie.
|
|
397
|
+
`revitOwner` is Revit's answer, and Revit's answer is the one that decides.
|
|
398
|
+
- **The add-in serves one request at a time.** A machine in the middle of a sync answers nothing,
|
|
399
|
+
and from outside that is indistinguishable from a crash. Diagnose from
|
|
400
|
+
`%APPDATA%\ThatOpen\revitflow.log`, which keeps being written throughout. Never conclude anything
|
|
401
|
+
from a timeout alone.
|
|
402
|
+
- **A modal dialog in Revit stops everything.** The add-in does its work when Revit is idle, and a
|
|
403
|
+
dialog waiting for a click means Revit never is. If a call hangs, ask the user to look at Revit's
|
|
404
|
+
window before assuming something is broken.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Troubleshooting
|
|
409
|
+
|
|
410
|
+
- **`thatopen login` fails with "Unauthorized"** → the token is invalid, expired, or from the other
|
|
411
|
+
environment. Production tokens use no `--api-url`; dev tokens use
|
|
412
|
+
`--api-url https://dev.platform.thatopen.com`. Ask for a fresh one from the same environment.
|
|
413
|
+
- **HTTP 403 on `item/folder?projectId=…`** → login worked, but that account has no access to that
|
|
414
|
+
Project ID. Confirm the id and the environment with the user.
|
|
415
|
+
- **"add-in not running" while Revit is open** → it is not installed. Step 2(b).
|
|
416
|
+
- **`thatopen revit install` refuses** → Revit is still open. Close it.
|
|
417
|
+
- **`take` answers `taken: false` with `deniedBy`** → somebody else holds that workset. Expected,
|
|
418
|
+
not an error. Ask them to release and sync, or take another.
|
|
419
|
+
- **`take` answers `offline: true`** → the platform is unreachable. The take is **refused, not
|
|
420
|
+
queued**, and deliberately: the platform is what arbitrates the race, so with it gone nobody can
|
|
421
|
+
know whether a colleague already holds it. Nothing was changed. Retry when `status` says
|
|
422
|
+
`online: true`.
|
|
423
|
+
- **`locks` answers `offline: true` instead of a list** → the same outage. That is **not** an empty
|
|
424
|
+
list; claims still stand. `worksets` still answers from Revit with `registry: false`, and that
|
|
425
|
+
half needs no network at all — use it to see what the user themselves holds.
|
|
426
|
+
- **A teammate can still edit "my" workset** → ownership has not reached them yet. You must sync
|
|
427
|
+
after taking it, and they must sync afterwards.
|
|
428
|
+
- **Update is refused on a workset nobody seems to own** → it is probably the **active**
|
|
429
|
+
workset, where the recipe's new elements land. See Step 6.
|
|
430
|
+
- **Update says "Nothing imported"** → the source has not changed since the last apply.
|
|
431
|
+
Expected. Publish or upload a new version of the source first.
|
|
432
|
+
- **Everything hangs and nothing new is in the log** → a Revit dialog is waiting for a click.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Rules recap (for the AI)
|
|
437
|
+
|
|
438
|
+
- Ask for every value you do not have. Never guess a project id, a file path or a central name.
|
|
439
|
+
- Never echo or store the token.
|
|
440
|
+
- You may install the CLI and the add-in and launch Revit. Only the "Always Load" prompt needs the
|
|
441
|
+
user — and so does applying a recipe, which is an edit of their model made from their Revit.
|
|
442
|
+
- CLI first; the add-in's local API for reading ownership and positions; never the platform's own
|
|
443
|
+
HTTP API by hand.
|
|
444
|
+
- Read each answer before the next step, and prefer a measured value to a status word: coordinates
|
|
445
|
+
over "applied", `revitOwner` over "it should be fine".
|