Introduction

Components define how to render circuit symbols. You can create custom components for Circuit Diagram using a simple XML format.

This section describes how to create your own components.

Setup

To build components, you will need to use the Circuit Diagram CLI application.

tip

GitPod is an in-browser editor that has been pre-configured for creating components.

If you are using GitPod, skip to the next page as it has already been set up for you.

1. Download the Circuit Diagram CLI

The Circuit Diagram CLI is a utility that can compile components and render them as images.

Supported platforms:

  • Windows x64
  • Linux x64
  • macOS

Download the appropriate version for your platform from the Circuit Diagram downloads page.

Extract the downloaded file. For Linux, follow the additional installation steps.

2. Install Visual Studio Code

Using the Visual Studio Code extension is optional, but makes developing components much easier. It provides syntax checking and rendering of component previews. If you don't want to use it, you can skip to the next section and use any text editor that supports editing XML files.

If you do not already have Visual Studio Code installed, download it from https://code.visualstudio.com/.

3. Download the Circuit Diagram Extension

The extension is not yet available in the Visual Studio gallery.

Download the VSIX file from Circuit Diagram Downloads or from GitHub.

4. Install the Extension

In Visual Studio code, open on the extensions tab. Click on the More menu and then Install from VSIX....

Install from VSIX

Click Reload Now in the message that appears.

VS Code reload

5. Configure the Extension Settings

In VS Code, go to File -> Preferences -> Settings. Add the path to the CLI executable extracted in step 1.

For example:

{
    "circuitDiagram.executablePath": "C:\\Path\\To\\circuit-diagram-cli.exe"
}