Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Components & Libraries

The browser at the top of the left panel lists what you can open and place. Components holds the design’s own components, and Libraries the built-ins and the .exw files the design links. Click a name to open that component: the viewport shows it on its own and the inspector fills with it. Here you also link library files and repair what breaks when one changes.

The tab strip

A tab carries a count when there is something behind it, and Libraries counts libraries, not their components: a catalog of three libraries holding forty components reads Libraries 3.

The + adds to the tab you are looking at: a new component on Components, a link to a library file on Libraries. Each tab keeps its own scroll position, and the tab you pick stays picked as you move between components.

Components

The tab lists one row per definition this design owns; a design with none reads (none).

A small dim star follows the root, and clicking it does nothing. The star that sets the root is in the Inspector header, which is also where a definition is renamed, duplicated and deleted.

The + opens a menu with two items, and either one opens the component it creates. The new component is not made the root.

  • Component creates an empty component named component (component2, and so on, when that name is taken).
  • Script component creates a script component named ScriptComponent whose function is script_component in the script file named after the design, chip.star for chip.exw. When that file does not exist it is created with a function that returns no children. An existing file is not changed, so add the function to it yourself. The item is disabled until the design has been saved. See Script components.

Opening a component reframes the viewport on it, clears the selection inside it, returns the active layer to the stack’s base layer, and shows every layer again. Editing does none of that: the Layers visibility you set survives everything but a change of component and making a hidden layer active.

Moving components into a library

Right-click a component and choose Move to library… to move it into a library file in the design’s folder. Ctrl+click rows to mark several first; right-clicking a marked row moves all the marked ones. The root cannot be moved, so its row offers the item grayed out.

The dialog asks where the components go: a New library file, named in the field, or an Existing file in this folder. Below it, What moves lists each component. A component that the moved ones place goes with them, marked needed by the one that places it. When the library already has a component of that name, the row reads Replace, and the moved component overwrites it; any library problem the replacement would cause in this design is listed in red under the row. The dialog also names the other files in the folder that use the library or this design. They are not checked, and their problems show when you open them.

Move writes the library file at once. The moved components leave the Components tab and appear in the library’s group in the Libraries tab, every place the design used them now places the library’s component, and the design links the library if it did not. A new file gets this design’s active stack and its process, and its root is the first moved component.

Undo puts the components back in the design and takes them out of the library file again, restoring a component a Replace overwrote. A new file stays in the folder, unlinked. Redo writes the move again.

On a design that has never been saved, Move to library… first asks you to save it, as linking does.

Libraries

The tab lists one collapsible group per library, Built-ins first and the rest by name. Built-ins ships with the app. Every other group is a .exw file that the design links, named by its file name without the extension, and its tooltip gives the file name. Only the files this design links have a group. See Libraries for what a library holds.

Linking and unlinking a file

The + on the Libraries tab opens Link library, which lists the other .exw files in the design’s folder. Click one to link it; its group appears and its components can be placed. A file shows grayed out, with the reason on hover, when its name contains @, when it differs from a linked file only in upper and lower case, or when it links this design, directly or through another file, since linking it would form a loop.

A design that has never been saved has no folder to find libraries in. The + then explains this and offers Save Design As…; once the design is saved, the files of the folder you saved it in are listed for you to link. Cancel leaves the design unsaved and links nothing.

Right-click a file’s group and choose Unlink to remove the link. Unlink is refused while the design places a component from that library, and the status bar says how many; delete those instances first.

A linked file that is missing or cannot be loaded, or that links such a file, does not stop the design from opening. Its group shows a red warning mark, its tooltip names the file that failed and why, and each component placed from it is a library problem (below).

Right-click a file’s group and choose Relink to another file… to point the link at another .exw file of the folder, for example after the library was renamed or saved as a new version. The dialog lists the folder’s files with the same grayed-out rules as Link library. Click one and the dialog lists what would break in this design with that file: a component it does not have, a pin a channel uses, a parameter you set, a process or stack. Nothing changes until you press Relink.

Relink changes every place the design refers to the old file: the components it places, the processes and stacks it uses, and the base layer you set for a library stack. Choosing a file the design already links merges the two links into one. Anything a relink breaks shows as a library problem.

Relink is offered for every file the design links directly. When a group fails only because a file its library links failed, the repair is in that library: use Open library file on the group instead.

File ▸ Reload Libraries reads the linked files again, for when they changed outside the app. It leaves your design and its undo history alone.

What a group lists

Each group’s components form one list sorted by name, Built-ins included. The Add component picker lists the same groups in the same order.

Read-only library items

Opening a library component shows its parameters, computed values and pins with no edit controls, and the tools do nothing in the viewport while it is open. The inspector header names the file it comes from. You place one from the toolbar’s Add component picker (Toolbar & tools). See Libraries for what stays yours on a library item.

To change a library component, process or stack, open its file with Open in library file (→ Editing a library file), or copy it into your design with Make local copy (→ Making a local copy). A library format is edited in its own file.

Editing a library file

A library component is edited in its own file. Each of these opens the file in this window:

  • Open library file on a file group’s right-click menu opens the file at its root.
  • Open in library file opens the file with that component open in the inspector. It is on a component row’s right-click menu in a file group, in the inspector header while a library component is open, and on the right-click menu of an instance of it in the viewport.

Built-ins are compiled into the app and offer neither.

Making a local copy

Make local copy, in the inspector header while a library component is open, copies the component into this design’s Components tab and opens it there, editable. Every place the design used the library component now places the copy. The copy keeps the library’s name, with a number added when the design already has a component of that name, and its own children still come from their libraries.

To change a library component while you look at it in your chip, make a local copy, edit it, then move it back with Move to library…. The copy remembers where it came from, so the dialog opens on that file with the row reading Replace, even when the copy was renamed. Confirming puts the changed component back in the library under its original name.

Opening a library file closes your design first, so with unsaved changes you are asked to save them, as with Open…. While you are in the library file, a ← chip.exw button leads the menu bar, named after the file you left, and File ▸ Back to chip.exw does the same. Press it to reopen your design at the component you had open. Your design reloads its libraries as it opens, so what you saved in the library shows. Opening a library from a library adds a step, and each Back returns one step. Open… and New forget the way back.

Library problems

A library problem is a place where your design still refers to something a linked file no longer has. See Libraries for what each kind does to the chip.

  • Clicking the red marker of an instance whose component is gone selects the instance.
  • A channel that ends on a pin that is gone is not drawn, but it is still in the Body tab.
  • A problem inside a placed library component, such as one of its own children going missing, is shown on the instance you placed, with the path to it: Foo › X: …. The rest of that component still draws. Open in library file, which the inspector offers when you select the problem’s row in the Problems section, opens the file that holds the broken reference, at the component that holds it.
  • When the active stack, or a process it uses, is gone, its row in the Problems section names it, and selecting the row offers Relink to another file… when its file is one the design links. A missing library stack or process that the active stack does not use is listed and changes nothing on screen.

The Problems section lists library problems, one row per problem, and the inspector lists an instance’s own problems when you select it. Select a problem’s row and the inspector shows the reason with the buttons that repair it: Remove takes out a value set on a parameter that is gone, and Delete deletes an instance whose component is gone, with its channels. Beside Delete, Relink to another file… opens the relink dialog for the instance’s library.

See also