Get desktop application:
View/edit binary Protocol Buffers messages
Inserts a new row into the given library table. Returns LibraryCommandStatus Since: 11.0
Which table to modify. LTS_BOTH is invalid here.
Adds the given items to the selection. Returns SelectionResponse
The items to select
Adds a variant to the registry. Errors with AS_BAD_REQUEST when the name already exists (case-insensitive).
Begins a staged set of changes. Any modifications made to a document through the API after this call will be saved to a pending commit, and will not appear in KiCad until a matching call to END_COMMIT.
Specifies which document to associate the commit with
Opaque identifier tracking a commit
Used in:
Removes all items from selection
Closes all open documents (currently only supported in CLI api-server mode)
If set, will close documents even if they have been modified and not saved
Used in:
Commit the changes to the design
Cancel this commit
Copies an existing variant to a new variant, including copying all item overrides in the existing variant (that is, does a deep copy)
Creates a new document (in memory; does not save to disk) Currently board and schematic files can be created. A project will be created for the document if it doesn't already exist. Will return an error if the current document is unsaved: save or revert first Returns OpenDocumentResponse Since: 11.0
Creates new items on a given document
Specifies which document to create on, which fields are included, etc.
List of items to create
Items may be created on a top-level document (sheet, board, etc) or inside a container (symbol, footprint). If this field is not empty, it holds the ID of a symbol or footprint that the items should be added to. This ID must be an existing symbol (for schematic documents) or footprint (for board documents). If the given container does not exist or is not the correct item type, the CreateItems call will fail.
Specifies which document was modified, which fields are included in created_items, etc.
Status of the overall request; may return IRS_OK even if no items were created
Status of each item to be created
Internal KiCad API; may be removed without notice. When running in standalone, the first frame to start will get the well-known API socket path. Others can use this to set up a bidirectional link. Since we don't plan to keep standalone mode around for the long-term, this is a temporary workaround that doesn't change the whole paradigm of the API away from client-server.
Internal KiCad API; may be removed without notice.
Used in: , , ,
Will be omitted if the current variant is the default variant
Deletes items in a given document
Specifies which document to modify
List of item KIIDs to delete
Specifies which document was modified, etc.
Status of the overall request; may return IRS_OK even if no items were deleted
Status of each item requested to be deleted
Deletes a row from the given library table by nickname. Returns LibraryCommandStatus Since: 11.0
Which table type (symbol, footprint, design block) contains the row
Which table to modify. LTS_BOTH is invalid here.
Deletes a variant and all its per-instance records Deleting the current variant resets the active variant to default.
Used in:
The ID that was given by BeginCommit
What to do with this commit
Optional message describing this changeset
Specifies which document to associate the commit with
(message has no fields)
If set, environment variables (such as ${KIPRJMOD} or user-defined variables) will be expanded in addition to the usual text variables, after the text variables are expanded. Since: 10.0.7
Ensures the given items are visible and zooms to fit them. The bounding box of all given items will be expanded by `margin` if present. Returns an error if any of the given `items` are not in `document`. Available only in interactive mode and when the editor in question is idle. Returns Empty
For schematics, a document with a sheet path focuses that sheet's placement of the items
The items to fit in the view. Schematic items must all be on one sheet.
Used in:
Some item types can have independently-movable text as children (e.g. footprints) This mode controls whether or not these are included in the box
Checks whether a document currently open in an editor or headless context has unsaved changes
Specifies which document to query, which fields to return, etc.
List of types of items to retrieve; if omitted, all types valid for the target document will be returned
Specifies which document to query, which fields to return, etc.
Requests the full content of items contained in a library or set of libraries Returns GetItemsResponse Since: 11.0
The type of library to query (symbol, footprint, design block).
Which document context to use (to enable querying project-specific libraries)
The items to retrieve.
Specifies which document was modified, which fields are included in items, etc.
Status of the overall request; may return IRS_OK even if no items were retrieved
Returns the full path to the given KiCad binary
The short name of the binary, such as `kicad-cli` or `kicad-cli.exe`. If on Windows, an `.exe` extension will be assumed if not present.
Requests items contained in a library or set of libraries Returns LibraryItemsResponse Since: 11.0
The library or libraries to query.
Queries the load status of each library of the given type(s) Returns LibraryStatusResponse Since: 11.0
Types to query; empty means all types
Which table scope(s) to query
Returns LibraryTableResponse Since: 11.0
Which type of table (symbol, footprint, design block) to query
Which table scope (global, project, or both)
If true, return URIs with environment variables expanded
Returns NetClassAssignmentsResponse Since: 11.0
The project to query
Requests should include a project even though KiCad cannot have more than one project open at once yet. Requests without a project will be deprecated in a future version. Since: 11.0
Retrieves a list of open documents of the given type
Which type of documents to query
returns common.types.PageSettings
Returns the set of well-known filesystem paths used by KiCad. These paths are not guaranteed to actually exist or be accessible to an API client. The meaning of these paths and their actual location are not API guarantees. Returns GetPathsResponse
(message has no fields)
Return a writeable path that a plugin can use for storing persistent data such as configuration files, etc. This path may not yet exist; actual creation of the directory for a given plugin is up to the plugin itself. Files in this path will not be modified if the plugin is uninstalled or upgraded. Returns StringResponse
The identifier of the plugin
Retrieves a list of items. Returns SelectionResponse
Specifies which document to query for selected items.
An optional list of types to filter on. If none are provided, all selected items will be returned.
Render the given text object(s) as shapes. Depending on whether the text is using the KiCad stroke font or a custom font, the response will be a compound shape containing a set of polygons or a set of segments.
returns kiapi.common.types.Box2
A temporary text item to calculate the bounding box for
returns kiapi.common.project.TextVariables
returns common.types.TitleBlockInfo
Within a project, variants can exist on the schematic and the board. They are not necessarily in sync (a user may create variants on the board that have no matching schematic variants, for example).
(message has no fields)
Tests if a certain point falls within tolerance of an item's geometry
Used in:
Used in:
The created version of the item, including an updated KIID as applicable
Used in:
Used in:
The item did not exist in the given document
The item is not allowed to be modified by the API
Per-item status feedback for creation and update calls
Used in: , ,
Used in:
The item was created or updated
The item's type is not valid for the given document
The item to be created had a specified KIID and that KIID was already in use
The item to be updated did not exist in the given document
The item to be updated is not allowed to be modified by the API
The item to be created does not have valid data for the given document
Used in:
The update version of the item
Since: 11.0
The identifiers of all content in the library
Since: 11.0
Since: 11.0
The table that was queried
Starts a background load of all libraries of the given types that are listed in the library tables. If no types are given, all library types are loaded. The command returns immediately and the load proceeds asynchronously; progress can be monitored with GetLibraryStatuses. In GUI mode this command is a no-op, because the GUI preloads libraries on its own. Returns LibraryCommandStatus Since: 11.0
Types of libraries to load; empty means all types
Since: 11.0
Opens a document (currently only supported in CLI api-server mode) A document cannot be opened unless no project is currently loaded or it is part of a currently loaded project. To switch projects, use CloseDocument or CloseAllDocuments to close existing documents.
Opens a specific item from a library by identifier
Used in:
Parent footprint
Attempts to parse the given string as a s-expression formatted container with items, similar to how the Paste action inside the KiCad editor works. If the parse is successful, the items will be created and inserted into the editor. Returns CreateItemsResponse
Used in:
Absolute path in platform-native form; may not exist on disk
A command to check if the connection to KiCad is OK
(message has no fields)
Since: 11.0
The newly-created item
Refreshes the given frame, if that frame is open
Reloads library table row(s) from disk. This starts a reload process that operates asynchronously. The API command will return immediately but updated library content will not be available until the load has completed. Returns LibraryCommandStatus Since: 11.0
Type of library to reload
Which table to look up the library in. LTS_BOTH is invalid here.
List of libraries to reload. If absent, all libraries matching type and scope will be reloaded.
Removes the given items to the selection. Returns SelectionResponse
The items to deselect
Runs a TOOL_ACTION using the TOOL_MANAGER of a given frame. WARNING: The TOOL_ACTIONs are specifically *not* an API. Command names may change as code is refactored, and commands may disappear. This API method is provided for low-level prototyping purposes only.
Action name, like "eeschema.InteractiveSelection.ClearSelection"
NOTE: At the moment, RAS_FRAME_NOT_OPEN won't be returned as the handler is inside the frame.
Used in:
The action was submitted successfully.
The action was unknown for the targeted frame.
The targeted frame was not open when the call was submitted.
Saves the given document to a new location and does not open the new copy
Saves the given document to its existing file path. Returns an error if the document is untitled (it has never been saved to disk); use SaveDocumentAs to save an untitled document to an explicit path.
Saves the given document (and its project) to a new location and switches to the new project. Only available in headless mode; in GUI mode a project change may require closing other editor frames, which the API is not allowed to do. Since: 11.0
Used in:
Overwrite destination file(s) if they exist
If the file being saved normally requires a project (for example, a board or schematic), this flag will cause a new project to be saved alongside the new file
(message has no fields)
Requests items matching a search query in the given library scopes Returns SearchLibrariesResponse Since: 11.0
Glob pattern or substring to match against item names. Follows the same logic of KiCad's library chooser filter
Since: 11.0
The identifiers of matching content
The set of currently selected items
Used in: ,
Selects the active variant in the editor (absent or empty name selects the default variant).
Since: 11.0
The project to query
In MMM_MERGE mode, per-net assignments are replaced for each net present in the request (an empty netclasses list removes all assignments for that net), and pattern assignments are updated if they already exist. In MMM_REPLACE mode, any existing assignments or patterns not present in the request are erased.
Whether to merge or replace the existing netclasses with the contents of this message Note that this only happens at the level of netclass name: for example, if merge_mode is set to MMM_MERGE, the design has netclasses ["Default", "HV"], and this message has netclasses ["Default", "LV"], the resulting set will be ["Default", "HV", "LV"] -- the Default netclass will have its properties replaced with those in this message, the "LV" netclass will be added, and the "HV" netclass will be left alone. If merge_mode is set to MMM_REPLACE, the "HV" class will be erased. Note that there must always be a "Default" netclass, so it will not be erased even if merge_mode is MMM_REPLACE and there is no "Default" class specified in this message.
Requests should include a project even though KiCad cannot have more than one project open at once yet. Requests without a project will be deprecated in a future version. Since: 11.0
Whether to merge or replace the existing text variables map with the contents of this message
Used in:
Implicit user action (e.g. just clicking on an item)
Explicit user action (e.g. running a "select in other window" action)
Used in:
Used in: ,
Used in:
Updates items in a given document
Specifies which document to modify, which fields are included, etc.
List of items to modify
Specifies which document was modified, which fields are included in updated_items, etc.
Status of the overall request; may return IRS_OK even if no items were modified
Status of each item to be created
Modifies an existing row, matched by entry.nickname (and scope). Returns LibraryCommandStatus Since: 11.0
Which table to modify. LTS_BOTH is invalid here.
All non-default variants for the given document