docs / plm / Connecting the CAD app

Connecting the CAD app

The CAD app runs either on local files or on a PLM server, chosen when it starts. With no server configured it is the file-based app; Settings → PLM is where you give it one.

Choosing the server

The desktop app looks for a server URL in three places, the first one found winning:

  1. the --plm-url URL switch;
  2. the BREP_PLM_URL environment variable;
  3. plm.json in the app's config directory: {"url": "https://plm.example.com"}.

The API token is found the same way: --plm-token-file FILE, then BREP_PLM_TOKEN, then plm-token in the config directory. The config directory is $XDG_CONFIG_HOME/brep-app, on Windows %APPDATA%\brep-app, otherwise ~/.config/brep-app.

Installing the app from the server. Your PLM's My account page has an Install the desktop app section with a one-line install command for Linux and for Windows (each one the server offers). The installer also points the app at the server, so it starts on the PLM and asks you to sign in.

From the app. Open Settings from the File menu and choose the PLM tab, which is there in every session. Type the server's address in Server URL and press Enter (or click away). The address is saved to plm.json straight away, exactly as --plm-configure writes it, and the next start uses it. A malformed address (one that does not start with http:// or https://, or has no host) is refused with the reason and not saved. Under the field the tab says where the address in use came from. When it came from --plm-url or BREP_PLM_URL, that switch or variable overrides plm.json for this launch; an address you save is what a launch without it uses.

Saving an address in a file-based session points it at that server straight away, signed out: sign in below the field (see Signing in), then choose Connect now or restart. In a session already on a PLM, the session stays on its server until the next start.

Changing to a different server forgets this computer's sign-in: the app never sends a token to a server other than the one that issued it, so you sign in to the new server. Re-saving the same server (with or without a trailing /) keeps the sign-in.

From the command line. Write the configuration once, without editing files by hand:

brep-app --plm-configure https://plm.example.com                          # server only; sign in from the app
brep-app --plm-configure https://plm.example.com --plm-token-file token   # server and token
brep-app --plm-show      # which server and token this launch would use, and from where
brep-app --plm-check     # sign in and check the server accepts this app version
brep-app --plm-forget    # back to the file-based app

See the command-line reference for every switch. The install scripts a PLM server can host run these for you (see Running the server).

A configured server that cannot be used as written (a malformed URL, a token file that is not a token) is reported, and the session starts on local files: a PLM problem never stops the app from starting.

Signing in

The desktop app. Open Settings from the File menu and choose the PLM tab. With a server set, it shows whether you are connected, and as whom.

Choose Sign in with your browser. Your web browser opens the PLM's sign-in page, and the app shows Continue in your browser with a six-character code:

  1. If you are not signed in to the PLM in that browser, sign in. You come straight back to the sign-in page.
  2. The page asks Connect BREP desktop on your computer as you? and shows a code. Check that it is the same code the app shows, then choose Approve.
  3. The page says you can return to BREP. The app signs in by itself, a few seconds later.

The app keeps a token of its own in plm-token, never your password. The computer is listed on your PLM My account page under Linked desktops (see below).

Approve only a sign-in you started yourself, and only when the codes match. Someone who sends you a link is asking you to let their app act as you; choose Deny. The link works once and expires after ten minutes. If no browser opens, choose Copy link and paste the link into a browser. Cancel stops waiting.

Sign in here instead opens the other ways, for a computer with no browser:

The sign-in takes effect at the next start, or straight away with Connect now while the session is still as a fresh start leaves it (no document opened, named or changed). Check connection signs in again and runs the version check.

Signing out. Forget this machine's sign-in signs this computer out: a computer linked through the browser is signed out on the server too, and leaves Linked desktops. The configuration is removed, and the next start is the file-based app. It works with the server unreachable as well; the app then says the server could not be told, and you can revoke the computer from Linked desktops. A token you pasted, or one a password sign-in made, stays on your API tokens list, since other computers may use it.

Linked desktops

Your PLM My account page lists, under Linked desktops, each computer you signed in through the browser: its name, its system, the app version, when it was linked and when it was last used. Revoke signs that computer out, for example one you no longer use or one you left signed in somewhere. An administrator sees every user's linked desktops on the Security page and can revoke any of them.

A revoked computer is signed out at its next request to the server, within a few seconds. The app says your PLM sign-in has ended and opens Settings → PLM on Sign in with your browser. Nothing you have open is lost: your tabs stay as they are, and a Save made meanwhile says the sign-in has ended and leaves the tab unsaved. Sign in again as the same user and the app carries on with the same tabs, with no restart; then Save.

The hosted web app. Opened from the PLM server's own address (/cad/app/web/index.html), the CAD app uses your PLM browser session. It has no sign-in form of its own: without a session it sends you to the PLM sign-in page and back. Its PLM tab shows the server's address, which you cannot change there (the web app always uses the server that serves its page), and links to your PLM account page. The web app served from anywhere else has no PLM: its PLM tab says so.

Version check. On connecting, the app compares its version with the oldest version the server accepts, and refuses to connect when it is older, naming both. Install a newer app from the server.

Working with PLM documents

Opening. File → Open shows Open from the PLM: your workspace's folders and links, and a part number and revision to open directly. A link opens the part's newest revision, drafts included, unless it is pinned. On the hosted app, Open in CAD on a part in the web workbench opens that revision in a new tab.

Document tabs show the part number and revision, for example CPART000000042/B.

The PLM pane. A dock pane titled PLM appears in a PLM session. For the active document it shows the part number and name, the revision picker (Open revision), whether you can save, and Check out. Below, Manage in PLM links open the part's summary (check-in and release), revisions, attachments, BOM and where-used, and history in the web workbench, and the Parts, Workspace and Reviews pages.

Editing and saving. You can always edit a document in the session. Saving writes the revision only when it is a draft or in review and checked out to you; otherwise the pane says why saving is unavailable ("revision B is not checked out — saving requires checkout", a released revision, someone else's lock). Check out and save, or use Save As to save your edits to a new revision or a new part.

Check-in, release, reviews and approvals happen in the web workbench, through the pane's links.

Every save also uploads a thumbnail of the revision, and saving an assembly publishes its uses list from the document. A part that exists only inside the assembly (never saved as a part of its own) is given its own PLM part when the assembly is saved.

Settings follow you. Your app settings, dock layout, pinned items and unsaved-work recovery are kept on the server for your account, so they are the same on every machine.

Following other people's changes

The app notices changes on the server while you work:

Superseded parts in an assembly

When an assembly places a revision that has since been superseded (a newer one was released) or made obsolete, the PLM pane names each one, for example "Bracket: CPART000000042 uses superseded rev A; rev B is current."

Other PLM features in the app