@clawhub-yanranxiaoxi-3b1241567b
EasyEDA Pro API skill for AI agents. Use when working with EasyEDA Pro EDA software, including PCB design, schematic editing, footprint/symbol management, an...
---
name: easyeda-api
description: >-
EasyEDA Pro API skill for AI agents. Use when working with EasyEDA Pro EDA software,
including PCB design, schematic editing, footprint/symbol management, and project operations.
Supports live debugging in EasyEDA and EasyEDA extension development. Provides complete API
reference (120+ classes, 62 enums, 70 interfaces), extension-development documentation, and a
WebSocket bridge server to execute code in the running EasyEDA Pro client.
Trigger on: "嘉立创EDA,启动!", "立创EDA,启动!", "EDA,启动!",
"EasyEDA", "PCB", "schematic", "footprint", "EDA", "circuit board",
"嘉立创EDA", "原理图", "PCB设计".
**IMPORTANT**: 嘉立创EDA's English name is **EasyEDA**. They are the SAME product.
Never use other transliterations like "EasyEDA Pro" (unless specifically versioned), "EASYEDA", "easyeda", etc. Always use "EasyEDA" for English references and "嘉立创EDA" for Chinese references.
license: MIT
compatibility: Requires Node.js 18+, EasyEDA Pro desktop client with extension support
metadata:
author: JLCEDA
version: "1.1.3"
openclaw:
requires:
bins:
- node
env:
- CLAUDE_SKILL_DIR
---
# EasyEDA Pro API Skill
Control EasyEDA Pro (嘉立创EDA专业版) programmatically through AI. This skill provides:
1. **Complete API reference** — 120 classes, 62 enums, 70 interfaces, 19 type aliases
2. **WebSocket bridge** — Execute code in the running EasyEDA Pro client
3. **Code patterns** — Common operations for PCB, schematic, library, and project management
4. **Document source format reference** — File format specifications for project, schematic, and PCB sources when users need to analyze or modify EasyEDA document source directly instead of using the API
This skill supports not only live debugging in EasyEDA, but also EasyEDA extension development.
During EasyEDA extension development, AI agents can use the extension-related documentation, API references, type information, usage examples, and bridge-based debugging capabilities provided by this skill to look up APIs, write code, and validate behavior during integration and debugging.
## Architecture
```
┌───────────┐ HTTP/WS ┌─────────────────┐ WebSocket ┌───────────┐
│ AI Agent │ ◄───────────► │ Bridge Server │ ◄───────────► │ EasyEDA │
│ │ Port Range │ (Node.js) │ Port Range │ (Client) │
└───────────┘ 49620-49629 └─────────────────┘ 49620-49629 └───────────┘
```
The server auto-selects an available port from 49620-49629 on startup.
Both AI and EDA clients auto-discover the server by scanning the port range
and verifying a handshake (`service: "easyeda-bridge"`).
## Quick Start
### 1. Command Triggers
When user says **"嘉立创EDA,启动!"**, **"立创EDA,启动!"**, or **"EDA,启动!"**:
**IMPORTANT: Session initialization** — Reply immediately with this exact text to set the correct session title:
```
📋 EasyEDA Session
```
Then proceed with the setup steps below.
### 2. Install dependencies (if needed)
```bash
cd CLAUDE_SKILL_DIR && npm install
```
### 3. Start bridge server
> **⚠️ IMPORTANT**: The bridge server must run in the background. Do NOT run it in the foreground, or the AI will block waiting for the server to exit.
```bash
# Check if bridge is already running
for port in $(seq 49620 49629); do
resp=$(curl -s http://localhost:$port/health 2>/dev/null)
if echo "$resp" | grep -q '"easyeda-bridge"'; then
echo "Bridge already running on port $port"
BRIDGE_PORT=$port
break
fi
done
# Start bridge if not running
if [ -z "$BRIDGE_PORT" ]; then
node CLAUDE_SKILL_DIR/scripts/bridge-server.mjs &
sleep 2
# Find the port bridge is running on
for port in $(seq 49620 49629); do
resp=$(curl -s http://localhost:$port/health 2>/dev/null)
if echo "$resp" | grep -q '"easyeda-bridge"'; then
BRIDGE_PORT=$port
break
fi
done
fi
echo "Bridge running on port: -unknown"
```
### 4. Connect EasyEDA
Install the `run-api-gateway.eext` extension in EasyEDA Pro. Download link:
- https://ext.lceda.cn/item/oshwhub/run-api-gateway
After the extension is loaded, it will automatically establish the WebSocket connection.
### 5. Verify connection and select EDA window
```bash
# Check bridge and EDA connection status
curl http://localhost:-49620/health
# List all connected EDA windows
curl http://localhost:-49620/eda-windows
```
The `/eda-windows` response looks like:
```json
{
"windows": [
{ "windowId": "abc-123", "connected": true, "active": true },
{ "windowId": "def-456", "connected": true, "active": false }
],
"activeWindowId": "abc-123",
"count": 2
}
```
**Handle based on window count**:
- **0 windows**: Tell user "No EasyEDA window is connected. Please ensure the EasyEDA extension (run-api-gateway.eext) is installed and loaded in EasyEDA. Download: https://ext.lceda.cn/item/oshwhub/run-api-gateway"
- **1 window**: Auto-selected as active. Tell user: "✅ Connected! Active EDA window: abc-123. Ready to work."
- **2+ windows**: Show the available windows and ask user to select:
```
Multiple EDA windows detected:
- abc-123 (active)
- def-456
Which EDA window should I use?
```
**Select a window**:
```bash
curl -X POST http://localhost:BRIDGE_PORT/eda-windows/select \
-H "Content-Type: application/json" \
-d '{"windowId": "abc-123"}'
```
After selection, confirm: "✅ Active EDA window: abc-123. Ready to work."
### 6. Execute code on EDA
```bash
curl -X POST http://localhost:-49620/execute \
-H "Content-Type: application/json" \
-d '{"code": "return await eda.dmt_Project.getCurrentProjectInfo();"}'
```
## API Documentation
The full API reference is in the [references/](references/) directory:
- [references/_index.md](references/_index.md) — Master index of all classes, enums, interfaces, and types
- [references/_quick-reference.md](references/_quick-reference.md) — All method signatures for rapid lookup
- `references/classes/` — 120 class docs (DMT_*, PCB_*, SCH_*, LIB_*, SYS_*, IPCB_*, ISCH_*)
- `references/enums/` — 62 enum docs
- `references/interfaces/` — 70 interface docs
- `references/types/` — 19 type alias docs
### How to look up API
1. **Start with `_index.md`** to find the right class/module for the task
2. **Read the class doc** (e.g., `references/classes/DMT_Board.md`) for all methods and signatures
3. **Use `_quick-reference.md`** for fast method signature lookup across all classes
4. **Check enums/interfaces** for parameter types and return types
### Document Source Format Documentation
If the user needs to analyze or modify EasyEDA document source directly instead of using the API, use the documents in the [format/](format/) directory.
- [format/index.md](format/index.md) — Overview of the EasyEDA document source format references and version notes
- `format/project/` — Project source structure, metadata, blobs, variants, and grouping data
- `format/schematic/` — Schematic source format, including structure, wires, shapes, pins, components, and tables
- `format/pcb/` — PCB source format, including primitives, pads and vias, shapes, text, attributes, rules, and panel data
Use these files when the task is about understanding source layout, generating compatible document source, or editing source data that will later be imported back into EasyEDA.
### API Module Overview
| Prefix | Domain | Key Classes |
|--------|--------|-------------|
| `DMT_` | Document management | Board, EditorControl, Folder, Panel, Pcb, Project, Schematic, SelectControl, Team, Workspace |
| `PCB_` | PCB & Footprint | Document, Drc, Event, Layer, Net, Primitive, PrimitiveComponent, PrimitiveLine, PrimitivePad, PrimitivePour, PrimitiveVia, SelectControl |
| `SCH_` | Schematic | Document, Event, Primitive, PrimitiveComponent, PrimitiveWire, SelectControl |
| `LIB_` | Library | 3DModel, Cbb, Classification, Device, Footprint, LibrariesList, PanelLibrary, SelectControl, Symbol |
| `SYS_` | System | Dialog, Environment, FileManager, FileSystem, FontManager, HeaderMenu, I18n, IFrame, LoadingAndProgressBar, Log, Message, MessageBox, MessageBus, PanelControl, Setting, ShortcutKey, Storage, Timer, ToastMessage, WebSocket, Window |
| `IPCB_` | PCB interfaces (图元) | PrimitiveArc, PrimitiveComponent, PrimitivePad, PrimitiveFill, PrimitivePour, PrimitiveRegion, PrimitiveVia, ... |
| `ISCH_` | Schematic interfaces (图元) | PrimitiveArc, PrimitiveComponent, PrimitiveWire, PrimitiveText, PrimitiveRectangle, ... |
| `EPCB_` / `ESCH_` | Enums | PrimitiveType, Layer, PadType, ... |
## Code Execution Context
All code runs inside EasyEDA Pro's browser runtime as:
```javascript
async function(eda) {
// Your code here — `eda` is the global EDA API object
// You MUST use `return` to send results back
// Do not add comments to the generated code, as the code is typically executed as a single line
}
```
**Critical rules:**
- The `eda` object provides access to all API modules (e.g., `eda.dmt_Board`, `eda.pcb_Primitive`).
- Always refer to the API documentation for correct usage.
- Do not add comments to the generated code, as the code is typically executed as a single line.
- Always use `return` to get results — `console.log` output is NOT captured.
- All API methods returning promises must be `await`ed.
- Code runs in browser context — no Node.js APIs (fs, path, etc.) available.
- Use `eda.sys_Message.showToastMessage(msg)` for user-visible notifications.
- When reviewing API documentation and encountering enumerations, do not guess the enumeration values. You must use the enumeration members, for example: `EPCB_LayerId.TOP` instead of `1` for the layer parameter in PCB primitive creation.
### Extension Runtime Constraints
When writing EasyEDA extensions, standard browser APIs are **forbidden** in the main process. Use EDA-provided alternatives:
| Purpose | ❌ Forbidden | ✅ Use Instead |
|---------|-------------|----------------|
| Get user input | — | `eda.sys_Dialog.showInputDialog()` |
| User selection | — | `eda.sys_Dialog.showSelectDialog()` |
| Show message | `alert()` | `eda.sys_Dialog.showInformationMessage()` |
| Confirm action | `confirm()` | `eda.sys_Dialog.showConfirmationMessage()` |
| Toast notification | DOM manipulation | `eda.sys_Message.showToastMessage()` |
| Store data | `localStorage` (main process) | `eda.sys_Storage.setExtensionUserConfig(key, value)` |
| Custom UI | Manipulate host DOM | `eda.sys_IFrame.openIFrame()` |
| Show HTML | `showInformationMessage(html)` | Must use iframe |
| Open link | `window.open()` | `eda.sys_Window.open()` |
| Browser hardware API | Use in main process | Available in iframe (`navigator.serial`, etc.) |
**Note:** `localStorage`, `window`, `document` etc. are available **inside `sys_IFrame`** but NOT in the main extension process.
### Extension ↔ IFrame Data Passing
The main extension process and `sys_IFrame` iframe are **isolated contexts**. To pass data between them:
**Option A (Recommended):** Use `eda.sys_Storage` as a bridge
```javascript
// In main extension process:
await eda.sys_Storage.setExtensionUserConfig('myKey', JSON.stringify(data));
// In iframe:
const data = JSON.parse(await eda.sys_Storage.getExtensionUserConfig('myKey'));
```
**Option B:** Both contexts can access `eda` directly — call the same API from either side
```javascript
// In iframe HTML (NOT window.parent.eda):
const info = await eda.dmt_Project.getCurrentProjectInfo();
```
## Communication Protocol
### Port Discovery
The bridge server listens on the first available port in **49620-49629**.
To find the server, scan the range and verify the service identity:
```bash
for port in $(seq 49620 49629); do
resp=$(curl -s http://127.0.0.1:$port/health 2>/dev/null)
if echo "$resp" | grep -q '"easyeda-bridge"'; then
BRIDGE_PORT=$port; break
fi
done
```
### Handshake
- **HTTP**: `GET /health` returns `{ "service": "easyeda-bridge", "edaConnected": bool, ... }`
- **WebSocket**: On connect, server sends `{ "type": "handshake", "service": "easyeda-bridge" }`
- Clients MUST verify `service === "easyeda-bridge"` before using the connection
### Message Format
JSON messages over WebSocket / HTTP:
| Field | Type | Description |
|-------|------|-------------|
| `type` | `"execute"` \| `"result"` \| `"error"` \| `"ping"` \| `"pong"` \| `"handshake"` | Message type |
| `id` | `string` | Request UUID for matching request/response |
| `code` | `string` | JavaScript code to execute (for `execute` type) |
| `result` | `any` | Execution result (for `result` type) |
| `error` | `string` | Error message (for `error` type) |
| `service` | `string` | Service identifier (for `handshake` type) |
| `timestamp` | `number` | Unix milliseconds |
## Common Patterns
### Project & Board Operations
```javascript
// Get current project info
return await eda.dmt_Project.getCurrentProjectInfo();
// List all boards in project
return await eda.dmt_Board.getAllBoardsInfo();
// Create a new board (optionally link to schematic/PCB)
return await eda.dmt_Board.createBoard();
// Switch to a document tab
await eda.dmt_EditorControl.activateDocument(tabId);
```
### Example: Open a project by name and open its first schematic page
```javascript
const targetProjectName = 'NE555 Circuit';
// 1. Enumerate projects by team/folder and find the target by name
const teams = await eda.dmt_Team.getAllTeamsInfo();
const seenProjectUuid = new Set();
let targetProjectUuid = null;
for (const team of teams || []) {
const teamProjects = await eda.dmt_Project.getAllProjectsUuid(team.uuid);
for (const projectUuid of teamProjects || []) {
if (seenProjectUuid.has(projectUuid)) continue;
seenProjectUuid.add(projectUuid);
const info = await eda.dmt_Project.getProjectInfo(projectUuid);
const name = info?.friendlyName || info?.name || '';
if (name === targetProjectName) {
targetProjectUuid = projectUuid;
break;
}
}
if (targetProjectUuid) break;
const folderUuids = await eda.dmt_Folder.getAllFoldersUuid(team.uuid);
for (const folderUuid of folderUuids || []) {
const folderProjects = await eda.dmt_Project.getAllProjectsUuid(team.uuid, folderUuid);
for (const projectUuid of folderProjects || []) {
if (seenProjectUuid.has(projectUuid)) continue;
seenProjectUuid.add(projectUuid);
const info = await eda.dmt_Project.getProjectInfo(projectUuid);
const name = info?.friendlyName || info?.name || '';
if (name === targetProjectName) {
targetProjectUuid = projectUuid;
break;
}
}
if (targetProjectUuid) break;
}
if (targetProjectUuid) break;
}
if (!targetProjectUuid) {
throw new Error(`Project not found: targetProjectName`);
}
// 2. Open the project
const opened = await eda.dmt_Project.openProject(targetProjectUuid);
if (!opened) {
throw new Error(`Failed to open project: targetProjectName`);
}
// 3. Get the first schematic page and open it
const schematics = await eda.dmt_Schematic.getAllSchematicsInfo();
if (!Array.isArray(schematics) || schematics.length === 0) {
throw new Error(`No schematics found in project: targetProjectName`);
}
const firstSchematic = schematics[0];
const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
const firstPage = (pages || []).find((page) => page.parentSchematicUuid === firstSchematic.uuid)
|| firstSchematic.page?.[0];
if (!firstPage) {
throw new Error(`No schematic page found in: firstSchematic.name`);
}
const tabId = await eda.dmt_EditorControl.openDocument(firstPage.uuid);
return {
projectUuid: targetProjectUuid,
schematicUuid: firstSchematic.uuid,
pageUuid: firstPage.uuid,
tabId,
};
```
**Notes:**
- `dmt_Project.getAllProjectsUuid()` is **not** a global no-arg enumerator in practice. To reliably find a project by name, iterate teams first, then folders.
- `openProject(projectUuid)` may discard unsaved changes in the currently opened project. Be careful before calling it.
### PCB Primitive Operations
```javascript
// Get selected primitives
const selected = eda.pcb_SelectControl.getAllSelectedPrimitives_PrimitiveId();
// Create a line on copper layer
// Layer parameter uses EPCB_LayerId enum — see references/enums/EPCB_LayerId.md
await eda.pcb_PrimitiveLine.create(
"GND", // net (string)
EPCB_LayerId.TOP, // layer — use enum, NOT raw number
0, // startX (unit: 1mil)
0, // startY (unit: 1mil)
1000, // endX (unit: 1mil)
0, // endY (unit: 1mil)
10, // lineWidth
false // primitiveLock
);
// Modify an existing primitive (async pattern)
const prim = await eda.pcb_PrimitiveComponent.get([id]);
const asyncPrim = prim.toAsync();
asyncPrim.setState_X(newX);
asyncPrim.setState_Y(newY);
asyncPrim.done();
```
### PCB Async Primitive Pattern (IMPORTANT)
For **modifying** PCB/SCH primitives, you must use the async pattern:
```javascript
// 1. Get the primitive
const prim = await eda.pcb_PrimitiveVia.get([viaId]);
// 2. Convert to async mode
const asyncPrim = prim.toAsync();
// 3. Set new values
asyncPrim.setState_X(newX);
asyncPrim.setState_Y(newY);
asyncPrim.setState_Diameter(diameter);
// 4. Apply changes
asyncPrim.done();
```
### Schematic Operations
```javascript
// Get all pages
return await eda.dmt_Schematic.getAllSchematicDocumentsInfo();
// Create a schematic component
// component parameter requires {libraryUuid, uuid} object — NOT a plain string
await eda.sch_PrimitiveComponent.create(
{ libraryUuid: "...", uuid: "device-uuid-from-library" }, // component object
5000, // x (unit: 0.01inch = 10mil)
5000, // y (unit: 0.01inch = 10mil)
"", // subPartName
0, // rotation (degrees, plain number)
false, // mirror
true, // addIntoBom
true // addIntoPcb
);
// Get selected schematic primitives
const ids = eda.sch_SelectControl.getAllSelectedPrimitives_PrimitiveId();
```
### Library Operations
```javascript
// List all libraries in workspace
return await eda.lib_LibrariesList.getAllLibrariesList();
// Search devices
return await eda.lib_Device.search("STM32");
// Get symbol info
return await eda.lib_Symbol.get(symbolUuid);
```
### System Functions
```javascript
// Show toast message
eda.sys_Message.showToastMessage("Operation complete!");
// Show confirm dialog
const confirmed = await eda.sys_Dialog.showConfirmationMessage("Proceed?");
// File system (limited to extension sandbox)
const content = await eda.sys_FileSystem.readFileFromFileSystem(path);
await eda.sys_FileSystem.saveFileToFileSystem(path, content);
```
### DRC (Design Rule Check)
```javascript
// Run DRC check
const passed = await eda.pcb_Drc.check(true, true, false);
// passed is boolean: true if DRC passed, false if errors found
```
## Common Mistakes
### Read API Signatures Carefully (CRITICAL)
**Before calling ANY API method, you MUST read the full signature from `references/` — including parameter types, return type, and remarks.**
AI agents frequently make these errors due to skimming documentation:
**Error 1: Not `await`ing Promise-returning methods**
Almost all EDA API methods return `Promise<T>`. If you forget `await`, you get a Promise object instead of the actual result.
```javascript
// WRONG: Missing await — result is a Promise, not the project info
const project = eda.dmt_Project.getCurrentProjectInfo();
console.log(project); // Promise { <pending> }
// CORRECT: Always await async methods
const project = await eda.dmt_Project.getCurrentProjectInfo();
console.log(project); // { uuid: "...", name: "...", ... }
```
**How to know if a method needs `await`:** Check the return type in the signature. If it says `Promise<...>`, you MUST `await` it.
```typescript
// From references/classes/DMT_Project.md:
getCurrentProjectInfo(): Promise<IDMT_ProjectItem | null>
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// This is a Promise — you MUST await it
```
**Error 2: Using raw numbers instead of enum values**
Many parameters expect specific enum values. Using wrong numbers silently produces incorrect behavior.
```javascript
// WRONG: What does layer "1" mean? Which copper layer? Signal? Mask?
await eda.pcb_PrimitiveLine.create("GND", 1, 0, 0, 1000, 0, 10, false);
// CORRECT: Use the enum — EPCB_LayerId.TOP is clear and type-safe
// Check references/enums/EPCB_LayerId.md for the correct value
await eda.pcb_PrimitiveLine.create("GND", EPCB_LayerId.TOP, 0, 0, 1000, 0, 10, false);
```
**Always look up enums in `references/enums/` before using numeric constants.**
**Error 3: Assuming parameter types without checking**
Different APIs use different units, different ID formats, and different optional parameter conventions. Never assume.
```javascript
// WRONG: Assuming create() parameters match modify() parameters
// create() and modify() often have DIFFERENT parameter orders/types
// CORRECT: Always read the exact signature for the method you're calling
// Check references/classes/<ClassName>.md for each method's specific signature
```
**Summary — Before every API call:**
1. **Read the signature** — parameter types, return type, all in `references/classes/`
2. **`await` if `Promise`** — check return type for `Promise<...>`
3. **Use enums** — look up in `references/enums/` instead of guessing numbers/strings
4. **Check remarks** — the "备注" section often has critical usage notes
### Coordinate Unit (CRITICAL)
**Different domains use different coordinate units:**
| Domain | Unit | Conversion |
|--------|------|------------|
| **PCB** | 1mil | 1mm ≈ 39.37 units |
| **Schematic** | 0.01inch (10mil) | 1mm ≈ 3.937 units |
**This is the #1 mistake AI agents make.** Mixing up the units will place components incorrectly.
- PCB: 1 unit = 1mil = 0.001 inch = 0.0254 mm
- Schematic: 1 unit = 0.01inch = 10mil = 0.254 mm
If you use the wrong unit, components will be placed **10x too far** from their intended position.
```javascript
// WRONG: thinking unit is 1mil (it's actually 0.01inch = 10mil)
// Placing at x=500 thinking it's 500mil = 0.5inch — but 500 units = 5000mil = 5inch!
await eda.sch_PrimitiveComponent.create({libraryUuid: "...", uuid: "dev-uuid"}, 500, 0, "", 0, false, true, true);
// CORRECT: 50 units = 500mil = 0.5inch (in 0.01inch units)
await eda.sch_PrimitiveComponent.create({libraryUuid: "...", uuid: "dev-uuid"}, 50, 0, "", 0, false, true, true);
```
### Document State (CRITICAL)
**After creating a project, you MUST open it before operating on documents within it.**
When operating on documents, always verify:
1. **Project is opened** — Use `eda.dmt_Project.getCurrentProjectInfo()` to verify
2. **Correct document is active** — Use `eda.dmt_SelectControl.getCurrentDocumentInfo()` to check document type
3. **Document type matches API domain** — PCB APIs require active PCB document, SCH APIs require active Schematic document
```javascript
// WRONG: Assuming operation will work without checking document state
await eda.pcb_PrimitiveLine.create(...); // May fail if no PCB document is open
// CORRECT: Always verify document state first
const project = await eda.dmt_Project.getCurrentProjectInfo();
if (!project) {
// If you just created a project, you MUST open it before any operations!
return "Error: No project is currently opened. If you just created a project using dmt_Project.createProject(), you MUST call dmt_Project.openProject(projectPath) to open it first. You cannot operate on documents until a project is opened.";
}
const doc = await eda.dmt_SelectControl.getCurrentDocumentInfo();
if (doc?.documentType !== EDMT_EditorDocumentType.PCB) {
return "Error: No PCB document is currently active. Please open a PCB document first.";
}
// Now safe to perform PCB operations
await eda.pcb_PrimitiveLine.create(...);
```
**Operating on the wrong document type will return errors or null results.** For example:
- Executing `PCB_*` APIs without an active PCB document (`documentType !== EDMT_EditorDocumentType.PCB`) → error/null
- Executing `SCH_*` APIs without an active Schematic document (`documentType !== EDMT_EditorDocumentType.SCHEMATIC_PAGE`) → error/null
### IFrame Context — Always Use `eda` Directly (CRITICAL)
When writing extension code that creates an iframe via `sys_IFrame.openIFrame()`, the JavaScript code inside the iframe's HTML can access the `eda` global **directly**. Do NOT use `window.parent.eda`.
**Why this matters:**
EasyEDA injects the `eda` object into the iframe's execution context automatically. Standard browser cross-frame patterns (`window.parent`, `parentWindow`, etc.) do NOT apply here and will fail.
```javascript
// WRONG: Using window.parent to reach parent frame's eda object
// This is a common mistake made by AI agents familiar with web iframe patterns
const project = await window.parent.eda.dmt_Project.getCurrentProjectInfo();
// CORRECT: eda is available directly in the iframe context
const project = await eda.dmt_Project.getCurrentProjectInfo();
```
**This applies to ALL code inside `sys_IFrame` iframes:**
- Extension UI panels loaded via `openIFrame()`
- Any HTML file inside the extension package displayed in an iframe
**Rule:** In EasyEDA extensions, whether code runs in the main context or inside an iframe created by `sys_IFrame`, always access the API through `eda.xxx` — never through `window.parent.eda` or any other parent frame accessor.
### Multi-Window Support
When multiple EasyEDA windows are connected to the bridge, you do NOT need to check window selection on every EDA operation. Only check when:
1. **First EDA operation** — Verify which window is active and tell the user
2. **EDA disconnected error** — If bridge returns an error about EDA being disconnected, ask user to select a new window
**Multi-window operations:**
```bash
# List all connected EDA windows
curl http://localhost:49620/eda-windows
# Select a specific window
curl -X POST http://localhost:49620/eda-windows/select \
-H "Content-Type: application/json" \
-d '{"windowId": "abc-123-def"}'
# Execute on specific window
curl -X POST http://localhost:49620/execute \
-H "Content-Type: application/json" \
-d '{"code": "return await eda.dmt_Project.getCurrentProjectInfo();", "windowId": "abc-123-def"}'
```
If only one EDA window is connected, it's automatically selected as active.
## Debugging Tips & Failure Strategies
### Troubleshooting
1. **Always check health first**: Scan ports 49620-49629 for `{"service":"easyeda-bridge"}`
2. **EDA not connected?**: Ensure bridge extension is loaded in EasyEDA. Download: https://ext.lceda.cn/item/oshwhub/run-api-gateway
3. **Timeout errors**: Default 30s timeout. If timeout occurs:
- Check if the correct project and document are opened (use `dmt_Project.getCurrentProjectInfo()`)
- If no project is opened, use `dmt_Project.openProject(projectPath)` to open one
- If no document is active, use `dmt_EditorControl.openDocument(docId)` to open the correct document type (PCB/Schematic)
- If the document type is wrong (e.g., running PCB APIs on Schematic), switch to the correct document first
- Complex operations may need code splitting
4. **Check return values**: Many methods return `null` on failure — always validate
5. **Layer numbers**: Use enums from `references/enums/` docs (e.g., `EPCB_LayerId`)
6. **EDA window disconnected**: If you get an error about a window being disconnected, use `GET /eda-windows` to check available windows and `POST /eda-windows/select` to switch to another window
7. **Permission errors**: All API interfaces are controlled by EDA's permission system. If a specific API consistently fails to execute (returns error or null) while other APIs work fine, and you've confirmed the call matches the documentation exactly, it may be **blocked by permissions** — not a code bug. The EDA client may restrict certain operations based on user license, project settings, or document state. Inform the user that the operation may require elevated permissions or a different EDA edition.
8. **Persistent errors?**: If you've verified the API call matches the documentation exactly, ruled out permission issues, and still encounter unexpected errors, consider reporting the issue through official EasyEDA support channels
### Failure Handling Rules
When developing extensions, follow these rules:
| Situation | Action |
|-----------|--------|
| API method does not exist in docs | **Stop immediately** — inform the user the API doesn't exist |
| Signature uncertain after reading docs | **Stop generation** — return to query step and re-read |
| Forbidden browser API detected | **Auto-replace** with `eda.sys_*` alternative |
| Menu ID conflict | Add prefix to differentiate (e.g., `my-plugin-home`, `my-plugin-sch`) |
| Permission blocked | Inform user — may require different EDA edition or license |
**Critical:** Never guess an API signature. If `references/classes/` doesn't document it, it doesn't exist for your use case.
## Workflow for AI Agent
When the user asks you to perform EDA operations:
1. **Understand the task** — What domain? (PCB/SCH/LIB/Project)
2. **Verify document state** — Check `eda.dmt_Project.getCurrentProjectInfo()` and `eda.dmt_SelectControl.getCurrentDocumentInfo()`
3. **Confirm correct document type** — PCB operations need active PCB, SCH operations need active Schematic
4. **Look up API** — Read relevant class docs from `references/`
5. **Check types** — Read enum/interface docs for parameter types
6. **Write code** — Follow the execution context rules above
7. **Execute** — Send via `POST /execute` and check the result
8. **Iterate** — If errors occur, read error messages and adjust
When unsure about an API:
- Search `_quick-reference.md` for method names
- Read the specific class doc for detailed signatures and remarks
- Check interface docs for complex parameter types
## Session Management
### Detecting Topic Changes
The Bridge server consumes system resources while running. If the user has switched to a completely different topic (not related to EasyEDA/EDA/PCB/schematic) **3 consecutive times**, proactively ask if they want to close the Bridge:
> "I notice we've moved on from EasyEDA. The Bridge server is still running in the background. Would you like me to stop it to free up resources?"
**Do NOT close the Bridge automatically** — the user may switch back to EDA work later. Only ask, and close if they confirm.
### Closing the Bridge
If the user confirms they want to stop the Bridge:
```bash
# Find and stop the bridge process
for port in $(seq 49620 49629); do
pid=$(lsof -ti :$port 2>/dev/null)
if [ -n "$pid" ]; then
kill $pid
echo "Bridge stopped (PID: $pid, Port: $port)"
break
fi
done
```
FILE:README.md
# EasyEDA API Skill
供 AI 编程工具(Claude Code、OpenCode、QwenCode 等所有支持 [Agent Skills](https://agentskills.io/) 标准的工具)使用的 EasyEDA Pro API 技能包(Skill)。
这个 SKILL 不仅支持 AI 在线调试嘉立创EDA,也支持辅助开发嘉立创EDA扩展。
在开发嘉立创EDA扩展时,AI 可以使用本 SKILL 提供的扩展开发相关文档、API 参考、类型信息、调用示例以及桥接调试能力,帮助完成接口查询、代码编写与联调验证。
如果用户准备自行分析或修改嘉立创EDA文档源码,而不是通过 API 操作,也可以使用本项目提供的文档源码格式说明。
- 📚 **结构化 API 文档** — 自动从参考文档生成分层索引,便于 AI 快速查阅
- 🧾 **文档源码格式规范** — 说明工程、原理图、PCB 文档源码格式,适合直接分析和修改源码的场景
- 🔌 **WebSocket Bridge** — Node.js 服务端,桥接 AI 和 EasyEDA 客户端
- 🤖 **SKILL.md** — 完整的技能指导文件
## 快速开始
### 1. 安装依赖
```bash
npm install
```
### 2. 构建 API 文档
```bash
npm run build:docs
```
这会从 `reference/` 目录读取原始 API 文档,生成结构化文档到 `docs/` 目录。
### 3. 启动 WebSocket Bridge 服务器
```bash
npm run server
```
服务器自动在端口范围 `49620-49629` 中选择可用端口启动,等待 EasyEDA 客户端连接。
### 4. EasyEDA 端连接
在嘉立创EDA中安装 `run-api-gateway.eext` 扩展,下载地址:
- https://ext.lceda.cn/item/oshwhub/run-api-gateway
扩展加载后会自动连接到 Bridge 服务器(自动扫描端口范围,验证握手后连接)。
### 5. 使用 AI 编程工具
AI 编程工具(Claude Code、OpenCode、QwenCode 等)会自动读取 `SKILL.md` 获取技能指导,通过 HTTP API 向 EDA 发送代码:
```bash
# 检查 EDA 连接状态(端口自动发现,此处假设服务在 49620)
curl http://localhost:49620/health
# 执行 EDA 代码
curl -X POST http://localhost:49620/execute \
-H "Content-Type: application/json" \
-d '{"code": "return await eda.dmt_Project.getCurrentProjectInfo();"}'
```
## 一键打包
```bash
npm run pack
```
这会执行以下步骤:
1. 构建 API 文档(`docs/`)
2. 将 SKILL.md、文档、服务器打包到 `dist/easyeda-api/`
3. 生成 `dist/easyeda-api.zip` 用于上传
如果文档已构建好,可跳过构建步骤:
```bash
npm run pack:fast
```
### 发布到 ClawHub
```bash
npx clawhub@latest publish dist/easyeda-api/
```
或上传 zip 文件到 https://clawhub.ai/upload
## 架构
```
┌──────────────┐ HTTP/WS ┌────────────────┐ WebSocket ┌──────────┐
│ AI Agent │ ◄───────────► │ Bridge Server │ ◄───────────► │ EasyEDA │
│ (Skill Tool) │ Port Range │ (Node.js) │ Port Range │ (Client) │
└──────────────┘ 49620-49629 └────────────────┘ 49620-49629 └──────────┘
```
## 通信协议
| 消息类型 | 方向 | 说明 |
|----------|------|------|
| `execute` | AI → EDA | 执行 JS 代码 |
| `result` | EDA → AI | 返回执行结果 |
| `error` | EDA → AI | 返回执行错误 |
| `handshake` | Server → Client | 连接验证(含 `service: "easyeda-bridge"`) |
| `ping/pong` | 双向 | 心跳检测 |
## 目录结构
```
easyeda-api-skill/
SKILL.md # AgentSkills 标准技能定义
AGENTS.md # Agent 提示指南
package.json # 项目配置
reference/ # 原始 API 参考文档(gitignore)
docs/ # 构建后的结构化文档(gitignore)
format/ # 嘉立创EDA文档源码格式规范(project/schematic/pcb)
guide/ # API 开发指南(人工撰写)
user-guide/ # 用户指南(人工撰写)
server/index.mjs # WebSocket Bridge 服务器
scripts/
build-docs.mjs # 文档构建脚本
pack.mjs # 打包脚本
dist/ # 打包输出(gitignore)
easyeda-api/ # 可发布的 skill 目录
easyeda-api.zip # 用于 ClawHub 上传的 zip 文件
```
FILE:format/index.md
# 嘉立创EDA文件格式
## V2.2版本的文件格式
V2.2版本的文件格式:[lceda-pro-file-format-v2.2_2022.12.15.zip](https://image.lceda.cn/files/lceda-pro-file-format-v2.2_2022.12.15.zip)
提示:这不是最新的文件格式规范,但这里有绝大部分的格式细节。
## V3版本的文件格式
V3版本使用全新的源码格式,完全不同于之前的格式。
提示:嘉立创EDA 3.0 全面改造了工程格式,使用日志的概念对工程变更进行了增量存储;并且从 2.0 的按照数组偏移量的设计风格,调整成了按照 key-value 的风格,便于后期格式演进,和相关兼容代码的开发,以及提高可读性。
V3版本的文件格式(zip里面包含范例文件):
- [lceda-pro-file-format-v3_2025.10.21.zip](https://image.lceda.cn/files/lceda-pro-file-format-v3_2025.10.21.zip)
- [lceda-pro-file-format-v3_2025.10.21.md](https://image.lceda.cn/files/lceda-pro-file-format-v3_2025.10.21.md)
- [lceda-pro-file-format-v3_2025.10.21.pdf](https://image.lceda.cn/files/lceda-pro-file-format-v3_2025.10.21.pdf)
### 格式详情文档
- [工程格式](/cn/format/project/index.md)
- [原理图格式](/cn/format/schematic/index.md)
- [PCB格式](/cn/format/pcb/index.md)
### 基础文档格式
#### 文档约定
- 工程的所有数据存在一个日志文档里,日志记录变动的首行必须是文件头 `DOCTYPE`,以区分不同类型文档, `DOCTYPE`作为一个 `块级元素`存在于工程日志中
- 以行为单位,每一行都是由两个合法的 JSON 对象拼接而成,第一个对象是用于最终一致性框架解析使用,后一个是 `原子结构对象`
- 键名采用驼峰命名,每个单词的首字母大写(除了第一个单词的首字母外),并且单词之间没有下划线或其他分隔符
- 所有图元都要带上文件内的 `唯一编号`
- `旋转角度` 以逆时针方向为正,统一使用角度制
- 若无特殊说明,所有坐标、长度、大小统一使用 `0.01 inch` 为单位
- 所有颜色都使用 `"#RRGGBB"` 的方式表达,如果需要表示无颜色(完全透明),则用 `""`
- 所有使用 `是否XXXX` 描述的属性,都使用 `1` 是 `0` 否 的编码方式
- 本 `约定` 中未明确描述的部分(如转义等),全部依据 [RFC 7195 The JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc7159)
#### 文档头
- 所有数据的开头必须带上文档头,以区分不同类型文档
- 逐行解析时,当解析遇到文档头时,表示接下来解析的数据都归到该文档下,直到遇到下一个文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "SCH_PAGE", "uuid": "UUID", "client": "clientID" }|
```
1. type:"DOCHEAD",文档头标识
2. docType:文档类型
3. uuid:文档唯一编号,工程内唯一
4. client:最终一致性的一个终端标识
###### docType 文档类型
- 工程配置 `PROJECT_CONFIG`
- 板子 `BOARD`
- 原理图 `SCH`
- 原理图页 `SCH_PAGE`
- PCB `PCB`
- 面板 `PANEL`
- 符号 `SYMBOL`
- 封装 `FOOTPRINT`
- 器件 `DEVICE`
- 真彩图 `BLOB`
- 实例属性 `INSTANCE`
#### 数据格式
```json
{ "type": "TYPE", "id": "UUID", "ticket": 1}||{["key": string]: any}|
```
通过标识符`||`, 将一条数据分割成内外两层数据:
1. 外层数据:用于最终一致性框架使用,保证数据的一致性
1. type 数据类型
2. id 唯一编号,需保证在文档内具体的 type 下唯一
3. ticket 逻辑时钟,仅用于最终一致性框架,保证数据的唯一
2. 内层数据: 图元原子数据,是一个`key-value`对象,具体的数据内容详见各类型对应的文档
之所以分为内外两层数据,是因为在最终一致性框架中,无需关注具体的图元数据,只需要外层数据就能保证数据的唯一,以减少不必要的 JSON 解析,节省内存消耗
```json
{ "type": "META", "ticket": 1}||{"name": "名称"}|
```
有一些数据是在文档内就只能保留一个数据,用 type 字段就能表示唯一,会省略掉 id 字段,只有同一类型下有多个数据时才用 id 字段去区分
#### 最终一致性
- 存储 3.0,数据增删改都是往日志里加一条数据,这样日志里存在多条数据是表示的是同一个数据
- 最终一致性框架根据 type、id、ticket 字段决定保留哪一条数据,保证数据的一致性
ps: 更加详细的描述请查看最终一致性的设计文档,这里仅说明相关字段的用处
###### type 相同且 id 相同的两条数据
```json
{ "type": "TYPE", "id": "UUID", "ticket": 1}||{"data": 1}|
```
```json
{ "type": "TYPE", "id": "UUID", "ticket": 2}||{"data": 2}|
```
最终一致性框架,就会去对比 ticket 字段,ticket 更大的则保留下来,ticket 小的则舍弃,上面 data 为 2 的数据则保留
###### type 相同且 id 相同,ticket 也相同
```json
{ "type": "DOCHEAD" }||{ "docType": "SCH_PAGE", "uuid": "UUID", "client": "1" }|
{ "type": "TYPE", "id": "UUID", "ticket": 1}||{"data": 1}|
```
```json
{ "type": "DOCHEAD" }||{ "docType": "SCH_PAGE", "uuid": "UUID", "client": "2" }|
{ "type": "TYPE", "id": "UUID", "ticket": 1}||{"data": 2}|
```
则去比较文档头的 client 字段,client 标识更小的则保留下来,上面 data 为 1 的数据则保留
#### 删除
##### 原子数据删除
```json
{ "type": "TYPE", "id": "UUID", "ticket": 1}||""
```
数据的删除实际就是将内层数据置为空字符串
##### 文档删除
```json
{ "type": "DELETE_DOC", "ticket": 1}||{"isDelete": true}|
```
1. type `DELETE_DOC` 文档删除标识
2. isDelete 是否删除
- 文档删除实际是添加一个删除的标识,并不会在日志内直接删除文档数据,以方便文档删除的撤销和数据的一致性维护
- 所有删除的数据都会在日志里有所保留,用户如果要去除工程内删除的数据记录,让用户走克隆工程以去除这些数据,日志的快照不会去清除相关删除的记录
FILE:format/pcb/3d.md
# 3D 外壳体系
## SHELL 外壳
```json
{ "type": "SHELL", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.223,
"shellType":"T&B",
"shellHeight":50,
"pcbHeight":100,
"strokeWidth":10,
"path":"复杂多边形",
"attrs":{},
}|
```
1. type 外壳 `SHELL`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. shellType 外壳类型
- `T&B` 上下壳
- `DRAWER` 推盖
- `CLAM` 翻盖
9. shellHeight 外壳高度
10. pcbHeight PCB 高度
11. strokeWidth \*线宽(弃用)
12. path 参考复杂多边形
13. attrs 自定义属性:3D 外壳每种类型都有一组自定义的外壳属性
- T&B
- Thickness:外壳厚度
- BottomHeight:下壳高度
- TopInnerHeight:上壳内壁高度
- TopInnerThickness:上壳内壁厚度
- DRAWER
- Thickness:外壳厚度
- Direction:推盖方向
- `1` X 轴正向
- `2` X 轴负向
- `4` Y 轴正向
- `8` Y 轴负向
## CREASE 侧面基准线(折痕)
`CREASE` 折痕图元需要配合 `CONNECT` 关联 `SHELL_ENTITY` `BOSS`,以表达外壳挖槽
```json
{ "type": "CREASE", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":8.275,
"layerId":49,
"startX":20,
"startY":30,
"endX":40,
"endY":50,
"angle":90,
}|
```
1. type 折痕 `CREASE`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层编号
9. startX 起始 X
10. startY 起始 Y
11. endX 结束 X
12. endY 结束 Y
13. angle 折叠角度
## SHELL_ENTITY 外壳实体区域
没有通过 `CONNECT` 与 `CREASE` 关联的 `SHELL_ENTITY`,则垂直进行顶层、底层外壳的填充/裁剪(挖槽)
```json
{ "type": "SHELL_ENTITY", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.15,
"layerId":50,
"booleanOperation":0,
"belong":0,
"depth":10,
"strokeWidth":10,
"path":"复杂多边形",
}|
```
1. type 外壳实体区域 `SHELL_ENTITY`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层编号
9. booleanOperation 布尔操作:0 裁剪 1 填充
10. belong 隶属:0 自动 1 上壳 2 下壳 4 外壳边框 8 螺丝柱 16 实体,可通过加法组合
- 上下壳:3 = 1 + 2
- 外壳边框 + 螺丝柱:12 = 4 + 8
- 螺丝柱 + 实体:24 = 8 + 16
- 外壳边框 + 螺丝柱 + 实体:28 = 4 + 8 + 16
11. depth 深度
12. strokeWidth 线宽
13. path 参考复杂多边形
## BOSS 螺丝柱
通过 `CONNECT` 与 `CREASE` 关联的 `BOSS`,添加的是侧方的螺丝柱
```json
{ "type": "BOSS", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.8976,
"layerId":50,
"centerX":100,
"centerY":200,
"specification":"M2",
"depth":100,
"thickness":10,
"holeDiameter":20,
"counterBore":[100, 20],
"stiffener":[20, 40, 20, 10],
}|
```
1. type 螺丝柱 `BOSS`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层编号
9. centerX 中心 X
10. centerY 中心 Y
11. specification 螺丝型号:`"M2"` `"M3"` 等,或者 `null` 表示自定义
12. depth 螺丝柱高度
13. thickness 螺丝柱壁厚
14. holeDiameter 螺丝柱通孔直径
15. counterBore 沉头所需参数,当此参数为 `null` 时表示不需要沉头
- 螺丝头高度
- 螺丝头直径
16. stiffener 加强筋所需参数,当此参数为 `null` 时表示不需要加强筋
- 加强筋上端宽度
- 加强筋下端宽度
- 加强筋距螺丝柱上端距离
- 加强筋厚度
FILE:format/pcb/attr.md
# ATTR 属性
属性用以描述 PCB 或者 FOOTPRINT 有可能需要在图上显示的属性
```json
{ "type": "ATTR", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.072,
"parentId":"",
"layerId":1,
"positionX":200,
"positionY":150,
"key":"DESIGNATOR",
"value":"U1",
"keyVisible":0,
"valueVisible":1,
"fontFamily":"宋体",
"fontSize":50,
"strokeWidth":10,
"bold":0,
"italic":0,
"origin":5,
"angle":15,
"reverse":1,
"reverseExpansion":0,
"mirror":1,
"width":100,
"height":200,
"path":["复杂多边形"],
}|
```
1. type 属性 `ATTR`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. parentId 隶属编号,留空表示当前块级图元
9. layerId 层
10. positionX 位置 X:未显示过的属性位置固定为 null
11. positionY 位置 Y:未显示过的属性位置固定为 null
12. key Key
13. value Value
14. keyVisible 是否显示 Key
15. valueVisible 是否显示 Value
16. fontFamily 字体名称
17. fontSize 字号
18. strokeWidth 粗细
19. bold 是否加粗
20. italic 是否斜体
21. origin 对齐模式 `0` 左顶 `1` 中顶 `2` 右顶 `3` 左中 `4` 中中 `5` 右中 `6` 左底 `7` 中底 `8` 右底
22. angle 旋转角度
23. reverse 是否反相扩展
24. reverseExpansion 反相扩展尺寸:反相扩展区域的尺寸,支持负数
25. mirror 是否镜像,一般来说,当一个文字出现在底层,这里也需要相应调整成 `1`
26. width 高,没有则为 null
27. height 宽,没有则为 null
28. path 复杂多边形数组,没有则为 null
FILE:format/pcb/common.md
# 通用格式
## 文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "PCB", "uuid": "UUID", "client": "clientID" }|
```
```json
{ "type": "DOCHEAD" }||{ "docType": "FOOTPRINT", "uuid": "UUID", "client": "clientID" }|
```
- type:"DOCHEAD",文档头标识
- docType:文档类型,"PCB" PCB, "FOOTPRINT" 封装
- uuid:文档唯一编号,工程内唯一
- client:最终一致性的一个终端标识
## CANVAS 画布配置
```json
{ "type": "CANVAS", "ticket": 1 }||
{
"originX":0,
"originY":0,
"unit":"mm",
"gridXSize":10,
"gridYSize":10,
"snapXSize":1,
"snapYSize":1,
"altSnapXSize":0.1,
"altSnapYSize":0.1,
"gridType":1,
"multiGridType":0,
"multiGridRatio":5,
}|
```
1. type 画布配置 `CANVAS`
2. ticket 逻辑时钟
3. originX 画布原点 X
4. originY 画布原点 Y
5. unit **显示**单位(不会影响格式里数据的单位)
6. gridXSize 网格尺寸 X
7. gridYSize 网格尺寸 Y
8. snapXSize 栅格尺寸 X
9. snapYSize 栅格尺寸 Y
10. altSnapXSize Alt 栅格尺寸 X
11. altSnapYSize Alt 栅格尺寸 Y
12. gridType 网格类型:`0` 无 `1` 网格 `2` 网点
13. multiGridType 加粗网格类型:`0` 无 `1` 网格 `2` 网点
14. multiGridRatio 加粗网格倍数:number
## LAYER 层配置
- 所有 `SIGNAL` `PLANE` `SUBSTRATE` 出现的顺序隐含了它的物理堆叠顺序
- 所有 `SIGNAL` `PLANE` `SUBSTRATE` 数量不受限制
- 格式不假设层编号与层维持稳定的关系,具体实现由工具决定
```json
{ "type": "LAYER","id": 0, "ticket": 1 }||
{
"layerType":"TOP",
"layerName":"Top Layer",
"status":1,
"activeColor":"#FF0000",
"activateTransparency":0.5,
"inactiveColor":"#880000",
"inactiveTransparency":0.3,
}|
```
1. type 层 `LAYER`
2. id 层编号:唯一
3. ticket 逻辑时钟
4. layerType 层类型
5. layerName 层别名,需要唯一
6. status 状态:`1` 使用 `2` 显示 `4` 锁定,可通过相加叠加状态,例如
- 使用并显示 3 = 1 + 2
- 使用并锁定但不显示 5 = 1 + 4
- 使用并显示并锁定 7 = 1 + 2 + 4
7. activeColor 激活颜色
8. activateTransparency 激活透明度
9. inactiveColor 非激活颜色
10. inactiveTransparency 非激活透明度
```json
["LAYER",2,"BOTTOM","Bottom Layer",1,"#0000ff",1,"#00007f",1]
["LAYER",3,"TOP_SILK","Top Silkscreen Layer",1,"#ffcc00",1,"#7f6600",1]
["LAYER",4,"BOT_SILK","Bottom Silkscreen Layer",1,"#66cc33",1,"#336619",1]
["LAYER",5,"TOP_SOLDER_MASK","Top Solder Mask Layer",1,"#800080",1,"#400040",1]
["LAYER",6,"BOT_SOLDER_MASK","Bottom Solder Mask Layer",1,"#aa00ff",1,"#55007f",1]
["LAYER",7,"TOP_PASTE_MASK","Top Paste Mask Layer",1,"#808080",1,"#404040",1]
["LAYER",8,"BOT_PASTE_MASK","Bottom Paste Mask Layer",1,"#800000",1,"#400000",1]
["LAYER",9,"TOP_ASSEMBLY","Top Assembly Layer",1,"#33cc99",1,"#19664c",1]
["LAYER",10,"BOT_ASSEMBLY","Bottom Assembly Layer",1,"#5555ff",1,"#2a2a7f",1]
["LAYER",11,"OUTLINE","Board Outline Layer",1,"#ff00ff",1,"#7f007f",1]
["LAYER",12,"MULTI","Multi-Layer",1,"#c0c0c0",1,"#606060",1]
["LAYER",13,"DOCUMENT","Document Layer",1,"#ffffff",1,"#7f7f7f",1]
["LAYER",14,"MECHANICAL","Mechanical Layer",1,"#f022f0",1,"#781178",1]
["LAYER",50,"SUBSTRATE","Dialectric1",3,"#999966",1,"#4c4c33",1]
["LAYER",15,"SIGNAL","Inner1",3,"#999966",1,"#4c4c33",1]
["LAYER",52,"SUBSTRATE","Dialectric3",3,"#999966",1,"#4c4c33",1]
["LAYER",51,"SUBSTRATE","Dialectric2",3,"#999966",1,"#4c4c33",1]
["LAYER",17,"SIGNAL","Inner2",3,"#008000",1,"#004000",1]
["LAYER",58,"SUBSTRATE","Dialectric9",3,"#999966",1,"#4c4c33",1]
["LAYER",16,"SIGNAL","Inner3",3,"#00ff00",1,"#007f00",1]
["LAYER",53,"SUBSTRATE","Dialectric4",3,"#999966",1,"#4c4c33",1]
["LAYER",47,"HOLE","Hole Layer",1,"#222222",1,"#111111",1]
["LAYER",48,"SHELL","3D Shell Layer",1,"#222222",1,"#111111",1]
["LAYER",49,"TOP_SHELL","Top 3D Shell Layer",1,"#222222",1,"#111111",1]
["LAYER",50,"BOT_SHELL","Bottom 3D Shell Layer",1,"#222222",1,"#111111",1]
```
## LAYER_PHYS 层物理特性配置
```json
{ "type": "LAYER_PHYS","id": 0, "ticket": 1 }||
{
"material":"COPPER",
"thickness":1,
"permittivity":0,
"lossTangent":0,
"isKeepIsland":0,
}|
```
1. type 层物理特性 `LAYER_PHYS`
2. id 层编号
3. ticket 逻辑时钟
4. material 层材质
5. thickness 厚度
6. permittivity 介电常数
7. lossTangent 损耗切线
8. isKeepIsland 内电层是否保留孤岛
```json
{ "type": "LAYER_PHYS","id": 2, "ticket": 1 }||
{
"material":"COPPER",
"thickness":1,
"permittivity":0,
"lossTangent":0,
"isKeepIsland":0,
}|
```
```json
{ "type": "LAYER_PHYS","id": 15, "ticket": 1 }||
{
"material":"COPPER",
"thickness":1,
"permittivity":0,
"lossTangent":0,
"isKeepIsland":1,
}|
```
```json
{ "type": "LAYER_PHYS","id": 50, "ticket": 1 }||
{
"material":"COPPER",
"thickness":10,
"permittivity":4.5,
"lossTangent":0.02,
"isKeepIsland":0,
}|
```
## ACTIVE_LAYER 配置当前激活层
```json
{ "type": "ACTIVE_LAYER", "ticket": 1 }||
{
"layerId":0,
}|
```
1. type 当前激活层 `ACTIVE_LAYER`
2. ticket 逻辑时钟
3. layerId 层序号
## SILK_OPTS 丝印配置
丝印配置目前主要用于彩色丝印工艺
```json
{ "type": "SILK_OPTS","id": 3, "ticket": 1 }||
{
"defaultColor":"#ffffff",
"baseColor":"#000000",
}|
```
1. type 丝印配置:SILK_OPTS
2. id 层编号,层:只有 顶层丝印 与 底层丝印
3. ticket 逻辑时钟
4. defaultColor 默认颜色
5. baseColor 底色
```json
{ "type": "SILK_OPTS","id": 4, "ticket": 1 }||
{
"defaultColor":"#020202",
"baseColor":"#aaaaaa",
}|
```
## PREFERENCE 偏好
```json
{ "type": "PREFERENCE", "ticket": 1 }||
{
"startTrackWidthFollowLast":0,
"lastTrackWidth":10,
"startViaSizeFollowLast":0,
"lastViaInnerDiameter":39.37,
"lastViaDiameter":78.74,
"snap":1,
"routingMode":2,
"routingCorner":"L45",
"removeLoop":1,
"rotatingObject":0,
"trackFollow":0,
"stretchTrackMinCorner":1,
"preferenceConfig":null,
"realTimeUpdateUnusedLayers":0,
"unusedPadRange":3,
"pushVia":"OPTIMIZA_OPEN",
"pathOptimization4BePushed":0,
"currentPathOptimization4BePushed":"OPTIMIZA_WEAK",
"removeCircuitsContainingVias":1,
"removeAntenna":1,
}|
```
1. type 偏好 `PREFERENCE`
2. ticket 逻辑时钟
3. startTrackWidthFollowLast 起始布线是否跟随上次设置
4. lastTrackWidth 上次布线宽度
5. startViaSizeFollowLast 起始打孔尺寸是否跟随上次设置
6. lastViaInnerDiameter 上次打孔内径
7. lastViaDiameter 上次打孔外径
8. snap 是否自动吸附
9. routingMode 布线模式:`0` 无 `1` 推挤 `2` 环绕 `3` 阻挡
10. routingCorner 布线拐角模式
- `"L45"` 线条 45 度
- `"L90"` 线条 90 度
- `"R45"` 圆弧 45 度
- `"R90"` 圆弧 90 度
- `"L"` 线条自由角度
- `"R"` 圆弧自由角度
11. removeLoop 布线是否自动移除回路
12. rotatingObject 是否单对象旋转
13. trackFollow 导线是否跟随封装移动
14. stretchTrackMinCorner 拉伸导线最小拐角比率(比线宽)
15. preferenceConfig 层堆叠偏好来源
16. realTimeUpdateUnusedLayers 是否自动移除未使用焊盘
17. unusedPadRange 移除未使用焊盘的范围
1. 全部
2. 仅焊盘
3. 仅过孔
18. pushVia 推挤过孔
19. pathOptimization4BePushed 路径优化(单段/整段)
20. currentPathOptimization4BePushed 当前导线路径优化
21. removeCircuitsContainingVias 是否移除有过孔的回路
22. removeAntenna 是否移除天线
## ITEM_ORDER 图元顺序建议
提供给 PCB 图元顺序建议,PCB 可以依照这个信息安排图元顺序,这个信息只能出现一次
```json
{ "type": "ITEM_ORDER", "ticket": 1 }||{ "ids":["e2", "e1"] }|
```
1. type 图元顺序建议:ITEM_ORDER
2. ticket 逻辑时钟
3. ids 图元编号:有两种编码形式
1. 普通编号:形式为 `/^[a-z]+\d+$/i`,如 `e1` `e123` 等
2. 封装实例编号:形式为 `/^[a-z]+\d+[a-z]+\d+$/i`,用于如封装中的丝印等,如 `e1e5` `e12e22` 等
这里说明下为什么叫做 “建议”,因为比如 `e1` 是顶层图元,`e2` 是底层图元,那么
```json
{ "type": "ITEM_ORDER", "ticket": 1 }||{ "ids":["e2", "e1"] }|
```
默认依然是 `e1` 在上面,除非有什么特殊操作导致底层置顶了
FILE:format/pcb/component.md
# 封装体系
PCB 的封装采用 Master/Instance 模式,通过覆盖规则去描述封装,以最低冗余的方式去描述
## COMPONENT 器件实例
实例里只存在属性,同 `Key` 属性将以实例的代替 `FOOTPRINT` 的
```json
{ "type": "COMPONENT", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.22,
"layerId":1,
"positionX":150,
"positionY":200,
"angle":45,
"attrs":{ "3D Model": "uuid", "3D Model Transform": "20,10,0,0,15,45,0,0,20" },
}|
```
1. type 实例 `COMPONENT`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层(只有顶层底层)
9. positionX 位置 X
10. positionY 位置 Y
11. angle 旋转角度
12. attrs 自定义属性
- 固定 `3D Model` 为 3D 模型的 uuid,此 uuid 代表 components 表中 doctype = 16 的一条记录
- 固定 `3D Model Transform` 为 3D 模型变换参数
```json
["ATTR", "e102", 0, "e8", 1, "Designator", "U1", 0, 1, "宋体", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]
```
```json
["ATTR", "e103", 0, "e8", 1, "Footprint", "footprint-uuid", 0, 1, "宋体", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]
```
```json
["ATTR", "e104", 0, "e8", 1, "Device", "device-uuid", 0, 1, "宋体", 50, 10, 0, 0, 0, 1, 2, 15, 1, 1]
```
#### 焊盘实例网络映射 `PAD_NET`
```json
{ "type": "PAD_NET", "id":"COMPONENT_UUID", "ticket": 1 }||
{
"padNum":"a1",
"padNet":"GND",
"padId":"e125",
}|
```
1. type 焊盘实例网络映射 `PAD_NET`
2. id 所属器件实例编号
3. ticket 逻辑时钟
4. padNum 焊盘编号
5. padNet 网络名
6. padId 封装内焊盘 ID(可选)
#### 复用图块信息 `REUSE_BLOCK`
```json
{ "type": "REUSE_BLOCK", "id":"COMPONENT_UUID", "ticket": 1 }||
{
"groupId":"$1e16",
"channelId":"$2e5_$4e3",
}|
```
1. type 复用图块信息 `REUSE_BLOCK`
2. id 所属器件实例编号
3. groupId 分组 ID
4. channelId 通道 ID
#### 3D Model Transform 的特殊说明
```json
{ "type": "COMPONENT", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.22,
"layerId":1,
"positionX":150,
"positionY":200,
"angle":45,
"attrs":{ "3D Model": "uuid", "3D Model Transform": "20,10,0,0,15,45,0,0,20" },
}|
```
在器件中,固定 `3D Model Transform` 为 3D 模型为匹配此器件【在顶层】【坐标 0,0】【旋转角度 0】时所需要的变换参数
其参数为
1. sizeX:X 轴尺寸
2. sizeY:Y 轴尺寸
3. sizeZ:Z 轴尺寸,这里有个兼容性处理,如果为 0,则自动适应高度
4. rotZ:绕 Z 轴旋转角度
5. rotX:绕 X 轴旋转角度
6. rotY:绕 Y 轴旋转角度
7. offX:X 轴偏移量
8. offY:Y 轴偏移量
9. offZ:Z 轴偏移量
通过 3D 模型变换参数,生成 3D 模型变换矩阵的算法如下
```python
cx = 3D 模型 X 轴中点
cy = 3D 模型 Y 轴中点
bz = 3D 模型 最低 Z 值
wx = 3D 模型 X 轴宽度
wy = 3D 模型 Y 轴宽度
wz = 3D 模型 Z 轴宽度
ORIGIN = translate(-cx, -cy, -bz)
SCALE = scale(sizeX / wx, sizeY / wy, sizeZ / wz)
ROT = rotateZXY(rotZ, rotX, rotY)
OFFSET = translate(offX, offY, offZ)
MATRIX = OFFSET X ROT X SCALE X ORIGIN
```
FILE:format/pcb/dimension.md
# DIMENSION 尺寸工具集
```json
{ "type": "DIMENSION", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":2.221,
"type":"RADIUS",
"layerId":3,
"unit":"mm",
"strokeWidth":0.5,
"precision":3,
"textFollow":1,
"coords": [100 200 300 400 400 400],
}|
["DIMENSION", "e101", 0, 1, 2.221, "RADIUS", 3, "mm", 0.5, 3, 1, [100 200 300 400 400 400]]
```
1. type 尺寸工具 `DIMENSION`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. type 尺寸类型: `RADIUS` 半径 `LENGTH` 长度 `ANGLE` 角度
9. layerId 层
10. unit 单位 `mm` `cm` `inch` `mil`
11. strokeWidth 线宽
12. precision 精度
13. textFollow 文字是否跟随:`1` 工具自动决定文字的位置 `0` 永远采用 `ATTR` 的位置
14. coords 坐标集 X1 Y1 X2 Y2 X3 Y3 ... 不同尺寸类型对坐标有不同的定义
```json
["ATTR", "e102", 0, "e101", 1, 200, 150, "VALUE", "1234mm", 0, 1, "宋体", 50, 10, 0, 0, 0, 2, 15, 1, 1]
```
`DIMENSION` 需要附带一个 Key 为 `VALUE` 的属性,表达尺寸工具的文字部分,EDA 需要忽略其不需要的属性,例如 `是否显示 Key` `是否显示 Value`
### RADIUS 半径工具
坐标集第一个坐标为和 ARC 接触的端点,最后一个坐标为默认显示文字的端点,如下图

### LENGTH 长度工具
坐标集只需要具有四个点,分别如下图

### ANGLE 角度工具
坐标集需要 3 个点,分别如下图

FILE:format/pcb/index.md
# PCB 格式文档
本章节详细介绍了嘉立创EDA PCB文件的格式规范。PCB文件主要包含以下几个部分:
- [通用格式](/cn/format/pcb/common.md):文档头、画布、层、物理层、偏好等。
- [分区格式](/cn/format/pcb/partition.md):分区定义。
- [基础图元](/cn/format/pcb/primitive.md):网络、图元配置、分组、丝印配置、关联、属性等。
- [焊盘与过孔](/cn/format/pcb/pad_via.md):焊盘和过孔。
- [形状图元](/cn/format/pcb/shape.md):直线、圆弧、多边形体系、折线、填充、区域、覆铜、图片、泪滴等。
- [二进制对象](/cn/format/pcb/obj.md):内嵌对象。
- [3D 外壳](/cn/format/pcb/3d.md):外壳、折痕、实体、螺丝柱。
- [文字体系](/cn/format/pcb/text.md):文字。
- [属性](/cn/format/pcb/attr.md):属性。
- [尺寸工具](/cn/format/pcb/dimension.md):尺寸标注。
- [封装体系](/cn/format/pcb/component.md):元件实例。
- [设计规则](/cn/format/pcb/rule.md):规则模板、规则定义、规则选择器。
- [拼版](/cn/format/pcb/panel.md):拼版参数。
FILE:format/pcb/obj.md
# OBJ 二进制内嵌对象
将文件等数据编码到如下图元,以内嵌于图页上的图片和文件,可作为附件下载,以及直接显示
```json
{ "type": "OBJ", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":5.286,
"layerId":15,
"fileName":"a.png",
"startX":200,
"startY":300,
"width":10,
"height":20,
"angle":0,
"mirror":1,
"path":"blob:1234ade2f",
}|
["OBJ", "e662", 0, 1, 5.286, 15, "a.png", 200, 300, 10, 20, 0, 1, "blob:1234ade2f"]
```
1. type 二进制内嵌对象标识:OBJ
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层
9. fileName 文件名
10. startX 左上 X
11. startY 左上 Y
12. width 宽
13. height 高
14. angle 旋转角度,绕 `左上` 点
15. mirror 原始图片是否水平镜像,镜像以原始图片 BBox 中点进行水平镜像
16. path 二进制数据
1. 一般格式,与 `Data Urls` 完全兼容 `data:[<mediatype>][;base64],<data>`
- 如 `data:image/png;base64,asdfasdfwer`
1. BLOB 引用格式 `blob:hashid`
FILE:format/pcb/pad_via.md
# 焊盘与过孔
## VIA 过孔
过孔一般用于打通不同层之间的电路
对于多层板一般有如下几种模式
通孔:`开始层` 到 `结束层` 贯穿顶层底层
盲孔:`开始层` 或 `结束层` 只有一个属于顶层或底层
埋孔:`开始层` 和 `结束层` 都不属于顶层或底层
```json
{ "type": "VIA", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":3.223,
"netName":"GND",
"ruleName":"asdf",
"centerX":100,
"centerY":200,
"holeDiameter":5,
"viaDiameter":9,
"viaType":0,
"topSolderExpansion":null,
"bottomSolderExpansion":null,
"unusedInnerLayers":[17],
}|
```
1. type 过孔 `VIA`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName NET
9. ruleName 过孔层类型:设计规则名称,定义过孔的开始层结束层
10. centerX 坐标 X
11. centerY 坐标 Y
12. holeDiameter 孔直径
13. viaDiameter 焊盘直径
14. viaType 过孔类型:0 普通过孔 1 缝合孔
15. topSolderExpansion 顶层阻焊扩展:`null` 为遵循规则
16. bottomSolderExpansion 底层阻焊扩展:`null` 为遵循规则
17. unusedInnerLayers 隐藏焊盘层(可选):被隐藏焊盘的层数组
## PAD 焊盘
焊盘一般用于元器件与电路板焊接
焊盘要么贯穿整个电路板,要么只在顶层或者底层,所以只有顶层、底层、多层三种层
```json
{ "type": "PAD", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":6.234,
"netName":"GND",
"layerId":0,
"num":"1",
"centerX":100,
"centerY":200,
"padAngle":15,
"hole":["参考孔"],
"defaultPad":["参考焊盘"],
"specialPad":[[0, 1, ["参考焊盘"]]],
"padOffsetX":10,
"padOffsetY":-5,
"relativeAngle":30,
"plated":1,
"padType":null,
"topSolderExpansion":0.5,
"bottomSolderExpansion":0.4,
"topPasteExpansion":null,
"bottomPasteExpansion":0,
"connectMode":0,
"spokeSpace":10,
"spokeWidth":5,
"spokeAngle":45,
"unusedInnerLayers":[15, 17],
}|
```
1. type 焊盘 `PAD`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层(只有顶层、底层、多层)
10. num 焊盘编号
11. centerX 焊盘原点 X
12. centerY 焊盘原点 Y
13. padAngle 焊盘旋转角度
14. hole 孔:参考孔,`null` 表示无孔
15. defaultPad 默认焊盘:参考焊盘
16. specialPad 特殊焊盘(多组,每组定义如下)
1. 开始层
2. 结束层
3. 参考焊盘
17. padOffsetX 孔偏移 X
18. padOffsetY 孔偏移 Y
19. relativeAngle 孔相对焊盘旋转角度
20. plated 是否金属化孔壁
21. padType 焊盘功能:0 普通焊盘 1 测试点 2 标识点
22. topSolderExpansion 顶层阻焊扩展:`null` 为遵循规则
23. bottomSolderExpansion 底层阻焊扩展:`null` 为遵循规则
24. topPasteExpansion 顶层助焊扩展:`null` 为遵循规则
25. bottomPasteExpansion 底层助焊扩展:`null` 为遵循规则
26. connectMode 热焊-连接方式:`null` 为遵循规则,其他数据定义同设计规则
27. spokeSpace 热焊-发散间距:`null` 为遵循规则,其他数据定义同设计规则
28. spokeWidth 热焊-发散线宽:`null` 为遵循规则,其他数据定义同设计规则
29. spokeAngle 热焊-发散角度:`null` 为遵循规则,其他数据定义同设计规则
30. unusedInnerLayers 隐藏焊盘层(可选):被隐藏焊盘的层数组
### 孔
1. 长圆孔
1. 长圆孔 `ROUND`
1. 宽
1. 高
1. 方孔
1. 方孔 `RECT`
1. 宽
1. 高
### 焊盘
孔的旋转与盘的互相独立
1. 长圆焊盘
1. 长圆焊盘 `ROUND`
1. 宽
1. 高
1. 方焊盘
1. 方焊盘 `RECT`
1. 宽
1. 高
1. 圆角半径
1. 正多边形焊盘
1. 正多边形焊盘 `NGON` (名称来自 3DSMAX)
1. 直径
1. 边数(> 2)
1. 多边形焊盘
1. 多边形焊盘 `POLY`
1. 参考复杂多边形,以孔为原点的相对位置
FILE:format/pcb/panel.md
# 拼版
```json
{ "type": "PANELIZE", "ticket": 1 }||
{
"on":1,
"row":2,
"column":3,
"rowSpacing":5.5,
"columnSpacing":6.1,
"onlyOutline":1,
}|
```
1. type 拼版 `PANELIZE`
2. ticket 逻辑时钟
3. on 是否启用
4. row 行数
5. column 列数
6. rowSpacing 行距
7. columnSpacing 列距
8. onlyOutline 是否只拼边框
```json
{ "type": "PANELIZE_STAMP", "ticket": 1 }||
{
"direction":1,
"on":1,
"stampHoleGroupQuantity":3,
"stampHoleDiameter":8,
"stampHoleQuantityPerGroup":0,
"stampHoleSpacing":1,
}|
```
1. type 邮票孔参数:`PANELIZE_STAMP`
2. ticket 逻辑时钟
3. direction 方向:`0` 水平 `1` 垂直
4. on 是否启用(不启用则使用 V-CUT)
5. stampHoleGroupQuantity 邮票孔组数
6. stampHoleDiameter 邮票孔直径
7. stampHoleQuantityPerGroup 邮票孔每组数量
8. stampHoleSpacing 邮票孔间距
```json
{ "type": "PANELIZE_SIDE", "ticket": 1 }||
{
"direction":0,
"on":1,
"sideHeight":5,
"positionHoleDiameter":3,
"markDiameter":2,
"markExpansion":1,
}|
```
1. type 工艺边参数:`PANELIZE_SIDE`
2. ticket 逻辑时钟
3. direction 方向:`0` 水平 `1` 垂直
4. on 是否启用(不启用则不使用工艺边)
5. sideHeight 工艺边高度
6. positionHoleDiameter 定位孔直径(`0` 表示无定位孔)
7. markDiameter Mark 点直径(`0` 表示不启用 Mark 点)
8. markExpansion Mark 点阻焊扩展
FILE:format/pcb/partition.md
# 分区格式
PCB 引入了分区设计,分区设计需要标记大量元素的分区信息,所以采用了如下格式设计
## PARTITION 分区图元
```json
{ "type": "LAYER_PHYS","id": "UUID", "ticket": 1 }||
{
"name":"分区1",
"fileUuid":"SUB-PCB-UUID",
"path":"复杂多边形",
}|
```
1. type 分区:`PARTITION`
2. id 图元编号
3. ticket 逻辑时钟
4. name 分区名称
5. fileUuid 子图 UUID
6. path 分区形状
所有归属于分区的图元都得带上对应的分区图元编号
```json
{ "type": "VIA", "id":"viaUuid", "ticket": 1 }||
{
"partitionId":"partitionId",// 带上该id,表示归属对应分区
"groupId":0,
"locked":1,
"zIndex":3.223,
"netName":"GND",
"ruleName":"asdf",
"centerX":100,
"centerY":200,
"holeDiameter":5,
"viaDiameter":9,
"viaType":0,
"topSolderExpansion":null,
"bottomSolderExpansion":null,
"unusedInnerLayers":[17],
}|
```
FILE:format/pcb/primitive.md
# 基础图元格式
## NET 配置网络信息
网络信息和 AD 的设计有区别
- AD 这里是必选的
- 本格式只是需要有特殊 `网络类型` 和 `网络颜色` 才填写上去
设计差异的原因在于是否有一个专门的网络设置界面,会列出所有网络去设置
```json
{ "type": "NET","id": "A", "ticket": 1 }||
{
"netType":"High Speed",
"specialColor":"#666666",
"hideRetLine":0,
"differentialName":"AASDF",
"isPositiveNet":1,
"equalLengthGroupName":"ABC",
}|
```
1. type 网络配置 `NET`
2. id 唯一标识,网络名称
3. ticket 逻辑时钟
4. netType 网络类型:`null` 为无类型
5. specialColor 特殊颜色:`null` 为无特殊颜色
6. hideRetLine 是否隐藏飞线
7. differentialName 差分对名称:`null` 为非差分对
8. isPositiveNet 是否差分对正极
9. equalLengthGroupName 等长组名称:`null` 为非等长组
```json
{ "type": "NET","id": "B", "ticket": 1 }||
{
"netType":null,
"specialColor":"#666666",
"hideRetLine":1,
"differentialName":"AASDF",
"isPositiveNet":0,
"equalLengthGroupName":"ABC",
}|
```
```json
{ "type": "NET","id": "C", "ticket": 1 }||
{
"netType":"High Speed",
"specialColor":null,
"hideRetLine":1,
"differentialName":null,
"isPositiveNet":0,
"equalLengthGroupName":null,
}|
```
## PRIMITIVE 图元配置
```json
{ "type": "PRIMITIVE","id": "VIA", "ticket": 1 }||
{
"display":1,
"pick":0,
}|
```
1. type 图元配置 `PRIMITIVE`
2. id 唯一标识,图元名称
3. ticket 逻辑时钟
4. display 是否显示
5. pick 是否可拾取
```json
{ "type": "PRIMITIVE","id": "PAD", "ticket": 1 }||
{
"display":0,
"pick":1,
}|
```
## GROUP 分组配置
通过分组配置,给每个组一个名称,如果无名称,由 EDA 决定如何显示默认组名
```json
{ "type": "GROUP","id": "2", "ticket": 1 }||
{
"groupName":"ABCD",
}|
```
1. type 分组配置 `GROUP`
2. id 分组编号
3. ticket 逻辑时钟
4. groupName 名称
```json
{ "type": "GROUP","id": "5", "ticket": 1 }||
{
"groupName":"中文名称",
}|
```
## CONNECT 图元关联
图元关联用于表达一些图元的内部组合逻辑,例如
- 泪滴与 `LINE` `ARC` `PAD` `VIA` 的联系
- 焊盘与其相关的引脚 3D 外形 `FILL` 的联系
- 3D 外壳中 `CREASE` 与 `BOSS` `SHELL_ENTITY` 的联系
- PCB 针对封装内图元的覆盖
只支持表达一对多的关系
```json
{ "type": "CONNECT","id": "e3", "ticket": 1 }||{ "relatedIds":["e15", "e18", "e100"] }|
```
1. type 图元关联 `CONNECT`
2. id 主图元编号
3. ticket 逻辑时钟
4. relatedIds 关联的图元编号
多对多的关系可以用多个表达,暂时没有对应场景
```json
{ "type": "CONNECT","id": "e4", "ticket": 1 }||{ "relatedIds":["e5", "e6"] }|
```
```json
{ "type": "CONNECT","id": "e5", "ticket": 1 }||{ "relatedIds":["e4", "e6"] }|
```
```json
{ "type": "CONNECT","id": "e6", "ticket": 1 }||{ "relatedIds":["e4", "e5"] }|
```
PCB 中针对封装内图元的覆盖,使用形如 `/^[a-z]+\d+[a-z]+\d+$/i` 的形式将封装和里面图元 ID 拼一起来引用,表达如下
```json
["DOCTYPE", "PCB", "1.0"]
["COMPONENT", "e13", 5, 1, ...]
["VIA", "e13e20", 0, "GND", "asdf", ....]
["PAD", "e13e25", 1, "GND", 0, "1", ....]
["CONNECT", "e13", ["e13e20", "e13e25"]]
```
封装内容如下
```json
["DOCTYPE", "FOOTPRINT", "1.0"]
["VIA", "e20", 0, "GND", "sss", ....]
["PAD", "e25", 1, "GND", 0, "3", ....]
```
## PROP 附加图元属性
有一些图元属性非必须表达,且相对通用,则用 `PROP` 辅助描述
```json
{ "type": "PROP", "id":"UUID", "ticket": 1 }||{ "color":"#22ee44" }|
```
1. type 附加图元属性:PROP
1. id 被附加的图元编号:有两种编码形式
1. 普通编号:形式为 `/^[a-z]+\d+$/i`,如 `e1` `e123` 等
1. 封装实例编号:形式为 `/^[a-z]+\d+[a-z]+\d+$/i`,用于如封装中的丝印等,如 `e1e5` `e12e22` 等
1. color 特殊颜色
```json
{ "type": "PROP", "id":"e7e25", "ticket": 1 }||{ "color":"#22ee44" }|
```
如果要覆盖封装内的图元,则采用此复合编号的形式去描述
## EQLEN_GRP
```json
{ "type": "EQLEN_GRP", "id":"UUID", "ticket": 1 }||
{
"name":"equal length pad group 2",
"sort":1.97,
"pads":
[
["U1:1", "U2:3"],
["U1:2", "U1:a"]
],
}|
```
1. type 等长组:`EQLEN_GRP`
2. id 唯一编号
3. ticket 逻辑时钟
4. name 等长组名称:全工程唯一
5. sort 排序
6. pads 用 `位号:焊盘编号` 标识焊盘的数组
FILE:format/pcb/rule.md
# 设计规则体系
## 设计规则模板
设计规则模板逻辑上有两种理解方式,PCB 自行根据需要选择
1. 作为其他设计规则的基版,其他设计规则是对模板的覆盖
1. 与其他设计规则互斥,有模板其他设计规则只是暂存,不产生任何效果
1. 作为来源于哪个模板的标识,不影响后续实际规则的效力(当前采用的方案)
```json
{ "type": "RULE_TEMPLATE", "ticket": 1 }||{ "name": "JLCPCB Capability(High Frequency Board)"}|
```
1. type 设计规则模板:`RULE_TEMPLATE`
2. ticket 逻辑时钟
3. name 模板名称
## 设计规则
```json
{ "type": "RULE", "id":"UUID", "ticket": 1 }||
{
"ruleType":"Safe Clearance",
"ruleName":"通用",
"ruleState":1,
"ruleContext":{},
}|
```
1. type 设计规则:`RULE`
2. ticket 逻辑时钟
3. ruleType 规则类型:EDA 自己决定
4. ruleName 规则名称
5. ruleState 规则状态:0 普通规则 1 默认规则 2 停用规则
6. ruleContext 规则内容:EDA 自己决定
同一 `规则类型` 设计规则出现的顺序,需要和【规则管理】左侧树的顺序一致
## 规则选择器
```json
{ "type": "RULE_SELECTOR", "id":"UUID", "ticket": 1 }||
{
"ruleSelect":["NET", "GND"],
"ruleOrder":0,
"ruleKeyValue":{ "Safe Clearance": "通用", "Other Clearance": "通用" },
}|
```
1. type 规则选择器:`RULE_SELECTOR`
2. ticket 逻辑时钟
3. ruleSelect 选择器
1. 网络类型:`["NET_CLASS", "High Speed"]`
2. 网络:`["NET", "GND"]`
3. 层:`["LAYER", 3]`
4. 区域:`["REGION", "e10"]`
5. 封装:`["FOOTPRINT", "0805"]`
6. 元件:`["COMPONENT", "e100"]`
7. 覆铜:`["POUR", "e100"]`
8. 差分对:`["DIFF_PAIR", "asdf"]`
9. 等长对:`["EQ_LEN_GRP", "fdsa"]`
10. 未来如果要配置逻辑,可以写逻辑 `["AND", ["NET", "GND"], ["LAYER", 5]]`
4. ruleOrder 优先级:数值越小,优先级越高,建议
- `0` 元件规则
- `1` 封装规则
- `2` 区域规则
- `3` 网络-网络规则
- `4` 网络规则
- `5` 层规则
5. ruleKeyValue 规则,Key 为 规则类,Value 为 规则名称,每个规则类下只能选择一个规则
FILE:format/pcb/shape.md
# 形状图元
## LINE 直线
```json
{ "type": "LINE", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":9.223,
"netName":"GND",
"layerId":1,
"startX":100,
"startY":200,
"endX":400,
"endY":300,
"width":0.7,
}|
```
1. type 直线 `LINE`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层
10. startX 开始 X
11. startY 开始 Y
12. endX 结束 X
13. endY 结束 Y
14. width 线宽
## ARC/CARC 圆弧线
圆弧借鉴 Eagle 的数学模型,以 `起始` `结束` 为基准去描述
```json
{ "type": "ARC", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":2.866,
"netName":"GND",
"layerId":1,
"startX":100,
"startY":200,
"endX":300,
"endY":400,
"angle":-170,
"width":10,
}|
```
1. type 圆弧线
- `ARC` 两点交互模式
- `CARC` 中心圆弧交互模式
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层
10. startX 起始 X
11. startY 起始 Y
12. endX 结束 X
13. endY 结束 Y
14. angle 圆弧角,逆时针正,顺时针负
15. width 线宽
## 多边形体系
SVG 中 path 是一个对多边形优秀的抽象。
但由于 PCB 内用不到其中相对位置等功能,并且有条件设计更方便解析的方式。
所以仿造 SVG 的 path 创造了一种类似的表达多边形的方式。
多边形体系内 `POLY` `REGION` `POUR` 支持互相转换
### 单多边形的定义
单多边形为首尾重合的一条不间断的线所描述的区域。如果首尾不重合需要将其自动重合。
```json
[300, 200, "L", 400, 200, "ARC", 400, 220, 15, "C", 200, 500, 400, 300, 100, 100]
```
```json
["R", 100, 200, 300, 300, 0]
```
```json
["CIRCLE", 100, 200, 5, 1]
```
#### L 直线模式
`X Y L X Y X Y ...` 模式为直线模式,所有坐标将用直线将其连一一连起来
#### ARC/CARC 圆弧模式
`startX startY ARC angle endX endY` 模式为圆弧模式
- startX/startY 开始坐标
- angle:圆弧角,逆时针正,顺时针负
- endX/endY 结束坐标
`startX startY CARC angle endX endY` 中心圆弧交互模式
#### C 三阶贝塞尔模式
`X1 Y1 C X2 Y2 X3 Y3 X4 Y4 ...` 模式为三阶贝塞尔模式,所有坐标为其控制点
#### R 矩形模式
`R X Y width height rot isCCW round` 矩形模式与其它都不兼容,是一个独立的模式
- X/Y:左上坐标
- width:宽
- height:高
- rot:旋转角度
- isCCW:是否逆时针
- round:圆角半径
#### CIRCLE 圆形模式
`CIRCLE cx cy r isCCW` 圆形模式与其它都不兼容,是一个独立的模式
- cx/cy:中心点坐标
- r:半径
- isCCW:是否逆时针
### 复杂多边形的定义
```json
[[单多边形1:外框], [单多边形2:内洞]]
```
复杂多边形可以包含多个单多边形,固定第一个多边形顺时针,表示外框,后续所有多边形逆时针,表示内洞
## POLY 折线
折线和 `LINE` `ARC` 区别较小,但是其具有保持绘制时【连续的一条线】的概念,以和 `REGION` `FILL` `POUR` 互转
```json
{ "type": "POLY", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":6.417,
"netName":"GND",
"layerId":1,
"width":0.5,
"path":["单多边形"],
}|
```
1. type 折线 `POLY`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层
10. width 线宽
11. path 请参考单多边形
## FILL 填充
```json
{ "type": "FILL", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex": 0.794,
"netName":"GND",
"layerId":3,
"width":10,
"fillStyle":0,
"path":["复杂多边形"],
}|
```
1. type 填充 `FILL`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层
10. width 线宽
11. fillStyle 填充模式:0 实心填充 1 网格填充 2 内电层填充
12. path 请参考复杂多边形章节
1. 对于单次画的多边形,这里只有一个单多边形
1. 对于组合模式画的多边形,这里才有多个单多边形
## REGION 区域
禁止区域为未来一个很重要的功能,除了辅助手工设计以外,还可以辅助自动布局布线,提供自动化工具除设计规则外,区域范围的约束信息
```json
{ "type": "REGION", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.901,
"layerId":3,
"width":1,
"prohibitType":[1, 2, 5],
"path":["复杂多边形"],
"name":"aa constraint",
}|
```
1. type 区域 `REGION`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层
9. width 线宽
10. prohibitType 禁止类型,可同时存在多个
1. \*禁止布线与放置填充区域(弃用,但解析要做兼容)
2. 禁止元件
3. 禁止过孔
4. \*禁止覆铜与内电层(弃用,但解析要做兼容)
5. 禁止布线
6. 禁止放置填充区域
7. 禁止覆铜
8. 禁止内电层
11. path 请参考复杂多边形章节
1. 对于单次画的多边形,这里只有一个单多边形
2. 对于组合模式画的多边形,这里才有多个单多边形
12. name 名称(可选)
## POUR 覆铜边框
和之前的覆铜有一个实质性的差别在于,支持复杂多边形
也就是说覆铜区域可以含洞,理论上可以实现文字路径转出来的多边形作为覆铜区域
覆铜按照其在格式内出现的顺序覆铜
```json
{ "type": "POUR", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.779,
"netName":"GND",
"layerId":1,
"width":1,
"name":"TOPGND",
"order":4,
"path":["复杂多边形"],
"pourType":["覆铜类型"],
"keepIsland":1,
}|
["POUR", "e100", 5, 1, 0.779, "GND", 1, 1, "TOPGND", 4, 复杂多边形, [覆铜类型], 1]
```
1. type 覆铜 `POUR`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. netName 网络
9. layerId 层
10. width 线宽
11. name 覆铜名称
12. order 覆铜优先级
13. path 请参考复杂多边形章节
14. pourType 请参考覆铜类型
15. keepIsland 是否保留孤岛
#### 覆铜类型
##### SOLID 实心填充
```json
["SOLID", 2]
```
1. 实心填充 `SOLID`
1. 最小覆铜细度(生产优化用,AD 里的 Neck),0 为不开启生产优化
```json
["POUR", "e100", "GND", 1, "BOTGND", 2, 复杂多边形, ["SOLID", 2], 1, 0]
```
```json
["POUR", "e100", "GND", 1, "BOTGND", 2, 复杂多边形, ["SOLID", 0], 1, 0]
```
##### LINE 线填充
```json
["LINE", 0, 0, 10, 20]
```
1. 线填充 `LINE`
1. 填充模式:`0` 网格填充 `1` 水平线填充 `2` 垂直线填充
1. 旋转角度
1. 线宽
1. 线距
```json
["POUR", "e100", "GND", 1, "", 9, 复杂多边形, ["LINE", 0, 0, 10, 20], 0.6, 1, 0, 0]
```
## POURED 覆铜结果
```json
{ "type": "POURED", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"targetId":"e100",
"strokeWidth":0,
"fill":1,
"path":["复杂多边形"],
}|
```
1. type 覆铜结果 `POURED`
2. id 图元编号
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. targetId 所属覆铜边框 `POUR` 编号
6. strokeWidth 描边线宽:0 为不描边
7. fill 是否填充
8. path 路径, 复杂多边形
## IMAGE 图片
`IMAGE` 和 `REGION` 极为类似,但是在操作上,`IMAGE` 不存在控制点,不能自由改变其形态,只能进行整体性的放大、缩小、旋转、翻转、平移等操作
当 `IMAGE` 在信号层时,在 DRC 视角下,为一个无网络的,由 `起始` `结束` `旋转角度` `是否镜像` 定义的矩形区域
```json
{ "type": "IMAGE", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":5.5464,
"layerId":31,
"startX":200,
"startY":200,
"width":400,
"height":400,
"angle":45,
"mirror":1,
"path":["复杂多边形"],
}|
```
1. type 图片 `IMAGE`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层
9. startX 左上 X
10. startY 左上 Y
11. width 宽
12. height 高
13. angle 旋转角度,绕 `起始` 点
14. mirror 原始图片是否水平镜像,镜像以原始图片 BBox 中点进行水平镜像
15. path 多个复杂多边形,请参考复杂多边形章节,这里存储的是原始数据,整个生命周期不需要调整
## TEARDROP 泪滴
泪滴不可选中,不可直接操作,当关联的任意图元发生变化时,EDA 应让其自动消失
```json
{ "type": "TEARDROP", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"netName":"GND",
"layerId":3,
"path":"简单多边形",
"groupId":0,
}|
```
1. type 泪滴 `TEARDROP`
2. id 编号
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. netName 网络
6. layerId 层
7. path 简单多边形
8. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
## FPC_FILL 柔性工艺补强板
```json
{ "type": "FPC_FILL", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":7.7845,
"layerId":3,
"material":"3M468",
"thickness":7.874,
"path":"复杂多边形",
}|
```
1. type 填充 `FPC_FILL`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层
9. material 材质
- PI
- STEEL
- FR4
- 3M468
- 3M9077
- EMI_Shielding_Film
10. thickness 厚度(注意单位和其它图元一致)
11. path 请参考复杂多边形章节
FILE:format/pcb/text.md
# 文字体系
## STRING 文字
当 `STRING` 在信号层时,在 DRC 视角下,为
1. 无网络的
1. `位置` 为 0,0, `旋转角度` 为 0, `是否镜像` 为 0 的 BBox
1. 进行 `位置` `旋转角度` `是否镜像` 变换后的矩形区域
```json
{ "type": "STRING", "id":"UUID", "ticket": 1 }||
{
"partitionId":null,
"groupId":0,
"locked":1,
"zIndex":0.2693,
"layerId":1,
"positionX":300,
"positionY":600,
"text":"我人人有的的和我",
"fontFamily":"宋体",
"fontSize":50,
"strokeWidth":10,
"bold":0,
"italic":0,
"origin":5,
"angle":15,
"reverse":1,
"reverseExpansion":0,
"mirror":1,
"width":100,
"height":200,
"path":["复杂多边形"],
}|
["STRING", "e100", 0, 1, 0.2693, 1, 300, 600, "我人人有的的和我", "宋体", 50, 10, 0, 0, 5, 15, 1, 0, 1]
```
1. type 文字 `STRING`
2. id 图元编号, 文档内唯一
3. ticket 逻辑时钟
4. partitionId 所属分区编号,为 null 表示无分区,封装忽略该字段
5. groupId 分组编号:0 不分组,非 0 为组标志,相同组标志的为一组
6. locked 是否锁定
7. zIndex Z 轴高度
8. layerId 层
9. positionX 位置 X
10. positionY 位置 Y
11. text 内容
12. fontFamily 字体名称
13. fontSize 字号
14. strokeWidth 粗细
15. bold 是否加粗
16. italic 是否斜体
17. origin 对齐模式 `0` 左顶 `1` 中顶 `2` 右顶 `3` 左中 `4` 中中 `5` 右中 `6` 左底 `7` 中底 `8` 右底
18. angle 旋转角度
19. reverse 是否反相扩展
20. expansion 反相扩展尺寸:反相扩展区域的尺寸,支持负数
21. mirror 是否镜像,一般来说,当一个文字出现在底层,这里也需要相应调整成 `1`
22. width 高,没有则为 null
23. height 宽,没有则为 null
24. path 复杂多边形数组,没有则为 null
FILE:format/project/blob.md
# BLOB 真彩图
```json
{ "type": "META", "id": "BLOB-HASH-ID", "ticket": 1 }||{ "filename": "dadas", "data": "data:image/png;base64,asdfasdfwer" }|
```
1. filename 文件名
2. data 预留元数据,二进制数据:使用类似 `Data URLs` 的规范,但有区别
1. 一般格式,与 `Data Urls` 完全兼容 `data:[<mediatype>][;base64],<data>`
- 如 `data:image/png;base64,asdfasdfwer`
- 如 `data:text/html,<html></html>`
- 一般情况下,应尽可能使用一般格式,方便直接使用 Web API 加载,不需要算法转换
2. 扩展格式,扩展了其功能性,加上了如 gzip/deflate 等编码转换功能 `data:<mediatype>[pipeline],<data>`
- 如 `data:text/html;gzip;base64,asdfasdf`
1. 先将 asdfasdf 进行 base64 解码
2. 再用 gzip 解压缩
3. 最后才以 text/html 去加载
- 如 `data:text/css;deflate;aes128;base64,aaaaaaa`
1. 先将 aaaaaaa 进行 base64 解码
2. 再用 aes128 解密(具体加解密逻辑待定)
3. 再用 deflate 解压缩
4. 最后才以 text/css 去加载此数据
```json
{ "type": "META", "id": "ID", "ticket": 1 }||{ "filename": "dadas", "data": "data:application/vnd.ms-excel;base64,xxsasdfawerwerqwer" }|
```
FILE:format/project/common.md
# 公共数据
每个文档都会带上基本信息、创建信息、修改信息,这些信息由工程管理维护
### 基本信息
```json
{ "type": "META", "ticket": 1 }||data
```
1. type "META" 基本信息
2. data 具体数据,每个文档不一样,后续单独描述
### 创建信息
每个文档一样
```json
{ "type": "META_CREATE", "ticket": 1 }||
{
"creator": { "uuid":"UUID", "nickname":"nickname", "username":"username", },
"createTime": 1725593026474,
}|
```
1. type "META_CREATE" 创建信息
2. creator 创建者
3. createTime 创建时间
### 修改信息
```json
{ "type": "META_MODIFY", "ticket": 1 }||
{
"modifier": { "uuid":"UUID", "nickname":"nickname", "username":"username", },
"createTime": 1725593026474,
}|
```
1. type "META_MODIFY" 修改信息
2. modifier 修改者
3. updateTime 更新时间
FILE:format/project/group.md
# 元件分组
## 文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "COMPONENT_GROUP", "uuid": "UUID", "client": "clientID" }|
```
1. type:`DOCHEAD`,文档头标识
2. docType:`COMPONENT_GROUP` 元件分组
3. uuid: 唯一标识,随机 id
4. client:最终一致性的一个终端标识
### META 基本信息
```json
{ "type": "META", "ticket": 1 }||
{
/** 名称 */
"title": string,
/** 子 元件分组的 父 元件分组 uuid */
"parent": string,
/** 属于直接变体的元件分组 不参与 元件分组树构建 */
"belong": string,
/** 元件分组树中排序 */
"zIndex": number,
/** 原理图 */
"schematicId": string,
}|
```
### GROUP_INDEX 元件分组在变体的排序
```json
{ "type": "GROUP_INDEX", "ticket": 1, "id": "variantId" }||
{
"zIndex": 1,
}|
```
1. type:`GROUP_INDEX`
2. ticket: 逻辑时钟
3. id:变体 uuid
4. zIndex:在变体中的排序
### GROUP_DATA 属性数据
```json
{ "type": "GROUP_DATA", "id": "e176@uuid", "ticket": 1 }||data
```
1. type `GROUP_DATA` 属性数据
2. id 组合 id,以`@`分割:
1. 第一个是图元 id
2. 第二个是实例页 id
3. data 属性覆盖,数据签名为 `{ [key: string]: string }| `
```json
{ "type": "GROUP_DATA", "id": "e176@uuid1", "ticket": 1 }||{ "Designator": "U15", "ASDF": "1234" }|
{ "type": "GROUP_DATA", "id": "e177@uuid1", "ticket": 2 }||{ "NUMBER": 2 }|
{ "type": "GROUP_DATA", "id": "e176@uuid2", "ticket": 3 }||{ "Author": "abc" }|
```
FILE:format/project/index.md
# 工程日志格式
该文档仅用来描述属于工程但不属于画布的数据,具体的画布数据请查看单独的描述文档。
## 目录
- [公共数据](/cn/format/project/common.md) - 包含基本信息、创建信息、修改信息等
- [基本信息](/cn/format/project/meta.md) - 包含工程配置、板子、原理图、PCB、面板、符号、封装、器件等元数据
- [BLOB 真彩图](/cn/format/project/blob.md) - 真彩图数据格式
- [实例值属性覆盖](/cn/format/project/instance.md) - 实例值属性覆盖格式
- [变体](/cn/format/project/variant.md) - 变体数据格式
- [元件分组](/cn/format/project/group.md) - 元件分组数据格式
FILE:format/project/instance.md
# 实例值属性覆盖
## 文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "INSTANCE", "uuid": "SCH-UNIQUE-ID_$5|e100_$1|e55_$6|e15_$8", "client": "clientID" }|
```
1. type:`DOCHEAD`,文档头标识
2. docType:`INSTANCE` 实例值属性覆盖
3. uuid:层次编号,工程内唯一,已`_`分割 id
1. 第一个是顶层原理图编号
2. 最后一个只到 Sheet 编号
3. 中间所有的都是使用编号组合语法定位的 `Block Symbol`,如 `$1|e2`,其中 `$1` 为 Sheet 编号,`e2` 为 `Block Symbol` 编号
4. client:最终一致性的一个终端标识
## 属性覆盖
```json
{ "type": "INSTANCE_ATTR", "id": "e176", "ticket": 1 }||data
```
1. type `INSTANCE_ATTR` 实例属性覆盖
2. id 图元编号
3. data 属性覆盖,数据签名为 `{ [parentId: string]: { [key: string]: string }| }|`
```json
{ "type": "DOCHEAD" }||{ "docType": "INSTANCE", "uuid": "SCH-UNIQUE-ID_$5|e100_$1|e55_$6|e15_$8", "client": "clientID" }|
{ "type": "INSTANCE_ATTR", "id": "e176", "ticket": 1 }||{ "Designator": "U15", "ASDF": "1234" }|
{ "type": "INSTANCE_ATTR", "id": "e176e5", "ticket": 1 }||{ "NUMBER": 2 }|
{ "type": "INSTANCE_ATTR", "id": "e178", "ticket": 1 }||{ "Author": "abc" }|
```
FILE:format/project/meta.md
# 基本信息
### 工程配置
存放工程的配置数据,之前是存在后端的工程详情里的
```json
{ "type": "META", "ticket": 1 }||{ "name": "name", "default_sheet": "default_sheet_uuid"}|
```
1. name 工程名称
2. default_sheet 工程的默认图纸
### 板子
```json
{ "type": "META", "ticket": 1 }||{ "title": "title", "sort": 1}|
```
1. title 板子名称
2. sort 排序权重
### 原理图
```json
{ "type": "META", "ticket": 1 }||{ "name": "name", "board":"", "source": "", "version": ""}|
```
1. name 名称
2. board 所属的板子 uuid, 没有则为空
3. source 源文档 uuid
4. version 版本,源文档的更新时间
### 原理图页
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Page Name",
"schematic": "SID",
"description": "描述",
"sort": 0.5,
"source": "",
"version": "",
}|
```
1. name 名称
2. schematic 所属的原理图 uuid
3. description 描述
4. sort 排序权重
5. source 源文档 uuid
6. version 版本,源文档的更新时间
### PCB
```json
{ "type": "META", "ticket": 1 }||
{
"name": "PCB Name",
"board": "boardId",
"description": "描述",
"parentId":"",
"sort": 0.5,
"source": "",
"version": "",
}|
```
1. name 名称
2. board 所属的板子 uuid, 没有则为空
3. description 描述
4. parentId 父 PCB UUID, 没有则为空
5. sort 排序权重
6. source 源文档 uuid
7. version 版本,源文档的更新时间
子 PCB
```json
{ "type": "META", "ticket": 1 }||
{
"name": "子PCB Name",
"board": "",
"description": "描述",
"parentId":"UUID",
"sort": 0.2,
"source": "",
"version": "",
}|
```
### 面板
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Panel Name",
"description": "描述",
"sort": 0.5,
}|
```
1. name 名称
2. description 描述
3. sort 排序权重
### 符号
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Name",
"description": "描述",
"type": 2,
"tags": "tag1",
"source": "",
"version": "",
}|
```
1. name 名称
2. description 描述
3. type 符号类型
4. tags 分类标签
5. source 源文档 uuid
6. version 版本,源文档的更新时间
### 封装
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Name",
"description": "描述",
"type": 4,
"tags": "tag1",
"source": "",
"version": "",
"pcb": "",
}|
```
1. name 名称
2. description 描述
3. type 封装类型
4. tags 分类标签
5. source 源文档 uuid
6. version 版本,源文档的更新时间
7. pcb 所属的 pcb uuid, 默认为空,仅特殊封装有该字段
特殊封装
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Name",
"description": "描述",
"type": 4,
"tags": "tag1",
"source": "",
"version": "",
"pcb": "pcbUuid",
}|
```
### 器件
```json
{ "type": "META", "ticket": 1 }||
{
"name": "Name",
"description": "描述",
"type": 4,
"tags": "tag1",
"source": "",
"version": "",
"attributes": {},
"images": "",
}|
```
1. name 名称
2. description 描述
3. tags 分类标签
4. source 源文档 uuid
5. version 版本,源文档的更新时间
6. attributes 器件属性 Key-Value
7. images 图片链接
FILE:format/project/variant.md
# 变体
## 文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "VARIANT", "uuid": "UUID", "client": "clientID" }|
```
1. type:`DOCHEAD`,文档头标识
2. docType:`VARIANT` 变体数据
3. uuid: 唯一标识,随机 id
4. client:最终一致性的一个终端标识
## META 基本信息
```json
{ "type": "META", "ticket": 1 }||
{
/** 名称 */
"title": string,
/** 描述 */
"description": string,
/** 原理图 */
"schematicId": string,
/** 排序 */
"zIndex": number,
/** 是否有未归组 */
"notGrouped": boolean,
}|
```
FILE:format/schematic/attr.md
# ATTR 属性
ATTR 是一个较为通用的图元,其含义为
1. 表达一个由 键(KEY)——值(VALUE) 组成的的多个属性中的一个
1. 可以在画布上显示,并控制显示哪些内容,以及样式位置等
当隶属编号没有指定时,则默认隶属于当前块级图元上
```json
{ "type": "ATTR", "id": "UUID", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": false, "zIndex": 0.1, "parentId": "UUID", "key":"string", "value":"string", "keyVisible":false, "valueVisible":false, "positionX":200, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
1. type 属性名称:ATTR
2. id 唯一编号
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. parentId 隶属编号:隶属于哪个图元,`""` 表示属于当前块 _默认块是文件_
9. key 属性 Key
10. value 属性 Value
11. keyVisible 是否显示 Key
12. valueVisible 是否显示 Value
13. positionX 位置 X:未显示过的属性位置固定为 `null`
14. positionY 位置 Y:未显示过的属性位置固定为 `null`
15. rotation 旋转角度,绕 `位置` 旋转
16. color 颜色
17. fillColor 背景色
18. fontFamily 字体名称
19. fontSize 字体大小,与坐标等单位相同
20. strikeout 是否加删除线
21. underline 是否加下划线
22. italic 是否斜体
23. fontWeight 是否加粗
24. vAlign 垂直对齐模式:0 顶部对齐 1 中间对齐 2 底部对齐
25. hAlign 水平对齐模式:0 左对齐 1 居中 2 右对齐
当属性 Value 中含有 `~` 字符时,XTools 需要实现从开始到结束,遇到第奇数个 `~` 开始文字带上划线,遇到第偶数个 `~` 结束文字带上划线
FILE:format/schematic/common.md
# 通用格式
## 文档头
```json
{ "type": "DOCHEAD" }||{ "docType": "SCH_PAGE", "uuid": "UUID", "client": "clientID" }|
```
```json
{ "type": "DOCHEAD" }||{ "docType": "SYMBOL", "uuid": "UUID", "client": "clientID" }|
```
- type:"DOCHEAD",文档头标识
- docType:文档类型,"SCH_PAGE":原理图、 "SYMBOL":符号
- uuid:文档唯一编号,工程内唯一
- client:最终一致性的一个终端标识
## 画布配置
编辑器附加信息,用于数据分析等功能,目前已占用的一些字段
```json
{ "type": "CANVAS", "ticket": 1 }||
{
"originX":0,
"originY":0,
}|
```
1. type:"CANVAS",画布配置信息标识
2. ticket 逻辑时钟
3. originX 画布原点 X
4. originY 画布原点 Y
FILE:format/schematic/component.md
# COMPONENT
- `COMPONENT` 引用了 Symbol,Symbol 支持多 PART,所以带了 `子库编号` 属性指示具体哪一个,如果是单 PART 则使用默认值 `""`
- `COMPONENT` 下可绑定许多 `ATTR`,具体的属性行为将由工具定义
### Symbol 类型
| Symbol 类型编号 | Symbol 类型 | 说明 |
| :-------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2 | Part Symbol | 普通器件 |
| 17 | Block Symbol | 层次图符号 |
| 18 | NetFlag Symbol | 全局网络符号 |
| 19 | NetPort Symbol | 层次图网络导出符号 |
| 20 | Sheet Symbol | 专用于提供原理图图纸的重用机制 |
| 21 | NoneElec Symbol | 无电气特性符号 NoneElec 是一类不具有 `PIN` 的无电气特性图元<br>也可以用作特殊的图标,版权声明文字等的重用机制<br>NoneElec 全称 None Electrical,不具有电气特性的意思 |
| 22 | Short Symbol | 短接符 Short Symbol 是一个特殊 Symbol,必须具有两个 `PIN`<br>所有与同一个 `Short Symbol` 的 `PIN` 相连的网络,将在电气特性上对其进行短接<br>比如网络 A 连接到了 PIN1,网络 B 连接到了 PIN2,则表示 A 和 B 是同一个网络 |
### Component 图元
```json
{ "type": "COMPONENT", "id": "UUID", "ticket": 1 }||
{
"partId": "e176",
"groupId": 0,
"positionX": 300,
"positionY": 200,
"rotation": 15,
"isMirror": false,
"data": {},
}|
```
1. type COMPONENT 标识:COMPONENT
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号
5. groupId 分组编号,不能为 0,没有默认为空
6. zIndex Z 轴高度:所有非属性子元素高度分布在 Z0 ~ Z9 范围内,比如 Z 为 23.554,子元素自动分布在 23.5540 ~ 23.5549 范围内
7. positionX 位置 X
8. positionY 位置 Y
9. rotation 旋转角度:绕 `位置` 旋转
10. isMirror 是否镜像
11. data 纯数据属性:附加信息,用于编辑器内部的一些逻辑
Component 所引用的 Symbol 图元一定是按照如下顺序执行的变换
1. 按照 `旋转角度` 绕原点(0,0)逆时针旋转
2. 如果 `是否镜像` 为 `1`,则绕原点(0,0)所在的 Y 轴进行水平镜像
3. 根据 `位置` 进行平移
或者可以理解成如下等价的变换(但是实现更繁琐一些)
1. 根据 `位置` 进行平移
2. 按照 `旋转角度` 绕 `位置` 逆时针旋转
3. 如果 `是否镜像` 为 `1`,则绕 `位置` 所在的 Y 轴进行水平镜像
```json
{ "type": "ATTR", "id": "e187", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Device", "value":"device-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
Device uuid,与 project.json 里 devices 对应的文件名称一致
```json
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Symbol", "value":"symbol-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
`COMPONENT` 内的 `ATTR` 会对模板内同名属性覆盖,覆盖 Symbol 后会影响此器件对符号的绑定
```json
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Footprint", "value":"footprint-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
`COMPONENT` 内的 `ATTR` 会对模板内同名属性覆盖,覆盖 Footprint 后会影响此器件对封装的绑定
```json
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Designator", "value":"U1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
`COMPONENT` 内的 `ATTR` 会对模板内同名属性覆盖
```json
{ "type": "ATTR", "id": "e180", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176e5", "key":"NUMBER", "value":"1", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
`PIN` 属性覆盖的方式关键在 `ATTR` 的 `隶属编号` 上
编号分两部分,例如 `e176e5`,其中 `e176` 为 `COMPONENT` 的编号,`e5` 为在模板内的 `PIN` 编号
FILE:format/schematic/index.md
# SCH 原理图类型文档
本章节详细介绍了嘉立创EDA原理图文件的格式规范。原理图文件主要包含以下几个部分:
- [通用配置](/cn/format/schematic/common.md):文档头和画布配置信息。
- [结构元素](/cn/format/schematic/structure.md):PART 子库和 GROUP 组合。
- [属性](/cn/format/schematic/attr.md):图元属性定义。
- [导线](/cn/format/schematic/wire.md):导线、总线和总线入口。
- [文本](/cn/format/schematic/text.md):文本元素。
- [形状](/cn/format/schematic/shape.md):矩形、多边形、圆形、圆弧、贝塞尔曲线、椭圆。
- [引脚](/cn/format/schematic/pin.md):引脚定义。
- [元件](/cn/format/schematic/component.md):原理图元件实例。
- [对象](/cn/format/schematic/obj.md):二进制对象(图片等)。
- [表格](/cn/format/schematic/table.md):表格和单元格。
FILE:format/schematic/obj.md
# OBJ 二进制内嵌对象
内嵌于图页上的图片和文件等数据,可作为附件下载,以及直接显示(EDA 自行决定,不在格式内要求)
```json
{ "type": "OBJ", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 9.0876,
"fileName": "a.txt",
"startX": 200,
"startY": 300,
"width": 10,
"height": 20,
"rotation": 0,
"isMirror": false,
"content": "data:text/plain;base64,MTIzNA==",
}|
```
1. type 二进制内嵌对象标识:OBJ
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. fileName 文件名
9. startX 左上角 X
10. startY 左上角 Y
11. width 宽
12. height 高
13. rotation 旋转角度:绕`左上角`旋转
14. isMirror 是否镜像
15. content 二进制数据,有两种模式
1. 一般格式,遵循 `Data Urls` 规范 `data:[<mediatype>][;base64],<data>`
- 如 `data:image/png;base64,asdfasdfwer`
- 如 `data:text/html,<html></html>`
2. BLOB 引用模式,`blob:hashid`
FILE:format/schematic/pin.md
# PIN 标号

如图所示
- 所有 PIN 的 `位置 X/Y` 都是离黑色矩形最远的那个端点
- PIN 1 为 0 度旋转方向,引脚样式 0
- PIN 2 为 90 度旋转方向,引脚样式 1
- PIN 3 为 180 度旋转方向,引脚样式 2
- PIN 4 为 270 度旋转方向,引脚样式 3
```json
{ "type": "PIN", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 2.8772,
"display": true,
"electric": 0,
"positionX": 350,
"positionY": 170,
"length": 20,
"rotation": 0,
"color": "#880000",
"pinShape": 3,
}|
```
1. type 图元名称:PIN
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. display 是否显示
9. electric 电气特性:0 UNKNOWN 1 INPUT 2 OUTPUT 3 BI
10. positionX 位置 X
11. positionY 位置 Y
12. length 引脚长度
13. rotation 旋转角度:0 90 180 270
14. color 引脚颜色
15. pinShape 引脚样式:1 Clock 2 DOT,可支持按位或运算,比如 3 = 1 | 2
举例说明:`0` 无附加 `1` Clock `2` DOT `3` Clock & DOT
```json
{ "type": "ATTR", "id": "e184", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e102", "key":"NAME", "value":"VCC", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
PIN 必须具有 NAME 属性
```json
{ "type": "ATTR", "id": "e185", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e102", "key":"NUMBER", "value":"1", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
PIN 必须具有 NUMBER 属性
FILE:format/schematic/shape.md
# 形状图元
## RECT 矩形
矩形由其对角的两个点定义,其旋转是绕`点1`进行的
```json
{ "type": "RECT", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 7.35,
"dotX1": 340,
"dotY1": 210,
"dotX2": 100,
"dotY2": 200,
"radiusX": 40,
"radiusY": 30,
"rotation": 90,
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:RECT
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. dotX1 点 1 X
9. dotY1 点 1 Y
10. dotX2 点 2 X
11. dotY2 点 2 Y
12. radiusX 圆角半径 X:`0` 表示非圆角
13. radiusY 圆角半径 Y:`0` 表示非圆角
14. rotation 旋转角度:绕 `点1` 旋转
15. strokeColor 颜色,null 为默认
16. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
17. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
18. strokeWidth 宽度,null 为默认
19. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
## POLY 多边形
```json
{ "type": "POLY", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 7.35,
"points": [390, 260, 450, 300, 560, 280, 540, 320],
"closed": false,
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:POLY
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. points 点集坐标:X Y X Y X Y ...
9. closed 是否自动闭合:如果自动闭合,则结束点会自动连上起始点
10. strokeColor 颜色,null 为默认
11. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
12. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
13. strokeWidth 宽度,null 为默认
14. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
## CIRCLE 圆
```json
{ "type": "CIRCLE", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 2.332,
"centerX": 430,
"centerY": 200,
"radius": 21,
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:CIRCLE
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. centerX 圆心 X
9. centerY 圆心 Y
10. radius 半径 r
11. strokeColor 颜色,null 为默认
12. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
13. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
14. strokeWidth 宽度,null 为默认
15. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
## ARC 圆弧
```json
{ "type": "ARC", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 0.8689,
"startX": -10,
"startY": 0,
"referX": 0,
"referY": 10,
"endX": 10,
"endY": 0,
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:ARC
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. startX 起始 X
9. startY 起始 Y
10. referX 参考 X
11. referY 参考 Y
12. endX 结束 X
13. endY 结束 Y
14. strokeColor 颜色,null 为默认
15. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
16. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
17. strokeWidth 宽度,null 为默认
18. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
## BEZIER 三阶贝塞尔线条
```json
{ "type": "BEZIER", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 2.1002,
"controls": [10, 10, 30, 20, 100, 30, 50, 70],
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:BEZIER
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. controls 控制点:X1 Y1 X2 Y2 X3 Y3 X4 Y4 ...
9. strokeColor 颜色,null 为默认
10. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
11. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
12. strokeWidth 宽度,null 为默认
13. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
## ELLIPSE 椭圆
```json
{ "type": "ELLIPSE", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 6.23,
"centerX": 670,
"centerY": 325,
"radiusX": 220,
"radiusY": 20,
"rotation": 0,
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:ELLIPSE
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. centerX 中点 cx
9. centerY 中点 cy
10. radiusX 水平半径 rx
11. radiusY 垂直半径 ry
12. rotation 旋转角度 rot
13. strokeColor 颜色,null 为默认
14. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
15. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
16. strokeWidth 宽度,null 为默认
17. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
FILE:format/schematic/structure.md
# 结构图元
## PART 子库
`PART` 只有符号页才有
如果是单 Part 器件也必须有一个 `PART`,子库编号留空 `""`
```json
{ "type": "PART","id":"partId", "ticket": 1 }||{"BBOX": [-10, -20, 10, 20]}|
```
1. type 子库图元:PART
2. id 子库编号
3. ticket 逻辑时钟
4. 内部参数:Key-Value
- 预留 `BBOX` 为能刚好框住 PART 下所有图元的矩形包围盒任意对角的两个点
**XTools 核心逻辑不应关注这个属性**
- 其它为编辑器附加信息,用于数据分析等功能,可选
符号页的所有图元带上对应的子库编号,表示归属于该子库
```json
{ "type": "WIRE", "id": "UUID", "ticket": 1 }||
{
"partId": "partId", // 符号图元都带上该子库id
"groupId": 0,
"locked": false,
"zIndex": 0.235,
"dots": [
[310, 550, 400, 550, 400, 460],
[480, 460, 400, 460],
[400, 330, 400, 460]
],
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
## GROUP 分组控制
```json
{ "type": "GROUP", "id": "UUID", "ticket": 1 }||{ "groupId": "1", "parentId": "0", "title": "Logo" }|
```
1. type 分组控制 `GROUP`
2. id 唯一编号
3. ticket 逻辑时钟
4. groupId 分组编号,不能为 0
5. parentId 父级分组编号,为 0 则表示无父级
6. title 分组名称,无名称为空字符串 `""`
FILE:format/schematic/table.md
# 表格图元
## TABLE 表格
```json
{ "type": "TABLE", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"startX": 30,
"startY": 40,
"rowSizes": [32, 40, 32, 32, 25],
"colSizes": [33, 33, 44, 44, 11],
"rowLocked": [0, 0, 1, 0, 0],
"colLocked": [0, 1, 0, 0, 0],
"rotation": 0,
}|
```
1. type 表格:`TABLE`
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. startX 左上角 X
7. startY 左上角 Y
8. rowSizes 行高
9. colSizes 列宽
10. rowLocked 行锁定
11. colLocked 列锁定
12. rotation 旋转角度
## TABEL_CELL 表格单元格
```json
{ "type": "TABLE", "id": "UUID", "ticket": 1 }||
{
"tableId": "tableId",
"value": "abc\ndef\nghi",
"rowIndex": 2,
"columnIndex": 5,
"rowSpan": 1,
"colSpan": 3,
"topStyle": {
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
},
"rightStyle": {
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
},
"bottomStyle": {
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
},
"leftStyle": {
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
},
"leftStyle": {
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
},
"fontStyle": {
"color": "#fff",
"fillColor": "#fff",
"fontFamily": "宋体",
"fontSize": 12,
"strikeout": false,
"underline": false,
"italic": false,
"fontWeight": false,
"vAlign": 0 ,
"hAlign": 2,
},
"lineHeight": 12,
}|
```
1. type 表格单元格:`TABLE_CELL`
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. tableId 表格编号
5. value 内容
6. rowIndex 行
7. columnIndex 列
8. rowSpan 宽度(占多少列)
9. colSpan 高度(占多少行)
10. topStyle 边框线形样式(上)
11. rightStyle 边框线形样式(右)
12. bottomStyle 边框线形样式(下)
13. leftStyle 边框线形样式(左)
14. fontStyle 字体样式
15. lineHeight 行间距
FILE:format/schematic/text.md
# TEXT 文本
```json
{ "type": "TEXT", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 4.12,
"positionX": 109,
"positionY": 804.5,
"rotation": 0,
"value": "任意字符doukeyi@!@#$",
"color": "#fff",
"fillColor": "#fff",
"fontFamily": "宋体",
"fontSize": 12,
"strikeout": false,
"underline": false,
"italic": false,
"fontWeight": false,
"vAlign": 0 ,
"hAlign": 2,
}|
```
1. type 图元名称:TEXT
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. positionX 文本坐标 X
9. positionY 文本坐标 Y
10. rotation 旋转角度,绕 文本坐标 旋转
11. value 文本内容:任意字符
12. color 颜色
13. fillColor 背景色
14. fontFamily 字体名称
15. fontSize 字体大小,与坐标等单位相同
16. strikeout 是否加删除线
17. underline 是否加下划线
18. italic 是否斜体
19. fontWeight 是否加粗
20. vAlign 垂直对齐模式:0 顶部对齐 1 中间对齐 2 底部对齐
21. hAlign 水平对齐模式:0 左对齐 1 居中 2 右对齐
FILE:format/schematic/wire.md
# 连线图元
## WIRE 导线
```json
{ "type": "WIRE", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 0.235,
"dots": [
[310, 550, 400, 550, 400, 460],
[480, 460, 400, 460],
[400, 330, 400, 460]
],
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:WIRE
2. id 唯一编号
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. dots 坐标:分成多段线,每段都是连续的一组 X1 Y1 X2 Y2 X3 Y3 ... 描述的线
9. strokeColor 颜色,null 为默认
10. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
11. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
12. strokeWidth 宽度,null 为默认
13. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
```json
{ "type": "ATTR", "id": "e200", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e271", "key":"NET", "value":"GND", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
导线必须带上 NET 属性标识网络名称
## BUS 总线
```json
{ "type": "BUS", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 0.235,
"dots": [
[310, 550, 400, 550, 400, 460],
[480, 460, 400, 460],
[400, 330, 400, 460]
],
"strokeColor": null,
"strokeStyle": 0,
"fillColor": "",
"strokeWidth": null,
"fillStyle": 1,
}|
```
1. type 图元名称:BUS
2. id 唯一编号
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. dots 坐标:分成多段线,每段都是连续的一组 X1 Y1 X2 Y2 X3 Y3 ... 描述的线
9. strokeColor 颜色,null 为默认
10. strokeStyle 样式:0 实线 1 短划线 2 点线 3 点划线
11. fillColor 填充颜色:"" 不填充,填充自动闭合起始点和结束点
12. strokeWidth 宽度,null 为默认
13. fillStyle 填充样式:0 无 1 实心 2 网格 3 横线 4 竖线 5 菱形 6 左斜线 7 右斜线
```json
{ "type": "ATTR", "id": "e200", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e271", "key":"NET", "value":"A[1:5]", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|
```
总线必须带上 NET 属性标识网络名称
## BUSENTRY 总线接入标识

- 如图所示
- 浅黄色为 `BUS`
- 绿色圆角菱形,以及其向右延伸的一个类似 `PIN` 的图形,为 `BUSENTRY`
- 蓝色为 `Wire`
- 端点为 `WIRE` 和 `BUSENTRY` 类似 `PIN` 的最右侧端点接触的那个端点的坐标
- 因为 `WIRE` 和 `BUS` 可以是任意角度接入的,所以需要指定其旋转方向以和 `WIRE` 的接入方向一致,例如图内是 180 度
- `BUSENTRY` 固定一格长
- `BUSENTRY` 具体的图形,由 XTools 最终解释,不在格式内限定
```json
{ "type": "BUSENTRY", "id": "UUID", "ticket": 1 }||
{
"partId": "",
"groupId": 0,
"locked": false,
"zIndex": 0.235,
"busGroupId": 4,
"order": 4,
"pointX": 500,
"pointY": 600,
"rotation": 90,
}|
```
1. type 图元名称:BUSENTRY
2. id 编号:文件内唯一
3. ticket 逻辑时钟
4. partId 子库编号,符号页专属,原理图忽略该字段
5. groupId 分组编号,不能为 0,没有默认为空
6. locked 是否锁定
7. zIndex Z 轴高度
8. busGroupId 顺序编号:在隶属的 BUS 里的顺序编号,可重复
比如 BUS 网络为 A[2:3]B[7:6] 可以具有 0 1 2 3 0 1 2 3 ... 一系列顺序编号的 BUSENTRY,其中
0 一定代表分支 A2B7
1 一定代表分支 A2B6
2 一定代表分支 A3B7
3 一定代表分支 A3B6
9. pointX 端点 X
10. pointY 端点 Y
11. rotation 旋转角度:绕 `端点` 旋转
FILE:guide/ancillary-projects/pro-api-sdk.md
<!--@include: @/private/pro-api-sdk/README.en.md{3,}-->
FILE:guide/ancillary-projects/pro-api-types.md
---
next: false
---
<!--@include: @/node_modules/@jlceda/pro-api-types/README.en.md{3,}-->
FILE:guide/ancillary-projects.md
# Ancillary Projects
The current EasyEDA Professional Edition Extension API provides the following helper items that you can use for a more complete development experience:
| Project | Type | Badges | License | Description |
| ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------ |
| [pro-api-sdk](./ancillary-projects/pro-api-sdk) | Git Repo | <a href="https://github.com/easyeda/pro-api-sdk" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/stars/easyeda/pro-api-sdk" alt="GitHub Repo Stars" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> <a href="https://github.com/easyeda/pro-api-sdk/issues" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/issues/easyeda/pro-api-sdk" alt="GitHub Issues" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | <a href="https://choosealicense.com/licenses/apache-2.0/" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/license/easyeda/pro-api-sdk" alt="GitHub License" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | Extension Development SDK |
| [pro-api-types](./ancillary-projects/pro-api-types) | npm Package | <a href="https://www.npmjs.com/package/@jlceda/pro-api-types" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/npm/v/%40jlceda%2Fpro-api-types" alt="NPM Version" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | <a href="https://choosealicense.com/licenses/apache-2.0/" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/npm/l/%40jlceda%2Fpro-api-types" alt="NPM License" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | Extension API Type Definitions |
| [eext-run-api-gateway](https://ext.lceda.cn/item/oshwhub/run-api-gateway) | EasyEDA Extension | <a href="https://github.com/easyeda/eext-run-api-gateway" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/stars/easyeda/eext-run-api-gateway" alt="GitHub Repo Stars" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> <a href="https://github.com/easyeda/eext-run-api-gateway/issues" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/issues/easyeda/eext-run-api-gateway" alt="GitHub Issues" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | <a href="https://choosealicense.com/licenses/apache-2.0/" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/license/easyeda/eext-run-api-gateway" alt="GitHub License" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | EDA \<-\> AI Gateway Extension |
| [easyeda-api-skill](https://clawhub.ai/yanranxiaoxi/easyeda-api) | AI Skill | <a href="https://github.com/easyeda/easyeda-api-skill" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/stars/easyeda/easyeda-api-skill" alt="GitHub Repo Stars" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> <a href="https://github.com/easyeda/easyeda-api-skill/issues" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/issues/easyeda/easyeda-api-skill" alt="GitHub Issues" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | <a href="https://github.com/aws/mit-0" style="vertical-align: inherit;" target="_blank"><img src="https://img.shields.io/github/license/easyeda/easyeda-api-skill" alt="GitHub License" class="not-medium-zoom-image" style="display: inline; vertical-align: inherit;" /></a> | Extension API AI Skill |
FILE:guide/error-handling.md
# Error Handling
## Disable Extensions and Scripting Systems Globally
When you encounter an exception caused by an extension that prevents you from removing the extension through the normal route (such as corrupted or masked data in the top menu bar, or an uninstall returning an error), you can globally disable the extension and the scripting system by adding the `safetyMode=true` parameter within the URL of the EasyEDA Professional editor:
```diff
- https://pro.easyeda.com/editor
+ https://pro.easyeda.com/editor?safetyMode=true
```
::: tip
If you wish to enter debug mode at the same time, you can add the `cll=debug` parameter again:
```diff
- https://pro.easyeda.com/editor?safetyMode=true
+ https://pro.easyeda.com/editor?safetyMode=true&cll=debug
```
:::
## Remove All Extensions Globally
::: danger
**DANGEROUS!** All your installed extensions and standalone scripts will be removed and cannot be recovered. This method should only be used if a serious error is confirmed to be caused by an extension and cannot be resolved by conventional means.
:::
::: details Thanos mode switch
```diff
- https://pro.easyeda.com/editor
+ https://pro.easyeda.com/editor?DANGEROUS_OPERATION_DeleteExtensionStorage=true
```
:::
FILE:guide/extension-json.md
# Extension Configuration File
In order to define the properties of an extension and the various functions that an extension can invoke, each extension should have an extension configuration file named `extension.json` in the root directory with the following default contents:
<<< @/private/pro-api-sdk/extension.json{json}
## name <Badge type="tip" text="string" />
Extension name. It can only contain lowercase English characters `a-z`, numbers `0-9`, and underscores `-`, and is `5-30` characters long.
## uuid <Badge type="tip" text="string" />
UUID. A unique ID for the extension that can contain only lowercase English characters `a-z`, numbers `0-9`, and is `32` characters long.
## displayName <Badge type="tip" text="string" />
Display name.
## description <Badge type="tip" text="string" />
Description.
## version <Badge type="tip" text="string" />
Version number. The format is `major.minor.patch`.
## publisher <Badge type="tip" text="string" />
Developer Information.
## engines <Badge type="tip" text="Object" /> <Badge type="warning" text="feature" />
The engine to which the extension applies.
### engines.eda <Badge type="tip" text="string" /> <Badge type="warning" text="feature" />
Extended adapted version of EasyEDA Professional (online).
## license <Badge type="tip" text="string" />
Open-source licensing terms. It is recommended to go to [Choose a License](https://choosealicense.com/) to select the appropriate open source license for your project.
## repository <Badge type="tip" text="Object" /> <Badge type="warning" text="feature" /> <Badge type="info" text="in working" />
Repository information for the source code of the extension.
### repository.type <Badge type="tip" text="string" /> <Badge type="warning" text="feature" /> <Badge type="info" text="in working" />
The type of source code repository. Optional values are `extension-store` `git` `mercurial` `svn` `ftp` `github` `gitlab` `gitlab-selfhosted` `gitee` `gitea` `bitbucket` `coding` `gnu-savannah` ` gitbucket` `gogs`.
### repository.url <Badge type="tip" text="string" /> <Badge type="warning" text="feature" /> <Badge type="info" text="in working" />
Source code repository URL.
## categories <Badge type="tip" text="string | Array<string>" />
The extension's classification. Optional values are `Schematic` `Symbol` `PCB` `Footprint` `Panel` `Library` `Project` `Other`.
## keywords <Badge type="tip" text="Array<string>" />
Keywords.
## images <Badge type="tip" text="Object" />
Images.
### images.logo <Badge type="tip" text="string" />
Logo. Size `1:1`, PNG/JPEG format. Logos can be drawn using an AI generation tool such as [AutoDraw](https://www.autodraw.com/) and a minimum size of `500×500` is recommended.
### images.banner <Badge type="tip" text="string" /> <Badge type="warning" text="feature" />
Banner. Size `64:27`, for presentation of extension's store page, JPEG format.
## homepage <Badge type="tip" text="string" />
Project homepage.
## bugs <Badge type="tip" text="string" />
Vulnerability feedback channel. Please fill in a correct URI.
## activationEvents <Badge type="tip" text="Object" /> <Badge type="warning" text="feature" /> <Badge type="info" text="in working" />
Extension's activation event.
## entry <Badge type="tip" text="string" />
Entry file. No modification is recommended, it is correctly defined within the SDK.
## dependentExtensions <Badge type="tip" text="Object" /> <Badge type="warning" text="feature" /> <Badge type="info" text="in working" />
Dependencies on other extensions. Supports the use of 32-bit UUIDs of extensions in the Extension Store (automatic pulling supported), or user-defined extension names (manual upload required).
## headerMenus <Badge type="tip" text="Object" />
The header menu registered when the extension is initialized.
The header menu is currently supported to be configured separately according to the following pages:
```json
{
"headerMenus": {
"home": [], // [!code focus:9]
"blank": [],
"sch": [],
"symbol": [],
"pcb": [],
"footprint": [],
"pcbView": [],
"panel": [],
"panelView": []
}
}
```
### headerMenus[].id <Badge type="tip" text="string" />
Menu item ID. must be unique.
### headerMenus[].title <Badge type="tip" text="string" />
Menu item title.
### headerMenus[].menuItems <Badge type="tip" text="Object" />
Menu item subitems. Up to two levels of subitems can be nested.
`menuItems` conflicts with `registerFn`, only one of them is allowed to exist in the same level.
### headerMenus[].registerFn <Badge type="tip" text="string" />
Menu associated registered method. The method here is associated with a method exported within the code of this extension, you need to export the specified method as an `ES Module` using `export` and fill in its method name here.
`registerFn` conflicts with `menuItems`, only one of them is allowed to exist in the same level.
FILE:guide/extensions-marketplace.md
# Extensions Marketplace
EasyEDA Extensions Marketplace is under developing, you can refer China site [https://ext.lceda.cn](https://ext.lceda.cn),, which is a professional platform for users to download and share extensions.
If you want to learn how to develop extensions, please refer to the [how-to-start](./how-to-start), which describes in detail how to install the development environment and build your own EasyEDA Pro extension from scratch.
## Publishing Your Extension
When you have fully verified the functionality of the extension you have developed and wish to share it with other users, please visit the [EasyEDA Extensions Marketplace](https://ext.easyeda.com/) and click the **Extension Management** button in the upper right corner:

Enter the extension management page, which supports uploading, publishing and versioning of extensions.
Click the **Extension Upload** button to upload your first extension that meets the following requirements:
1. The extension `extension.json` should contain the following attributes: `name`, `uuid`, `displayName`, `description`, `version`, and `license`;
2. select and fill in at least one or more of the required extension types (`categories`);
3. the extension must provide a custom icon and must not use the default `logo` provided in the SDK, the recommended icon size ratio is `1:1`, the format must be PNG or JPEG, the content must be clear without risk of infringement, and the file size must not exceed `5 MiB`;
4. make sure that the entry file (`entry`) of the extension exists and is valid;
5. the value of the `name` attribute must not be duplicated across extensions with different `uuid`;
6. include a detailed description of the extension's functionality and usage in the `README.md` file;
7. if necessary, keep an change log for the extension in the `CHANGELOG.md` file;
8. the extension **DOESN'T** contain private information, such as your phone numbers.
Select your compiled `.eext` file in the upload pop-up window and upload it. The first uploaded extension will automatically create a namespace into which all subsequent uploads of the extension (identified by `uuid`) will be grouped.
You can view the extension's name, description, version, install count, updated time, and other information on the namespace cover:

After the extension is uploaded, it will automatically enter the review process. After approval, it will be listed in the marketplace:

After waiting for the review to complete, the review status will change to **Passed**. If there is a case that the review is not passed, please check the reason in the message notification in time and check the non-compliant content in the extension:

After approval, other users will be able to view your extension details and download the uploaded version:

You can view the extension's detail page, where the `README.md` and `CHANGELOG.md` contents of the extension file will be displayed:

All published versions of the extension are listed in the history:

You can leave ratings and reviews of the extension in the comments section:

You can also downgrade the namespace of an extension at any time on the extension management page. This does not affect the status of uploaded versions, and you can also individually unpublish a specific version in the versioning management.
FILE:guide/how-to-start.md
# How to Get Started <Badge type="tip" text="Intro" />
In the EasyEDA Professional extension engine, all extensions are independent JavaScript scripts running under their own scope chains.
Each extension requires a UUID as the uniquely identifiable name of the extension, and this UUID exists in two cases:
1. the extension has been included and referenced from the EasyEDA Pro Extension Store, or the extension developer has requested a UUID for the extension and filled in the `uuid` field in `extension.json`, in this case, the UUID is an auto-generated 32-bit string, and you can find it on the Extension Store page for the extension;
2. if the extension is not included and does not fill in the `uuid` field, then the UUID is the `name` field defined by the extension developer in `extension.json`, please be careful about using this field as the name of the extension's interdependent references as it is always variable and may be renamed.
::: info
If you are using [pro-api-sdk](./ancillary-projects/pro-api-sdk), a new UUID will be automatically generated for you the first time you run `npm run build`.
If you wish to build the full development environment manually, you can also safely use <code id="generatedUuid"></code> as the UUID for the new extension, which is randomly generated when you visit the current page.
:::
All user extensions run locally on the client, which means you can write them in JavaScript according to the [ECMAScript Next](https://262.ecma-international.org/) specification, but note that in the main thread, there are limitations on accessing the DOM, external requests, local file system, and other browser APIs. However, it should be noted that in the main thread, calls to the DOM, external requests, local filesystem, and other browser APIs will be limited, and we will provide predefined interfaces in the extension APIs to address the need for this type of access.
::: tip
EasyEDA offers a wide range of extension examples, allowing users to view the source code and compile it for use:
Extensions source code: [https://github.com/easyeda](https://github.com/easyeda)
Extensions marketplace (China Site, the global site is under developing): [https://ext.lceda.cn/](https://ext.lceda.cn/)
:::
## Development Environment (Computer)
In order to facilitate the environment configuration, we provide [pro-api-sdk](https://gitee.com/jlceda/pro-api-sdk), and we recommend all developers to use this SDK for development, and this document will be based on this SDK to explain. You can get and configure the SDK environment in the following ways:
### I. Install Visual Studio Code
Visual Studio Code is the most recommended IDE for novice developers, hereafter referred to as **VSCode**, and you can download it from its [official website](https://code.visualstudio.com/#alt-downloads).
If you don't understand the difference between the versions, please download the version indicated in the figure below (Windows System Installer x64):

### II. Install Git
Git is the recommended tool for pulling SDKs, and you can download it from its [official website](https://git-scm.com/download).
On the right side of the official download page, click `Download for Windows`:

### III. Install Node.js
Node.js is the runtime software necessary to build TypeScript natively, and you can download it from its [official website](https://nodejs.org/en/download/prebuilt-installer).
The official download page is a guided interactive page, so if you don't need it, just follow the instructions below:
I want `Current` version of Node.js for `Windows` running `x64`
Then click the `Download Node.js` button to download the Node.js installer.
::: warning
If you wish to use a customized version of Node.js, make sure it is no lower than `20.5.0`, which is the minimum version required for this project.
:::
::: tip
You can check the version of Node.js you have installed by typing `node -v` in the console, if the version is lower than `20.5.0`, follow the steps above to install Node.js.
:::
### IV. Pulling SDK Repository Locally
1. Before you start pulling, you need to first create a subfolder on your local disc where you will keep all your development materials. For example, you can create a subfolder named `easyeda-extension` under the `D:` disc.
::: warning
Please try not to include `spaces` `non-ASCII characters` in the path to avoid surprises in subsequent operations.
:::
2. Once created, open the Windows PowerShell tool (right-click on the `Windows Logo Key` and select the `Windows PowerShell (Administrator)` option).
3. Navigate within Windows PowerShell to the folder you just created, in this case the `D:\easyeda-extension` folder, and execute `cd "D:\easyeda-extension"`:

::: tip
The double quotes `""` here cannot be omitted when the path contains `spaces`.
:::
4. Depending on your network environment, execute one of the following commands:
```shell
git clone --depth=1 https://github.com/easyeda/pro-api-sdk.git
```
### V. Get VS Code Extension
1. First you need to start VS Code and open the folder of the project you pulled in the previous stage inside it (e.g. `D:\easyeda-extension\pro-api-sdk`).

2. Then switch to the Extensions page (shortcut <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>X</kbd>) and search for and install the following apps in the search box at the top:
1. `Code Spell Checker` by Street Side Software
2. `ESLint` by Microsoft
3. `EditorConfig for VS Code` by EditorConfig

3. All extensions are pre-configured within the SDK and saved in their corresponding configuration files, and you don't need to do any additional configuration on them unless you understand what you're doing.
## Build the First EasyEDA Professional Extension
### I. List of Files
The SDK comes pre-configured with all the necessary components of the development environment, so you can refer to the following list of files to see what each one does:
```
├───.husky Auto Script Directory
├───.vscode VS Code Configuration File Directory
│ ├───extensions.json Recommended Extensions
│ └───settings.json Extension Configuration
├───build Extension Pack Compilation Directory
│ ├───dist Extension Pack Compilation Result Directory
│ └───packaged.ts Compile Scripts
├───config ESBuild Configuration Directory
├───dist Compilation Results Directory
├───iframe IFrame Inline Frame Directory
├───images Extension Preview Image Directory
│ ├───banner.png Extension Banner Image
│ └───logo.png Extension Logo Image
├───locales Extended Multilingual Directory
│ ├───en.json English Language Translation File
│ └───zh-Hans.json Simplified Chinese Language Translation File
├───node_modules NPM Dependency Module Directory
├───src Extension's Main Source Code Directory
├───.edaignore EDA Ignore File Configuration
├───.editorconfig Editor Base Format Configuration
├───.eslintrc.js ESLint Automatic Code Constraint Configuration
├───.gitattributes Git Attribute Configuration
├───.gitignore Git Ignores File Configuration
├───.prettierignore Prettier Ignores File Configuration
├───.prettierrc.js Prettier Auto Format Configuration
├───LICENSE Open Source License
├───README.md Project Introduction
├───extension.json EasyEDA Professional Extension Configuration
├───package.json NPM Package Configuration
├───package-lock.json NPM Package Dependency Locking Configuration
└───tsconfig.json TypeScript Compilation Configuration
```
### II. Extension Configuration
EasyEDA Professional has a custom configuration file, i.e. `extension.json` file in the root directory of the SDK, the contents of which will be fully read by EasyEDA Professional and will be shown in the display and running process of the extension package, the following is the default contents of this file:
<<< @/private/pro-api-sdk/extension.json{2,4-5,7,11 json}
Now, we only need to change a few of the key values:
| Property | Type | Example | Description |
| ----------- | -------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| name | `string` | `run-api-gateway` | Extension name. It can only contain lowercase English letters `a-z`, digits `0-9`, and hyphens `-`, and must be `5-30` characters long. |
| displayName | `string` | `Run API Gateway` | Display name. It can be in Chinese. |
| description | `string` | `Provides WebSocket gateway bridging for AI coding tools` | Description. |
| publisher | `string` | `JLCEDA` | Developer information. |
| license | `string` | `Apache-2.0` | Open-source licensing terms. It is recommended to go to [Choose a License](https://choosealicense.com/) to select the appropriate open source license for your project. |
### III. Initialization Environment
Initializing the environment and starting the build are very simple single commands, in order to execute these commands you first need to start a VS Code terminal:

The terminal will appear below by default, and you can execute all the next commands from within the terminal. Now, we need to initialize the environment for the SDK project, including installing all the dependent libraries, initializing the runtime hooks, and more things that can be automated, and you'll need to execute the following commands from within the terminal:
```shell
npm install
```
::: tip
If you encounter an error like this:
```
File C:\example.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
```
You need to run the following command in PowerShell with administrator privileges:
```powershell
Set-ExecutionPolicy RemoteSigned
```
This changes the execution policy to allow script execution. It is required to run NPM via Node.js on the device, but be aware that changing the execution policy may affect the security of the system.
If you are developing within an organization, you may need to consult your IT department, because the organization may have its own security policies.
:::
### IV. Modify the Code File
In the default environment provided by the SDK, your entry code file is `/src/index.ts`.
If the file has the same suffix, we highly recommend and support writing EasyEDA Pro extensions in TypeScript by default, relying on the type system provided by TypeScript and our [pro-api-types](https://www.npmjs.com/package/@jlceda/pro-api-types) type definition file, you can easily get complete support for type inference and syntax hints.
::: info
If you still want to code in native JavaScript, you can rename `/src/index.ts` to `/src/index.js` and remove anything inside that doesn't conform to JavaScript syntax.
:::
### V. Build
After each code change, you should perform a build to get the latest extension package, and you may need to change the version number within the `extension.json` file before doing the build:
| Property | Type | Description |
| -------- | -------- | ------------------------------------------------ |
| version | `string` | Semantic version number in `major.minor.patch` format |
Then, execute the following command in the terminal to build the extension package:
```shell
npm run build
```
The extension packages you build will be generated in the `/build/dist/` directory.
::: tip
The build will read the `.edaignore` file in the root directory, which controls what will be excluded from the package at build time, and has the same syntax as `.gitignore`.
:::
## Import Extensions to EasyEDA Pro
The import operation currently has a different location:
### EasyEDA Pro V2
**Top Menu Bar** -\> **Settings** -\> **Extensions** -\> **Extension Manager...** -\> **Import Extensions**

Import the `.eext` file you generated in the `/build/dist/` directory during the last build.
### EasyEDA Pro V3
**Top Menu Bar** -\> **Advanced** -\> **Extension Manager...** -\> **Import**

Import the `.eext` file you generated in the `/build/dist/` directory during the last build.
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
document.getElementById('generatedUuid').innerHTML = crypto.randomUUID().replaceAll('-', '');
})
</script>
FILE:guide/i18n.md
# Multi-language Support
## Multi-language Configuration
The extension supports multi-language configuration, you can create a `<IANA Language Tags>.json` file in the `./locales/` folder, you can create a `<IANA language tag>.json` file, which will be automatically associated with the corresponding language and called when appropriate.
::: code-group
```json [zh-Hans.json]
{
"Enter": "确定",
"Cancel": "取消"
}
```
```json [en.json]
{
"Enter": "Enter",
"Cancel": "Cancel"
}
```
:::
If you need to get all the language labels supported by the current extension, you can call the [SYS_I18n.getAllSupportedLanguages()](../reference/pro-api.sys_i18n.getallsupportedlanguages) method, which will return an array of strings.
::: warning
Note that if your extension has two or more languages, it must include at least one of `en` or `zh-Hans` as a fallback language, otherwise you may encounter unexpected display errors.
:::
## Use of Multiple Languages within the Code
To use a multilingual system to display different text in different language environments, use the [SYS_I18n.text()](../reference/pro-api.sys_i18n.text) method.
[SYS_I18n.text()](../reference/pro-api.sys_i18n.text) method has a mandatory argument `tag`, which corresponds to the key name in the multilingual file, and the key value matched by that key name is the final displayed text.
You can specify the `namespace` parameter as the `uuid` of other extensions to call the multilingual configuration of other extensions.
Currently, EasyEDA Professional only supports a few languages by default, while the extension API supports a lot of additional languages, you can use the `language` parameter to adapt more languages for your extension, but you need to design your own logic and method to switch languages.
When translating a language, it is very likely that we will encounter a situation where we need to embed parameters into the text, because the syntax of each language is different and the position of the parameters in the text of the language may vary greatly, you can use a placeholder in the `1` format to indicate the parameters that need to be embedded and pass the parameters into the `arg` of the [SYS_I18n.text()](../reference/pro-api.sys_i18n.text) method within `arg`, so that when the specified text is displayed, the corresponding argument will be embedded in the text at the specified location.
::: tip
Language priority: current display language > system default language > the first language in the dataset that contains the text tag > text label (tag)
In addition to the above steps, you may need to know other [SYS_I18n](../reference/pro-api.sys_i18n) APIs to work more freely with multilingual content.
:::
## Translating Fields in extension.json
If you need to translate fields in `extension.json`, create a `<IANA language tag>.json` file in the `./locales/extensionJson/` folder.
Within that file, each `key` must be a `value` from `extension.json`, and each `value` in the translation file is the translated result.
FILE:guide/index.md
# What is Extension API?
EasyEDA Professional Extension API (hereinafter referred to as "Extension API") is a set of JS API interfaces built on the front-end, which is used to develop various custom functions of EasyEDA Professional Editor. In short, the Extension API uses the basic syntax of JavaScript to write source code that highly encapsulates many EasyEDA Pro features and algorithms, together with a comprehensive [SDK](./ancillary-projects/pro-api-sdk), [type constraints](./ancillary-projects/pro-api-types), the development of custom extensions can be completed with very little effort, effectively reducing the mental burden on developers and designers.
Next, you can go to the [How to Get Started](./how-to-start) section to learn how to install the environment from scratch and build your own EasyEDA Pro Edition extension.
If you are an extension user, see the [Getting and Using Extensions](../user-guide/using-extension) section.
FILE:guide/inline-frame.md
# Inline Frame Support
In some application scenarios where extensions want to have fully customized windows that are not limited to the popups and controls provided by EasyEDA, we provide a way to build windows using inline frames.
To use inline frames, you need to save all files in the extension's `/iframe/` directory and use [SYS_IFrame.openIFrame()](../reference/pro-api.sys_iframe.openiframe) method to load the specified `html` file as the content of the inline frame.
```typescript
// This example loads the index.html file in the /iframe/ directory with a window of 500px in height and width
eda.sys_IFrame.openIFrame('/iframe/index.html', 500, 500);
```
::: tip
Files can be loaded and indexed without being stored in the `/iframe/` directory, but it is recommended that the `/iframe/` directory be used as the storage directory for inline frame files for a more intuitive organization of the files.
The URI referred to by the `htmlFileName` parameter starts at the root path of the extension package, you can use `/` or start directly with the `iframe/` folder name.
:::
The extension API will automatically read the specified `html` file and other files associated with it, but will not continue to recursively parse it, due to the limitations of our secure resource access rules.
To open multiple IFrame windows within a single extension, specify an ID for each IFrame.
FILE:guide/invoke-apis.md
# Invoking the Extension API
## Invoke Method
There are many classes under the EasyEDA Pro Extension API module, all **Classes**, **Enumerations**, **Interfaces**, **Type Aliases** are registered under the `EDA` base class by default and have been instantiated as [eda](../reference/pro-api.eda) object exists in the root scope of every extension runtime, and you can access it directly through the `eda` object.
All extension's runtime get a separate `eda` object, which is not shared with other extensions. You can output this object on the console in [Debug Mode](#Entering%20Debug%20Mode) within an extension (or in [Standalone Script](#Debug%20with%20Standalone%20Scripting)) using the following code:
```javascript
console.log('[DEBUG] eda:', eda);
```
Standard extension API calls require the splice **eda** + **class instance object name** + **method name / variable name**. The object names corresponding to classes instantiated in the system are in the form of the first three letters of the underscore in lowercase, for example:
| Class Name | Class Instance Object Name |
| ---------------- | -------------------------- |
| SYS_I18n | sys_I18n |
| SYS_ToastMessage | sys_ToastMessage |
The following example calls the `text` method under the `SYS_I18n` class and the `showMessage` method under the `SYS_ToastMessage` class:
```typescript {2}
// Note that the `sys` in `sys_I18n` is lowercase because we need to use the object name when calling the
eda.sys_ToastMessage.showMessage(eda.sys_I18n.text('Done'), ESYS_ToastMessageType.INFO);
const t = eda.sys_I18n.text; // Assign `eda.sys_I18n.text` method to `t`
eda.sys_ToastMessage.showMessage(t('Done'), ESYS_ToastMessageType.INFO); // This will give you exactly the same result as line 2
```
## Commissioning Methods
### Entering Debug Mode
You can add the `cll=debug` parameter within the URL of the EasyEDA Pro editor to enter debug mode:
```diff
- https://pro.easyeda.com/editor
+ https://pro.easyeda.com/editor?cll=debug
```
Then press <kbd>F12</kbd> three times in quick succession to open the developer tools. Switch to the Console tab to output debugging information.
::: tip
If you are using the desktop client, you can press <kbd>F12</kbd> three times in quick succession to open the developer tools, then enter the following in the console:
```javascript
window.location.href = 'https://client/editor?cll=debug';
```
Then you can enter debug mode.
:::
### Debugging with Standalone Scripting
When using the extension API interface, you need to compile the changes first and upload the compiled result to EasyEDA before you can see the result. If you have some logic that you want to split out for debugging, you can try using the standalone script feature.
**V2 Debugging:**
Entry: **Top Menu** -\> **Settings** -\> **Extensions** -\> **Standalone Script**

**V3 Debugging:**
Entry: **Top Menu** -\> **Advanced** -\> **Run Script**

You can use Script Manager to save standalone scripts and run them quickly:

Standalone scripts get a unique, throw-away `eda` object each time they run, so you don't have to worry about contaminating the runtime environment with the results of previous runs. Note, however, that some of the extension API interfaces, such as `SYS_IFrame`, cannot be called from within a standalone script because they use features from extension packages or external interactions.
The standalone script's save feature stores data in the browser's [LocalStorage](https://developer.mozilla.org/docs/Web/API/Window/localStorage) or [IndexedDB](https://developer.mozilla.org/docs/Web/API/IndexedDB_API), which is generally sustainable locally, but please note that this is always insecure, so please backup your own standalone scripts.
FILE:guide/stability.md
# Interface Stabilization
Our priority in maintaining the extension API is efficient abstraction and interface stability. It's important for users that extensions don't fail to work on a regular basis, and this is especially true and important considering that EasyEDA is currently a rapidly evolving product.
On the other hand, we also want to strike the right balance between delivering new features quickly and maintaining backward compatibility, and here's how we intend to do that.
## API Version Control
Changes to the extension API will be identified as `major.minor.patch`. `major` indicates a major version, `minor` indicates a minor version, and `patch` indicates a fix.
### Major Version
::: info
The EasyEDA Professional Edition Extension API has its own release version number, which is not equivalent to the EasyEDA version number. In general, major updates to the Extension API will follow the major or minor releases of EasyEDA.
:::
Changes to existing APIs that will be made available as major releases may have a noticeable impact on extensions and require the authors of extensions that utilize those APIs to update their code.
This includes changes to the API itself (e.g., removing deprecated methods) or changes to API behavior.
Extensions are not automatically upgraded to these versions, and in order to keep existing extensions working, the EasyEDA Professional API development team is committed to extending the lifecycle of deprecated methods as long as possible.
### Minor Version
New API interfaces and bug fixes will be provided as minor releases, and these new APIs will automatically be available to extensions as soon as they are run in the latest version of EasyEDA.
If there are bugs in the API, we may, at our discretion, release bug fixes as a minor update, depending on whether we feel that certain extensions may break as a result of fixing the bugs. While any change in API behavior could theoretically make extensions work improperly, it would incur a lot of unnecessary additional overhead for extension authors and us to treat every bug fix as a major change.
### Patch
We release a fix update when we fix an urgent new issue, make a minimal change to the API, or even just change the content of the documentation.
We may change the API's TypeScript type definition in the form of a break in the fix update. In the TypeScript world, Type and Script are two different things. As such, changes to Type do not affect existing code or cause breaks in released extensions, and having types that accurately represent the latest state of the API is more important than having perfect backward compatibility because types are easy to update. Typically, type changes only involve renaming certain types.
## APIs for the Development Phase
Development-stage APIs are APIs that are only available when the extension is set to a development version, which allows extension developers to try out new APIs and provide feedback to the EasyEDA Professional Extension API development team on whether the APIs are meeting usage requirements and/or working in any unexpected ways. APIs in development will be prominently identified within the documentation.
FILE:package-lock.json
{
"name": "easyeda-api-skill",
"version": "1.1.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "easyeda-api-skill",
"version": "1.1.3",
"dependencies": {
"ws": "^8.18.0"
},
"devDependencies": {
"@types/ws": "^8.5.13"
}
},
"node_modules/@types/node": {
"version": "25.5.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~7.18.0"
}
},
"node_modules/@types/ws": {
"version": "8.18.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
"integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/undici-types": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"dev": true,
"license": "MIT"
},
"node_modules/ws": {
"version": "8.19.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
}
}
}
FILE:package.json
{
"name": "easyeda-api",
"version": "1.1.3",
"description": "EasyEDA Pro API Skill — WebSocket bridge & API reference",
"type": "module",
"scripts": {
"server": "node scripts/bridge-server.mjs"
},
"dependencies": {
"ws": "^8.18.0"
}
}
FILE:references/_index.md
# EasyEDA Pro API 文档索引
> 此文档由构建脚本自动生成,供 AI 编程工具使用。
> 全局变量 `eda` 是 EDA 类的实例,所有 API 通过 `eda.xxx` 调用。
## 快速导航
- [classes/](classes/) - 类文档(包含全部方法和属性)
- [enums/](enums/) - 枚举文档
- [interfaces/](interfaces/) - 接口文档(包含全部属性)
- [types/](types/) - 类型别名文档
## API 访问方式
所有 API 通过全局变量 `eda` 访问,例如:
- `eda.dmt_Board.createBoard()` — 文档树 / 板子管理
- `eda.pcb_PrimitiveLine.create()` — PCB 直线图元创建
- `eda.sys_WebSocket.register()` — WebSocket 连接注册
- `eda.sch_PrimitiveComponent.create()` — 原理图器件创建
---
# 类 (Classes)
| 类名 | 描述 | 备注 |
|------|------|------|
| [DMT_Board](classes/DMT_Board.md) | 文档树 / 板子管理类 | |
| [DMT_EditorControl](classes/DMT_EditorControl.md) | 文档树 / 编辑器控制类 | |
| [DMT_Folder](classes/DMT_Folder.md) | 文档树 / 文件夹类 | |
| [DMT_Panel](classes/DMT_Panel.md) | 文档树 / 面板管理类 | |
| [DMT_Pcb](classes/DMT_Pcb.md) | 文档树 / PCB 管理类 | |
| [DMT_Project](classes/DMT_Project.md) | 文档树 / 工程管理类 | |
| [DMT_Schematic](classes/DMT_Schematic.md) | 文档树 / 原理图管理类 | |
| [DMT_SelectControl](classes/DMT_SelectControl.md) | 文档树 / 选择控制类 | |
| [DMT_Team](classes/DMT_Team.md) | 文档树 / 团队类 | |
| [DMT_Workspace](classes/DMT_Workspace.md) | 文档树 / 工作区类 | |
| [EDA](classes/EDA.md) | 嘉立创 EDA 专业版用户 API 接口 | |
| [IPCB_ComplexPolygon](classes/IPCB_ComplexPolygon.md) | 复杂多边形 | |
| [IPCB_Polygon](classes/IPCB_Polygon.md) | 单多边形 | |
| [IPCB_PrimitiveArc](classes/IPCB_PrimitiveArc.md) | 圆弧线图元 | |
| [IPCB_PrimitiveAttribute](classes/IPCB_PrimitiveAttribute.md) | 属性图元 | |
| [IPCB_PrimitiveComponent](classes/IPCB_PrimitiveComponent.md) | 器件图元 | |
| [IPCB_PrimitiveComponentPad](classes/IPCB_PrimitiveComponentPad.md) | 器件焊盘图元 | |
| [IPCB_PrimitiveDimension](classes/IPCB_PrimitiveDimension.md) | 尺寸标注图元 | |
| [IPCB_PrimitiveFill](classes/IPCB_PrimitiveFill.md) | 填充图元 | |
| [IPCB_PrimitiveImage](classes/IPCB_PrimitiveImage.md) | 图像图元 | |
| [IPCB_PrimitiveLine](classes/IPCB_PrimitiveLine.md) | 直线图元 | |
| [IPCB_PrimitiveObject](classes/IPCB_PrimitiveObject.md) | 二进制内嵌对象图元 | |
| [IPCB_PrimitivePad](classes/IPCB_PrimitivePad.md) | 焊盘图元 | |
| [IPCB_PrimitivePolyline](classes/IPCB_PrimitivePolyline.md) | 折线图元 | |
| [IPCB_PrimitivePour](classes/IPCB_PrimitivePour.md) | 覆铜边框图元 | |
| [IPCB_PrimitivePoured](classes/IPCB_PrimitivePoured.md) | 覆铜填充图元 | |
| [IPCB_PrimitiveRegion](classes/IPCB_PrimitiveRegion.md) | 区域图元 | |
| [IPCB_PrimitiveString](classes/IPCB_PrimitiveString.md) | 文本图元 | |
| [IPCB_PrimitiveVia](classes/IPCB_PrimitiveVia.md) | 过孔图元 | |
| [ISCH_PrimitiveArc](classes/ISCH_PrimitiveArc.md) | 圆弧图元 | |
| [ISCH_PrimitiveAttribute](classes/ISCH_PrimitiveAttribute.md) | 属性图元 | |
| [ISCH_PrimitiveBus](classes/ISCH_PrimitiveBus.md) | 总线图元 | |
| [ISCH_PrimitiveCbbSymbolComponent](classes/ISCH_PrimitiveCbbSymbolComponent.md) | 复用模块符号图元 | |
| [ISCH_PrimitiveCircle](classes/ISCH_PrimitiveCircle.md) | 圆图元 | |
| [ISCH_PrimitiveComponent](classes/ISCH_PrimitiveComponent.md) | 器件图元 | |
| [ISCH_PrimitiveComponentPin](classes/ISCH_PrimitiveComponentPin.md) | 器件引脚图元 | |
| [ISCH_PrimitivePin](classes/ISCH_PrimitivePin.md) | 引脚图元 | |
| [ISCH_PrimitivePolygon](classes/ISCH_PrimitivePolygon.md) | 多边形(折线)图元 | |
| [ISCH_PrimitiveRectangle](classes/ISCH_PrimitiveRectangle.md) | 矩形图元 | |
| [ISCH_PrimitiveText](classes/ISCH_PrimitiveText.md) | 文本图元 | |
| [ISCH_PrimitiveWire](classes/ISCH_PrimitiveWire.md) | 导线图元 | |
| [LIB_3DModel](classes/LIB_3DModel.md) | 综合库 / 3D 模型类 | |
| [LIB_Cbb](classes/LIB_Cbb.md) | 综合库 / 复用模块类 | |
| [LIB_Classification](classes/LIB_Classification.md) | 综合库 / 库分类索引类 | |
| [LIB_Device](classes/LIB_Device.md) | 综合库 / 器件类 | |
| [LIB_Footprint](classes/LIB_Footprint.md) | 综合库 / 封装类 | |
| [LIB_LibrariesList](classes/LIB_LibrariesList.md) | 综合库 / 库列表类 | |
| [LIB_PanelLibrary](classes/LIB_PanelLibrary.md) | 综合库 / 面板库类 | |
| [LIB_SelectControl](classes/LIB_SelectControl.md) | 综合库 / 选择控制类 | |
| [LIB_Symbol](classes/LIB_Symbol.md) | 综合库 / 符号类 | |
| [PCB_Document](classes/PCB_Document.md) | PCB & 封装 / 文档操作类 | |
| [PCB_Drc](classes/PCB_Drc.md) | PCB & 封装 / 设计规则检查(DRC)类 | |
| [PCB_Event](classes/PCB_Event.md) | PCB & 封装 / 事件类 | |
| [PCB_Layer](classes/PCB_Layer.md) | PCB & 封装 / 图层操作类 | |
| [PCB_ManufactureData](classes/PCB_ManufactureData.md) | PCB & 封装 / 生产资料类 | |
| [PCB_MathPolygon](classes/PCB_MathPolygon.md) | PCB & 封装 / 多边形数学类 | |
| [PCB_Net](classes/PCB_Net.md) | PCB & 封装 / 网络类 | |
| [PCB_Primitive](classes/PCB_Primitive.md) | PCB & 封装 / 图元类 | |
| [PCB_PrimitiveArc](classes/PCB_PrimitiveArc.md) | PCB & 封装 / 圆弧线图元类 | |
| [PCB_PrimitiveAttribute](classes/PCB_PrimitiveAttribute.md) | PCB & 封装 / 属性图元类 | |
| [PCB_PrimitiveComponent](classes/PCB_PrimitiveComponent.md) | PCB & 封装 / 器件图元类 | |
| [PCB_PrimitiveDimension](classes/PCB_PrimitiveDimension.md) | PCB & 封装 / 尺寸标注图元类 | |
| [PCB_PrimitiveFill](classes/PCB_PrimitiveFill.md) | PCB & 封装 / 填充图元类 | |
| [PCB_PrimitiveImage](classes/PCB_PrimitiveImage.md) | PCB & 封装 / 图像图元类 | |
| [PCB_PrimitiveLine](classes/PCB_PrimitiveLine.md) | PCB & 封装 / 直线图元类 | |
| [PCB_PrimitiveObject](classes/PCB_PrimitiveObject.md) | PCB & 封装 / 二进制内嵌对象图元类 | |
| [PCB_PrimitivePad](classes/PCB_PrimitivePad.md) | PCB & 封装 / 焊盘图元类 | |
| [PCB_PrimitivePolyline](classes/PCB_PrimitivePolyline.md) | PCB & 封装 / 折线图元类 | |
| [PCB_PrimitivePour](classes/PCB_PrimitivePour.md) | PCB & 封装 / 覆铜边框图元类 | |
| [PCB_PrimitivePoured](classes/PCB_PrimitivePoured.md) | PCB & 封装 / 覆铜填充图元类 | |
| [PCB_PrimitiveRegion](classes/PCB_PrimitiveRegion.md) | PCB & 封装 / 禁止区域和约束区域图元类 | |
| [PCB_PrimitiveString](classes/PCB_PrimitiveString.md) | PCB & 封装 / 文本图元类 | |
| [PCB_PrimitiveVia](classes/PCB_PrimitiveVia.md) | PCB & 封装 / 过孔图元类 | |
| [PCB_RayTracerEngine](classes/PCB_RayTracerEngine.md) | PCB & 封装 / 光线追踪引擎类 | |
| [PCB_SelectControl](classes/PCB_SelectControl.md) | PCB & 封装 / 选择控制类 | |
| [PNL_Document](classes/PNL_Document.md) | 面板 / 文档操作类 | |
| [SCH_Document](classes/SCH_Document.md) | 原理图 & 符号 / 文档操作类 | |
| [SCH_Drc](classes/SCH_Drc.md) | 原理图 & 符号 / 设计规则检查(DRC)类 | |
| [SCH_Event](classes/SCH_Event.md) | 原理图 & 符号 / 事件类 | |
| [SCH_ManufactureData](classes/SCH_ManufactureData.md) | 原理图 & 符号 / 生产资料类 | |
| [SCH_Net](classes/SCH_Net.md) | 原理图 & 符号 / 网络类 | |
| [SCH_Netlist](classes/SCH_Netlist.md) | 原理图 & 符号 / 网表类 | |
| [SCH_Primitive](classes/SCH_Primitive.md) | 原理图 & 符号 / 图元类 | |
| [SCH_PrimitiveArc](classes/SCH_PrimitiveArc.md) | 原理图 & 符号 / 圆弧图元类 | |
| [SCH_PrimitiveAttribute](classes/SCH_PrimitiveAttribute.md) | 原理图 & 符号 / 属性图元类 | |
| [SCH_PrimitiveBus](classes/SCH_PrimitiveBus.md) | 原理图 & 符号 / 总线图元类 | |
| [SCH_PrimitiveCircle](classes/SCH_PrimitiveCircle.md) | 原理图 & 符号 / 圆图元类 | |
| [SCH_PrimitiveComponent](classes/SCH_PrimitiveComponent.md) | 原理图 & 符号 / 器件图元类 | |
| [SCH_PrimitiveObject](classes/SCH_PrimitiveObject.md) | 原理图 & 符号 / 二进制内嵌对象图元类 | |
| [SCH_PrimitivePin](classes/SCH_PrimitivePin.md) | 原理图 & 符号 / 引脚图元类 | |
| [SCH_PrimitivePolygon](classes/SCH_PrimitivePolygon.md) | 原理图 & 符号 / 多边形(折线)图元类 | |
| [SCH_PrimitiveRectangle](classes/SCH_PrimitiveRectangle.md) | 原理图 & 符号 / 矩形图元类 | |
| [SCH_PrimitiveText](classes/SCH_PrimitiveText.md) | 原理图 & 符号 / 文本图元类 | |
| [SCH_PrimitiveWire](classes/SCH_PrimitiveWire.md) | 原理图 & 符号 / 导线图元类 | |
| [SCH_SelectControl](classes/SCH_SelectControl.md) | 原理图 & 符号 / 选择控制类 | |
| [SCH_SimulationEngine](classes/SCH_SimulationEngine.md) | 原理图 & 符号 / 仿真引擎类 | |
| [SCH_Utils](classes/SCH_Utils.md) | 原理图 & 符号 / 工具类 | |
| [SYS_ClientUrl](classes/SYS_ClientUrl.md) | 系统 / 外部请求类 | |
| [SYS_Dialog](classes/SYS_Dialog.md) | 系统 / 对话框类 | |
| [SYS_Environment](classes/SYS_Environment.md) | 系统 / 运行环境类 | |
| [SYS_FileManager](classes/SYS_FileManager.md) | 系统 / 文件管理类 | |
| [SYS_FileSystem](classes/SYS_FileSystem.md) | 系统 / 文件系统交互类 | |
| [SYS_FontManager](classes/SYS_FontManager.md) | 系统 / 字体管理类 | |
| [SYS_FormatConversion](classes/SYS_FormatConversion.md) | 系统 / 格式转换(Chameleon)类 | |
| [SYS_HeaderMenu](classes/SYS_HeaderMenu.md) | 系统 / 顶部菜单类 | |
| [SYS_I18n](classes/SYS_I18n.md) | 系统 / 多语言类 | |
| [SYS_IFrame](classes/SYS_IFrame.md) | 系统 / 内联框架窗口类 | |
| [SYS_LoadingAndProgressBar](classes/SYS_LoadingAndProgressBar.md) | 系统 / 加载与进度条类 | |
| [SYS_Log](classes/SYS_Log.md) | 系统 / 日志类 | |
| [SYS_Message](classes/SYS_Message.md) | 系统 / 消息通知类 | |
| [SYS_MessageBox](classes/SYS_MessageBox.md) | 系统 / 消息框类 | |
| [SYS_MessageBus](classes/SYS_MessageBus.md) | 系统 / 消息总线类 | |
| [SYS_PanelControl](classes/SYS_PanelControl.md) | 系统 / 面板控制类 | |
| [SYS_RightClickMenu](classes/SYS_RightClickMenu.md) | 系统 / 右键菜单类 | |
| [SYS_Setting](classes/SYS_Setting.md) | 系统 / 设置类 | |
| [SYS_ShortcutKey](classes/SYS_ShortcutKey.md) | 系统 / 快捷键类 | |
| [SYS_Storage](classes/SYS_Storage.md) | 系统 / 存储类 | |
| [SYS_Timer](classes/SYS_Timer.md) | 系统 / 定时器类 | |
| [SYS_ToastMessage](classes/SYS_ToastMessage.md) | 系统 / 吐司消息类 | |
| [SYS_Tool](classes/SYS_Tool.md) | 系统 / 工具类 | |
| [SYS_Unit](classes/SYS_Unit.md) | 系统 / 单位类 | |
| [SYS_WebSocket](classes/SYS_WebSocket.md) | 系统 / WebSocket 类 | |
| [SYS_Window](classes/SYS_Window.md) | 系统 / 窗口类 | |
---
# 枚举 (Enumerations)
| 枚举名 | 描述 | 备注 |
|--------|------|------|
| [EDMT_EditorDocumentType](enums/EDMT_EditorDocumentType.md) | 编辑器文档类型 | |
| [EDMT_EditorSplitScreenDirection](enums/EDMT_EditorSplitScreenDirection.md) | 编辑器分屏方向 | |
| [EDMT_IndicatorMarkerType](enums/EDMT_IndicatorMarkerType.md) | 指示标记类型 | |
| [EDMT_ItemType](enums/EDMT_ItemType.md) | 文档树项目类型 | |
| [EDMT_ProjectCollaborationMode](enums/EDMT_ProjectCollaborationMode.md) | 工程协作模式 | |
| [ELIB_DeviceJlcLibraryCategory](enums/ELIB_DeviceJlcLibraryCategory.md) | 嘉立创贴片库类别 | |
| [ELIB_LibraryType](enums/ELIB_LibraryType.md) | 综合库库类型 | |
| [ELIB_PreviewType](enums/ELIB_PreviewType.md) | 预览视图类型 | |
| [ELIB_SymbolType](enums/ELIB_SymbolType.md) | 符号类型 | |
| [EPCB_DocumentRatlineCalculatingActiveStatus](enums/EPCB_DocumentRatlineCalculatingActiveStatus.md) | 文档飞线计算功能状态 | |
| [EPCB_InactiveLayerDisplayMode](enums/EPCB_InactiveLayerDisplayMode.md) | 非激活层展示模式 | |
| [EPCB_LayerColorConfiguration](enums/EPCB_LayerColorConfiguration.md) | 图层颜色配置 | |
| [EPCB_LayerId](enums/EPCB_LayerId.md) | 图层 ID | |
| [EPCB_LayerStatus](enums/EPCB_LayerStatus.md) | 层状态 | |
| [EPCB_LayerType](enums/EPCB_LayerType.md) | 图层类型 | |
| [EPCB_PcbPlateType](enums/EPCB_PcbPlateType.md) | PCB 板材类型 | |
| [EPCB_PdfOutputMethod](enums/EPCB_PdfOutputMethod.md) | PDF 输出方式 | |
| [EPCB_PrimitiveArcInteractiveMode](enums/EPCB_PrimitiveArcInteractiveMode.md) | 圆弧交互模式 | |
| [EPCB_PrimitiveDimensionType](enums/EPCB_PrimitiveDimensionType.md) | 尺寸标注类型 | |
| [EPCB_PrimitiveFillMode](enums/EPCB_PrimitiveFillMode.md) | 填充图元填充模式 | |
| [EPCB_PrimitivePadHeatWeldingConnectionMethod](enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md) | 焊盘热焊连接方式 | |
| [EPCB_PrimitivePadHoleType](enums/EPCB_PrimitivePadHoleType.md) | 焊盘钻孔类型 | |
| [EPCB_PrimitivePadShapeType](enums/EPCB_PrimitivePadShapeType.md) | 焊盘外形种类 | |
| [EPCB_PrimitivePadType](enums/EPCB_PrimitivePadType.md) | 焊盘类型 | |
| [EPCB_PrimitivePourFillMethod](enums/EPCB_PrimitivePourFillMethod.md) | 覆铜填充方法 | |
| [EPCB_PrimitiveRegionRuleType](enums/EPCB_PrimitiveRegionRuleType.md) | 区域图元区域规则类型 | |
| [EPCB_PrimitiveStringAlignMode](enums/EPCB_PrimitiveStringAlignMode.md) | 文本对齐模式 | |
| [EPCB_PrimitiveType](enums/EPCB_PrimitiveType.md) | 图元类型 | |
| [EPCB_PrimitiveViaType](enums/EPCB_PrimitiveViaType.md) | 过孔类型 | |
| [ESCH_DynamicSimulationEnginePullEventType](enums/ESCH_DynamicSimulationEnginePullEventType.md) | 动态仿真引擎拉取事件类型 | |
| [ESCH_DynamicSimulationEnginePushEventType](enums/ESCH_DynamicSimulationEnginePushEventType.md) | 动态仿真引擎推送事件类型 | |
| [ESCH_ExportDocumentFileType](enums/ESCH_ExportDocumentFileType.md) | 导出文档文件类型 | |
| [ESCH_MouseEventType](enums/ESCH_MouseEventType.md) | 鼠标事件类型 | |
| [ESCH_PrimitiveComponentType](enums/ESCH_PrimitiveComponentType.md) | 器件类型 | |
| [ESCH_PrimitiveEventType](enums/ESCH_PrimitiveEventType.md) | 图元事件类型 | |
| [ESCH_PrimitiveFillStyle](enums/ESCH_PrimitiveFillStyle.md) | 填充样式 | |
| [ESCH_PrimitiveLineType](enums/ESCH_PrimitiveLineType.md) | 线型 | |
| [ESCH_PrimitivePinShape](enums/ESCH_PrimitivePinShape.md) | 引脚形状 | |
| [ESCH_PrimitivePinType](enums/ESCH_PrimitivePinType.md) | 引脚类型 | |
| [ESCH_PrimitiveTextAlignMode](enums/ESCH_PrimitiveTextAlignMode.md) | 文本对齐模式 | |
| [ESCH_PrimitiveType](enums/ESCH_PrimitiveType.md) | 图元类型 | |
| [ESCH_ShapeType](enums/ESCH_ShapeType.md) | 图元类型 | |
| [ESCH_SimulationNetlistType](enums/ESCH_SimulationNetlistType.md) | 仿真网表类型 | |
| [ESCH_SpiceSimulationEnginePullEventType](enums/ESCH_SpiceSimulationEnginePullEventType.md) | Spice 仿真引擎拉取事件类型 | |
| [ESCH_SpiceSimulationEnginePushEventType](enums/ESCH_SpiceSimulationEnginePushEventType.md) | Spice 仿真引擎推送事件类型 | |
| [ESYS_BottomPanelTab](enums/ESYS_BottomPanelTab.md) | 底部面板标签页 | |
| [ESYS_HeaderMenuEnvironment](enums/ESYS_HeaderMenuEnvironment.md) | 顶部菜单环境 | |
| [ESYS_ImportProjectBoardOutlineSource](enums/ESYS_ImportProjectBoardOutlineSource.md) | 导入工程板边框来源 | |
| [ESYS_ImportProjectImportOption](enums/ESYS_ImportProjectImportOption.md) | 导入工程导入选项 | |
| [ESYS_ImportProjectSchematicObjectStyle](enums/ESYS_ImportProjectSchematicObjectStyle.md) | 导入工程原理图图元样式 | |
| [ESYS_ImportProjectViaSolderMaskExpansion](enums/ESYS_ImportProjectViaSolderMaskExpansion.md) | 导入工程过孔阻焊扩展 | |
| [ESYS_LeftPanelTab](enums/ESYS_LeftPanelTab.md) | 左侧面板标签页 | |
| [ESYS_LogType](enums/ESYS_LogType.md) | 日志类型 | |
| [ESYS_NetlistType](enums/ESYS_NetlistType.md) | 网表类型 | |
| [ESYS_RightPanelTab](enums/ESYS_RightPanelTab.md) | 右侧面板标签页 | |
| [ESYS_ShortcutKeyEffectiveEditorDocumentType](enums/ESYS_ShortcutKeyEffectiveEditorDocumentType.md) | 快捷键生效页面范围 | |
| [ESYS_ShortcutKeyEffectiveEditorScene](enums/ESYS_ShortcutKeyEffectiveEditorScene.md) | 快捷键生效场景范围 | |
| [ESYS_Theme](enums/ESYS_Theme.md) | 主题 | |
| [ESYS_ToastMessageType](enums/ESYS_ToastMessageType.md) | 吐司消息类型 | |
| [ESYS_Unit](enums/ESYS_Unit.md) | 单位 | |
| [ESYS_WindowEventType](enums/ESYS_WindowEventType.md) | 窗口事件类型 | |
| [ESYS_WindowOpenTarget](enums/ESYS_WindowOpenTarget.md) | 打开窗口上下文目标 | |
---
# 接口 (Interfaces)
| 接口名 | 描述 | 备注 |
|--------|------|------|
| [IDMT_BoardItem](interfaces/IDMT_BoardItem.md) | 板子属性 | |
| [IDMT_BriefProjectItem](interfaces/IDMT_BriefProjectItem.md) | 简略工程属性 | |
| [IDMT_EditorDocumentItem](interfaces/IDMT_EditorDocumentItem.md) | 编辑器文档对象 | |
| [IDMT_EditorSplitScreenItem](interfaces/IDMT_EditorSplitScreenItem.md) | 编辑器分屏属性 | |
| [IDMT_EditorTabItem](interfaces/IDMT_EditorTabItem.md) | 编辑器标签页 | |
| [IDMT_FolderItem](interfaces/IDMT_FolderItem.md) | 文件夹属性 | |
| [IDMT_IndicatorMarkerShape](interfaces/IDMT_IndicatorMarkerShape.md) | 指示标记外形 | |
| [IDMT_PanelItem](interfaces/IDMT_PanelItem.md) | 面板属性 | |
| [IDMT_PcbItem](interfaces/IDMT_PcbItem.md) | PCB 属性 | |
| [IDMT_ProjectItem](interfaces/IDMT_ProjectItem.md) | 工程属性 | |
| [IDMT_SchematicItem](interfaces/IDMT_SchematicItem.md) | 原理图属性 | |
| [IDMT_SchematicPageItem](interfaces/IDMT_SchematicPageItem.md) | 原理图图页属性 | |
| [IDMT_TeamItem](interfaces/IDMT_TeamItem.md) | 团队属性 | |
| [IDMT_WorkspaceItem](interfaces/IDMT_WorkspaceItem.md) | 工作区属性 | |
| [ILIB_3DModelItem](interfaces/ILIB_3DModelItem.md) | 3D 模型属性 | |
| [ILIB_3DModelSearchItem](interfaces/ILIB_3DModelSearchItem.md) | 搜索到的 3D 模型属性 | |
| [ILIB_CbbItem](interfaces/ILIB_CbbItem.md) | 复用模块属性 | |
| [ILIB_CbbSearchItem](interfaces/ILIB_CbbSearchItem.md) | 搜索到的复用模块属性 | |
| [ILIB_ClassificationIndex](interfaces/ILIB_ClassificationIndex.md) | 分类索引 | |
| [ILIB_DeviceAssociationItem](interfaces/ILIB_DeviceAssociationItem.md) | 器件关联符号、封装属性 | |
| [ILIB_DeviceExtendPropertyItem](interfaces/ILIB_DeviceExtendPropertyItem.md) | 器件扩展属性 | |
| [ILIB_DeviceItem](interfaces/ILIB_DeviceItem.md) | 器件属性 | |
| [ILIB_DeviceSearchItem](interfaces/ILIB_DeviceSearchItem.md) | 搜索到的器件属性 | |
| [ILIB_ExtendLibrary3DModelFunctions](interfaces/ILIB_ExtendLibrary3DModelFunctions.md) | 外部库 3D 模型方法 | |
| [ILIB_ExtendLibraryCbbFunctions](interfaces/ILIB_ExtendLibraryCbbFunctions.md) | 外部库复用模块方法 | |
| [ILIB_ExtendLibraryClassificationIndex](interfaces/ILIB_ExtendLibraryClassificationIndex.md) | 外部库分类索引 | |
| [ILIB_ExtendLibraryDeviceFunctions](interfaces/ILIB_ExtendLibraryDeviceFunctions.md) | 外部库器件方法 | |
| [ILIB_ExtendLibraryFootprintFunctions](interfaces/ILIB_ExtendLibraryFootprintFunctions.md) | 外部库封装方法 | |
| [ILIB_ExtendLibraryFunctions](interfaces/ILIB_ExtendLibraryFunctions.md) | 外部库方法 | |
| [ILIB_ExtendLibraryItem](interfaces/ILIB_ExtendLibraryItem.md) | 外部库元素 | |
| [ILIB_ExtendLibraryItemIndex](interfaces/ILIB_ExtendLibraryItemIndex.md) | 外部库元素索引 | |
| [ILIB_ExtendLibrarySearchProperty](interfaces/ILIB_ExtendLibrarySearchProperty.md) | 外部库搜索参数 | |
| [ILIB_ExtendLibrarySearchResult](interfaces/ILIB_ExtendLibrarySearchResult.md) | 外部库搜索结果 | |
| [ILIB_ExtendLibrarySearchResultDataLine](interfaces/ILIB_ExtendLibrarySearchResultDataLine.md) | 外部库搜索结果数据行 | |
| [ILIB_ExtendLibrarySymbolFunctions](interfaces/ILIB_ExtendLibrarySymbolFunctions.md) | 外部库符号方法 | |
| [ILIB_ExtendLibraryUserIndex](interfaces/ILIB_ExtendLibraryUserIndex.md) | 外部库用户索引 | |
| [ILIB_FootprintItem](interfaces/ILIB_FootprintItem.md) | 封装属性 | |
| [ILIB_FootprintSearchItem](interfaces/ILIB_FootprintSearchItem.md) | 搜索到的封装属性 | |
| [ILIB_LibraryInfo](interfaces/ILIB_LibraryInfo.md) | 库信息 | |
| [ILIB_LibraryItem](interfaces/ILIB_LibraryItem.md) | 库属性 | |
| [ILIB_PanelLibraryItem](interfaces/ILIB_PanelLibraryItem.md) | 面板库属性 | |
| [ILIB_PanelLibrarySearchItem](interfaces/ILIB_PanelLibrarySearchItem.md) | 搜索到的面板库属性 | |
| [ILIB_SymbolItem](interfaces/ILIB_SymbolItem.md) | 符号属性 | |
| [ILIB_SymbolSearchItem](interfaces/ILIB_SymbolSearchItem.md) | 搜索到的符号属性 | |
| [IPCB_BomPropertiesTableColumns](interfaces/IPCB_BomPropertiesTableColumns.md) | BOM 列的属性及排序规则 | |
| [IPCB_DifferentialPairItem](interfaces/IPCB_DifferentialPairItem.md) | 差分对属性 | |
| [IPCB_EqualLengthNetGroupItem](interfaces/IPCB_EqualLengthNetGroupItem.md) | 等长网络组属性 | |
| [IPCB_LayerItem](interfaces/IPCB_LayerItem.md) | 图层属性 | |
| [IPCB_NetClassItem](interfaces/IPCB_NetClassItem.md) | 网络类属性 | |
| [IPCB_NetInfo](interfaces/IPCB_NetInfo.md) | 网络属性 | |
| [IPCB_PadPairGroupItem](interfaces/IPCB_PadPairGroupItem.md) | 焊盘对组属性 | |
| [IPCB_PadPairMinWireLengthItem](interfaces/IPCB_PadPairMinWireLengthItem.md) | 焊盘对最短导线长度属性 | |
| [IPCB_Primitive](interfaces/IPCB_Primitive.md) | PCB 图元 | |
| [IPCB_PrimitiveAPI](interfaces/IPCB_PrimitiveAPI.md) | PCB 图元接口 | |
| [IPCB_PrimitivePouredPourFill](interfaces/IPCB_PrimitivePouredPourFill.md) | 覆铜填充区域 | |
| [IPCB_PrimitiveSolderMaskAndPasteMaskExpansion](interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) | 阻焊/助焊扩展 | |
| [ISCH_NetInfo](interfaces/ISCH_NetInfo.md) | 网络属性 | |
| [ISCH_Primitive](interfaces/ISCH_Primitive.md) | 原理图图元 | |
| [ISCH_PrimitiveAPI](interfaces/ISCH_PrimitiveAPI.md) | 原理图图元接口 | |
| [ISCH_ProjectNetInfo](interfaces/ISCH_ProjectNetInfo.md) | 工程网络属性 | |
| [ISCH_WireInfo](interfaces/ISCH_WireInfo.md) | 导线属性 | |
| [ISYS_FileSystemFileList](interfaces/ISYS_FileSystemFileList.md) | 文件系统文件路径 | |
| [ISYS_HeaderMenus](interfaces/ISYS_HeaderMenus.md) | 顶部菜单项 | |
| [ISYS_HeaderMenuSub1MenuItem](interfaces/ISYS_HeaderMenuSub1MenuItem.md) | 顶部二级菜单项 | |
| [ISYS_HeaderMenuSub2MenuItem](interfaces/ISYS_HeaderMenuSub2MenuItem.md) | 顶部三级菜单项 | |
| [ISYS_HeaderMenuTopMenuItem](interfaces/ISYS_HeaderMenuTopMenuItem.md) | 顶部一级菜单项 | |
| [ISYS_LanguageKeyValuePairs](interfaces/ISYS_LanguageKeyValuePairs.md) | 语言数据键值对 | |
| [ISYS_LogLine](interfaces/ISYS_LogLine.md) | 日志行 | |
| [ISYS_MessageBusTask](interfaces/ISYS_MessageBusTask.md) | 消息总线任务 | |
| [ISYS_MultilingualLanguagesData](interfaces/ISYS_MultilingualLanguagesData.md) | 多语言数据 | |
| [ISYS_ReactComponentizationDialogInterface](interfaces/ISYS_ReactComponentizationDialogInterface.md) | **_(ALPHA)_** React 组件化弹出窗口接口 | |
| [ISYS_ReactComponentizationDialogReactInstance](interfaces/ISYS_ReactComponentizationDialogReactInstance.md) | **_(ALPHA)_** React 实例接口 用于接收扩展的 React 实例 | |
| [ISYS_ReactComponentizationDialogReconcilerInstance](interfaces/ISYS_ReactComponentizationDialogReconcilerInstance.md) | **_(ALPHA)_** React Reconciler 实例接口 用于接收扩展的 react-reconciler 实例 | |
| [ISYS_ReactComponentizationDialogVirtualRender](interfaces/ISYS_ReactComponentizationDialogVirtualRender.md) | **_(ALPHA)_** VirtualRender 类接口 用于在虚拟环境中渲染 React 组件 | |
| [ISYS_ReactComponentizationDialogWorkerPortal](interfaces/ISYS_ReactComponentizationDialogWorkerPortal.md) | **_(ALPHA)_** WorkerPortal 类接口 用于管理组件的生命周期和事件处理 | |
| [ISYS_RightClickMenuItem](interfaces/ISYS_RightClickMenuItem.md) | 右键菜单项 | |
| [ISYS_WindowEventListenerRemovableObject](interfaces/ISYS_WindowEventListenerRemovableObject.md) | 窗口事件监听可移除对象 | |
---
# 类型别名 (Type Aliases)
| 类型名 | 描述 | 备注 |
|--------|------|------|
| [LC_DESIGN_COMPONENTS](types/LC_DESIGN_COMPONENTS.md) | | |
| [TPCB_LayersInTheSelectable](types/TPCB_LayersInTheSelectable.md) | 可选中图层 | |
| [TPCB_LayersOfComponent](types/TPCB_LayersOfComponent.md) | 器件所属层 | |
| [TPCB_LayersOfCopper](types/TPCB_LayersOfCopper.md) | 铜箔所属层 | |
| [TPCB_LayersOfCustom](types/TPCB_LayersOfCustom.md) | 自定义层 | |
| [TPCB_LayersOfDimension](types/TPCB_LayersOfDimension.md) | 尺寸标注所属层 | |
| [TPCB_LayersOfFill](types/TPCB_LayersOfFill.md) | 填充所属层 | |
| [TPCB_LayersOfImage](types/TPCB_LayersOfImage.md) | 复杂多边形图(SVG 图像、文本)所属层 | |
| [TPCB_LayersOfInner](types/TPCB_LayersOfInner.md) | 内层 | |
| [TPCB_LayersOfLine](types/TPCB_LayersOfLine.md) | 线所属层 | |
| [TPCB_LayersOfObject](types/TPCB_LayersOfObject.md) | 二进制内嵌对象所属层 | |
| [TPCB_LayersOfPad](types/TPCB_LayersOfPad.md) | 焊盘所属层 | |
| [TPCB_LayersOfRegion](types/TPCB_LayersOfRegion.md) | 区域所属层 | |
| [TPCB_LayerTypesOfInnerLayer](types/TPCB_LayerTypesOfInnerLayer.md) | 内层允许设置的图层类型 | |
| [TPCB_PolygonSourceArray](types/TPCB_PolygonSourceArray.md) | 单多边形源数组 | |
| [TPCB_PrimitiveDimensionCoordinateSet](types/TPCB_PrimitiveDimensionCoordinateSet.md) | 尺寸标注坐标集 | |
| [TPCB_PrimitivePadHole](types/TPCB_PrimitivePadHole.md) | 焊盘钻孔 | |
| [TPCB_PrimitivePadShape](types/TPCB_PrimitivePadShape.md) | 焊盘外形 | |
| [TPCB_PrimitiveSpecialPadShape](types/TPCB_PrimitiveSpecialPadShape.md) | 特殊焊盘外形 | |
| [TSYS_ShortcutKeys](types/TSYS_ShortcutKeys.md) | 快捷键按键 | |
FILE:references/_quick-reference.md
# EasyEDA API 快速参考
> 此文件提供所有类及其方法/属性的签名一览,便于 AI 快速查找。
> 详细参数和返回值请查看 docs/classes/<ClassName>.md
## 全局入口
```typescript
declare const eda: EDA;
```
EDA 类的属性即为各模块的入口,如 `eda.dmt_Board`, `eda.pcb_PrimitiveLine` 等。
---
## DMT_Board
文档树 / 板子管理类
```typescript
declare class DMT_Board
```
- **copyboard**: `copyBoard(sourceBoardName: string): Promise<string | undefined>;`
- **createboard**: `createBoard(schematicUuid?: string, pcbUuid?: string): Promise<string | undefined>;`
- **deleteboard**: `deleteBoard(boardName: string): Promise<boolean>;`
- **getallboardsinfo**: `getAllBoardsInfo(): Promise<Array<IDMT_BoardItem>>;`
- **getboardinfo**: `getBoardInfo(boardName: string): Promise<IDMT_BoardItem | undefined>;`
- **getcurrentboardinfo**: `getCurrentBoardInfo(): Promise<IDMT_BoardItem | undefined>;`
- **modifyboardname**: `modifyBoardName(originalBoardName: string, boardName: string): Promise<boolean>;`
---
## DMT_EditorControl
文档树 / 编辑器控制类
```typescript
declare class DMT_EditorControl
```
- **activatedocument**: `activateDocument(tabId: string): Promise<boolean>;`
- **activatesplitscreen**: `activateSplitScreen(splitScreenId: string): Promise<boolean>;`
- **closedocument**: `closeDocument(tabId: string): Promise<boolean>;`
- **createsplitscreen**: `createSplitScreen(splitScreenType: EDMT_EditorSplitScreenDirection, tabId: string): Promise<{ sourceSplitScreenId: string; newSplitScreenId: string; } | undefined>;`
- **generateindicatormarkers**: `generateIndicatorMarkers(markers: Array<IDMT_IndicatorMarkerShape>, color?: { r: number; g: number; b: number; alpha: number; }, lineWidth?: number, zoom?: boolean, tabId?: string): Promise<boolean>;`
- **getcurrentrenderedareaimage**: `getCurrentRenderedAreaImage(tabId?: string): Promise<Blob | undefined>;`
- **getsplitscreenidbytabid**: `getSplitScreenIdByTabId(tabId: string): Promise<string | undefined>;`
- **getsplitscreentree**: `getSplitScreenTree(): Promise<IDMT_EditorSplitScreenItem | undefined>;`
- **gettabsbysplitscreenid**: `getTabsBySplitScreenId(splitScreenId: string): Promise<Array<IDMT_EditorTabItem>>;`
- **mergealldocumentfromsplitscreen**: `mergeAllDocumentFromSplitScreen(): Promise<boolean>;`
- **movedocumenttosplitscreen**: `moveDocumentToSplitScreen(tabId: string, splitScreenId: string): Promise<boolean>;`
- **opendocument**: `openDocument(documentUuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **openlibrarydocument**: `openLibraryDocument(libraryUuid: string, libraryType: ELIB_LibraryType.SYMBOL | ELIB_LibraryType.FOOTPRINT, uuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **removeindicatormarkers**: `removeIndicatorMarkers(tabId?: string): Promise<boolean>;`
- **tilealldocumenttosplitscreen**: `tileAllDocumentToSplitScreen(): Promise<boolean>;`
- **zoomto**: `zoomTo(x?: number, y?: number, scaleRatio?: number, tabId?: string): Promise<{ left: number; right: number; top: number; bottom: number; } | false>;`
- **zoomtoallprimitives**: `zoomToAllPrimitives(tabId?: string): Promise<{ left: number; right: number; top: number; bottom: number; } | false>;`
- **zoomtoregion**: `zoomToRegion(left: number, right: number, top: number, bottom: number, tabId?: string): Promise<boolean>;`
- **zoomtoselectedprimitives**: `zoomToSelectedPrimitives(tabId?: string): Promise<{ left: number; right: number; top: number; bottom: number; } | false>;`
---
## DMT_Folder
文档树 / 文件夹类
```typescript
declare class DMT_Folder
```
- **createfolder**: `createFolder(folderName: string, teamUuid: string, parentFolderUuid?: string, description?: string): Promise<string | undefined>;`
- **deletefolder**: `deleteFolder(teamUuid: string, folderUuid: string): Promise<boolean>;`
- **getallfoldersuuid**: `getAllFoldersUuid(teamUuid: string): Promise<Array<string>>;`
- **getfolderinfo**: `getFolderInfo(teamUuid: string, folderUuid: string): Promise<IDMT_FolderItem | undefined>;`
- **modifyfolderdescription**: `modifyFolderDescription(teamUuid: string, folderUuid: string, description?: string): Promise<boolean>;`
- **modifyfoldername**: `modifyFolderName(teamUuid: string, folderUuid: string, folderName: string): Promise<boolean>;`
- **movefoldertofolder**: `moveFolderToFolder(teamUuid: string, folderUuid: string, parentFolderUuid?: string): Promise<boolean>;`
---
## DMT_Panel
文档树 / 面板管理类
```typescript
declare class DMT_Panel
```
- **copypanel**: `copyPanel(panelUuid: string): Promise<string | undefined>;`
- **createpanel**: `createPanel(): Promise<string | undefined>;`
- **deletepanel**: `deletePanel(panelUuid: string): Promise<boolean>;`
- **getallpanelsinfo**: `getAllPanelsInfo(): Promise<Array<IDMT_PanelItem>>;`
- **getcurrentpanelinfo**: `getCurrentPanelInfo(): Promise<IDMT_PanelItem | undefined>;`
- **getpanelinfo**: `getPanelInfo(panelUuid: string): Promise<IDMT_PanelItem | undefined>;`
- **modifypanelname**: `modifyPanelName(panelUuid: string, panelName: string): Promise<boolean>;`
---
## DMT_Pcb
文档树 / PCB 管理类
```typescript
declare class DMT_Pcb
```
- **copypcb**: `copyPcb(pcbUuid: string, boardName?: string): Promise<string | undefined>;`
- **createpcb**: `createPcb(boardName?: string): Promise<string | undefined>;`
- **deletepcb**: `deletePcb(pcbUuid: string): Promise<boolean>;`
- **getallpcbsinfo**: `getAllPcbsInfo(): Promise<Array<IDMT_PcbItem>>;`
- **getcurrentpcbinfo**: `getCurrentPcbInfo(): Promise<IDMT_PcbItem | undefined>;`
- **getpcbinfo**: `getPcbInfo(pcbUuid: string): Promise<IDMT_PcbItem | undefined>;`
- **modifypcbname**: `modifyPcbName(pcbUuid: string, pcbName: string): Promise<boolean>;`
---
## DMT_Project
文档树 / 工程管理类
```typescript
declare class DMT_Project
```
- **createproject**: `createProject(projectFriendlyName: string, projectName?: string, teamUuid?: string, folderUuid?: string, description?: string, collaborationMode?: EDMT_ProjectCollaborationMode): Promise<string | undefined>;`
- **getallprojectsuuid**: `getAllProjectsUuid(teamUuid?: string, folderUuid?: string, workspaceUuid?: string): Promise<Array<string>>;`
- **getcurrentprojectinfo**: `getCurrentProjectInfo(): Promise<IDMT_ProjectItem | undefined>;`
- **getprojectinfo**: `getProjectInfo(projectUuid: string): Promise<IDMT_BriefProjectItem | undefined>;`
- **moveprojecttofolder**: `moveProjectToFolder(projectUuid: string, folderUuid?: string): Promise<boolean>;`
- **openproject**: `openProject(projectUuid: string): Promise<boolean>;`
---
## DMT_Schematic
文档树 / 原理图管理类
```typescript
declare class DMT_Schematic
```
- **copyschematic**: `copySchematic(schematicUuid: string, boardName?: string): Promise<string | undefined>;`
- **copyschematicpage**: `copySchematicPage(schematicPageUuid: string, schematicUuid?: string): Promise<string | undefined>;`
- **createschematic**: `createSchematic(boardName?: string): Promise<string | undefined>;`
- **createschematicpage**: `createSchematicPage(schematicUuid: string): Promise<string | undefined>;`
- **deleteschematic**: `deleteSchematic(schematicUuid: string): Promise<boolean>;`
- **deleteschematicpage**: `deleteSchematicPage(schematicPageUuid: string): Promise<boolean>;`
- **getallschematicpagesinfo**: `getAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;`
- **getallschematicsinfo**: `getAllSchematicsInfo(): Promise<Array<IDMT_SchematicItem>>;`
- **getcurrentschematicallschematicpagesinfo**: `getCurrentSchematicAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;`
- **getcurrentschematicinfo**: `getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;`
- **getcurrentschematicpageinfo**: `getCurrentSchematicPageInfo(): Promise<IDMT_SchematicPageItem | undefined>;`
- **getschematicinfo**: `getSchematicInfo(schematicUuid: string): Promise<IDMT_SchematicItem | undefined>;`
- **getschematicpageinfo**: `getSchematicPageInfo(schematicPageUuid: string): Promise<IDMT_SchematicPageItem | undefined>;`
- **modifyschematicname**: `modifySchematicName(schematicUuid: string, schematicName: string): Promise<boolean>;`
- **modifyschematicpagename**: `modifySchematicPageName(schematicPageUuid: string, schematicPageName: string): Promise<boolean>;`
- **modifyschematicpagetitleblock**: `modifySchematicPageTitleBlock(showTitleBlock?: boolean, titleBlockData?: { [key: string]: { showTitle?: boolean; showValue?: boolean; value?: any; }; }): Promise<boolean>;`
- **reorderschematicpages**: `reorderSchematicPages(schematicUuid: string, schematicPageItemsArray: Array<IDMT_SchematicPageItem>): Promise<boolean>;`
---
## DMT_SelectControl
文档树 / 选择控制类
```typescript
declare class DMT_SelectControl
```
- **getcurrentdocumentinfo**: `getCurrentDocumentInfo(): Promise<IDMT_EditorDocumentItem | undefined>;`
---
## DMT_Team
文档树 / 团队类
```typescript
declare class DMT_Team
```
- **getallinvolvedteaminfo**: `getAllInvolvedTeamInfo(): Promise<Array<IDMT_TeamItem>>;`
- **getallteamsinfo**: `getAllTeamsInfo(): Promise<Array<IDMT_TeamItem>>;`
- **getcurrentteaminfo**: `getCurrentTeamInfo(): Promise<IDMT_TeamItem | undefined>;`
---
## DMT_Workspace
文档树 / 工作区类
```typescript
declare class DMT_Workspace
```
- **getallworkspacesinfo**: `getAllWorkspacesInfo(): Promise<Array<IDMT_WorkspaceItem>>;`
- **getcurrentworkspaceinfo**: `getCurrentWorkspaceInfo(): Promise<IDMT_WorkspaceItem | undefined>;`
- **toggletoworkspace**: `toggleToWorkspace(workspaceUuid?: string): Promise<boolean>;`
---
## EDA
嘉立创 EDA 专业版用户 API 接口
```typescript
eda: EDA
```
- **dmt_board**: `dmt_Board: DMT_Board;`
- **dmt_editorcontrol**: `dmt_EditorControl: DMT_EditorControl;`
- **dmt_folder**: `dmt_Folder: DMT_Folder;`
- **dmt_panel**: `dmt_Panel: DMT_Panel;`
- **dmt_pcb**: `dmt_Pcb: DMT_Pcb;`
- **dmt_project**: `dmt_Project: DMT_Project;`
- **dmt_schematic**: `dmt_Schematic: DMT_Schematic;`
- **dmt_selectcontrol**: `dmt_SelectControl: DMT_SelectControl;`
- **dmt_team**: `dmt_Team: DMT_Team;`
- **dmt_workspace**: `dmt_Workspace: DMT_Workspace;`
- **lib_3dmodel**: `lib_3DModel: LIB_3DModel;`
- **lib_cbb**: `lib_Cbb: LIB_Cbb;`
- **lib_classification**: `lib_Classification: LIB_Classification;`
- **lib_device**: `lib_Device: LIB_Device;`
- **lib_footprint**: `lib_Footprint: LIB_Footprint;`
- **lib_librarieslist**: `lib_LibrariesList: LIB_LibrariesList;`
- **lib_panellibrary**: `lib_PanelLibrary: LIB_PanelLibrary;`
- **lib_selectcontrol**: `lib_SelectControl: LIB_SelectControl;`
- **lib_symbol**: `lib_Symbol: LIB_Symbol;`
- **pcb_document**: `pcb_Document: PCB_Document;`
- **pcb_drc**: `pcb_Drc: PCB_Drc;`
- **pcb_event**: `pcb_Event: PCB_Event;`
- **pcb_layer**: `pcb_Layer: PCB_Layer;`
- **pcb_manufacturedata**: `pcb_ManufactureData: PCB_ManufactureData;`
- **pcb_mathpolygon**: `pcb_MathPolygon: PCB_MathPolygon;`
- **pcb_net**: `pcb_Net: PCB_Net;`
- **pcb_primitive**: `pcb_Primitive: PCB_Primitive;`
- **pcb_primitivearc**: `pcb_PrimitiveArc: PCB_PrimitiveArc;`
- **pcb_primitiveattribute**: `pcb_PrimitiveAttribute: PCB_PrimitiveAttribute;`
- **pcb_primitivecomponent**: `pcb_PrimitiveComponent: PCB_PrimitiveComponent;`
- **pcb_primitivedimension**: `pcb_PrimitiveDimension: PCB_PrimitiveDimension;`
- **pcb_primitivefill**: `pcb_PrimitiveFill: PCB_PrimitiveFill;`
- **pcb_primitiveimage**: `pcb_PrimitiveImage: PCB_PrimitiveImage;`
- **pcb_primitiveline**: `pcb_PrimitiveLine: PCB_PrimitiveLine;`
- **pcb_primitiveobject**: `pcb_PrimitiveObject: PCB_PrimitiveObject;`
- **pcb_primitivepad**: `pcb_PrimitivePad: PCB_PrimitivePad;`
- **pcb_primitivepolyline**: `pcb_PrimitivePolyline: PCB_PrimitivePolyline;`
- **pcb_primitivepour**: `pcb_PrimitivePour: PCB_PrimitivePour;`
- **pcb_primitivepoured**: `pcb_PrimitivePoured: PCB_PrimitivePoured;`
- **pcb_primitiveregion**: `pcb_PrimitiveRegion: PCB_PrimitiveRegion;`
- **pcb_primitivestring**: `pcb_PrimitiveString: PCB_PrimitiveString;`
- **pcb_primitivevia**: `pcb_PrimitiveVia: PCB_PrimitiveVia;`
- **pcb_raytracerengine**: `pcb_RayTracerEngine: PCB_RayTracerEngine;`
- **pcb_selectcontrol**: `pcb_SelectControl: PCB_SelectControl;`
- **pnl_document**: `pnl_Document: PNL_Document;`
- **sch_document**: `sch_Document: SCH_Document;`
- **sch_drc**: `sch_Drc: SCH_Drc;`
- **sch_event**: `sch_Event: SCH_Event;`
- **sch_manufacturedata**: `sch_ManufactureData: SCH_ManufactureData;`
- **sch_net**: `sch_Net: SCH_Net;`
- **sch_netlist**: `sch_Netlist: SCH_Netlist;`
- **sch_primitive**: `sch_Primitive: SCH_Primitive;`
- **sch_primitivearc**: `sch_PrimitiveArc: SCH_PrimitiveArc;`
- **sch_primitiveattribute**: `sch_PrimitiveAttribute: SCH_PrimitiveAttribute;`
- **sch_primitivebus**: `sch_PrimitiveBus: SCH_PrimitiveBus;`
- **sch_primitivecircle**: `sch_PrimitiveCircle: SCH_PrimitiveCircle;`
- **sch_primitivecomponent**: `sch_PrimitiveComponent: SCH_PrimitiveComponent | SCH_PrimitiveComponent3;`
- **sch_primitiveobject**: `sch_PrimitiveObject: SCH_PrimitiveObject;`
- **sch_primitivepin**: `sch_PrimitivePin: SCH_PrimitivePin;`
- **sch_primitivepolygon**: `sch_PrimitivePolygon: SCH_PrimitivePolygon;`
- **sch_primitiverectangle**: `sch_PrimitiveRectangle: SCH_PrimitiveRectangle;`
- **sch_primitivetext**: `sch_PrimitiveText: SCH_PrimitiveText;`
- **sch_primitivewire**: `sch_PrimitiveWire: SCH_PrimitiveWire;`
- **sch_selectcontrol**: `sch_SelectControl: SCH_SelectControl;`
- **sch_simulationengine**: `sch_SimulationEngine: SCH_SimulationEngine;`
- **sch_utils**: `sch_Utils: SCH_Utils;`
- **sys_clienturl**: `sys_ClientUrl: SYS_ClientUrl;`
- **sys_dialog**: `sys_Dialog: SYS_Dialog;`
- **sys_environment**: `sys_Environment: SYS_Environment;`
- **sys_filemanager**: `sys_FileManager: SYS_FileManager;`
- **sys_filesystem**: `sys_FileSystem: SYS_FileSystem;`
- **sys_fontmanager**: `sys_FontManager: SYS_FontManager;`
- **sys_formatconversion**: `sys_FormatConversion: SYS_FormatConversion;`
- **sys_headermenu**: `sys_HeaderMenu: SYS_HeaderMenu;`
- **sys_i18n**: `sys_I18n: SYS_I18n;`
- **sys_iframe**: `sys_IFrame: SYS_IFrame;`
- **sys_loadingandprogressbar**: `sys_LoadingAndProgressBar: SYS_LoadingAndProgressBar;`
- **sys_log**: `sys_Log: SYS_Log;`
- **sys_message**: `sys_Message: SYS_Message;`
- **sys_messagebox**: `sys_MessageBox: SYS_MessageBox;`
- **sys_messagebus**: `sys_MessageBus: SYS_MessageBus;`
- **sys_panelcontrol**: `sys_PanelControl: SYS_PanelControl;`
- **sys_rightclickmenu**: `sys_RightClickMenu: SYS_RightClickMenu;`
- **sys_setting**: `sys_Setting: SYS_Setting;`
- **sys_shortcutkey**: `sys_ShortcutKey: SYS_ShortcutKey;`
- **sys_storage**: `sys_Storage: SYS_Storage;`
- **sys_timer**: `sys_Timer: SYS_Timer;`
- **sys_toastmessage**: `sys_ToastMessage: SYS_ToastMessage;`
- **sys_tool**: `sys_Tool: SYS_Tool;`
- **sys_unit**: `sys_Unit: SYS_Unit;`
- **sys_websocket**: `sys_WebSocket: SYS_WebSocket;`
- **sys_window**: `sys_Window: SYS_Window;`
---
## IPCB_ComplexPolygon
复杂多边形
```typescript
declare class IPCB_ComplexPolygon
```
- **addsource**: `addSource(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | Array<IPCB_Polygon>): IPCB_ComplexPolygon;`
- **getsource**: `getSource(): TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>;`
- **getsourcestrictcomplex**: `getSourceStrictComplex(): Array<TPCB_PolygonSourceArray>;`
---
## IPCB_Polygon
单多边形
```typescript
declare class IPCB_Polygon
```
- **getsource**: `getSource(): TPCB_PolygonSourceArray;`
---
## IPCB_PrimitiveArc
圆弧线图元
```typescript
declare class IPCB_PrimitiveArc implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveArc>;`
- **getadjacentprimitives**: `getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveVia | IPCB_PrimitiveArc>>;`
- **getentiretrack**: `getEntireTrack(includeVias: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;`
- **getentiretrack_1**: `getEntireTrack(includeVias: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;`
- **getstate_arcangle**: `getState_ArcAngle(): number;`
- **getstate_endx**: `getState_EndX(): number;`
- **getstate_endy**: `getState_EndY(): number;`
- **getstate_interactivemode**: `getState_InteractiveMode(): EPCB_PrimitiveArcInteractiveMode;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfLine;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_startx**: `getState_StartX(): number;`
- **getstate_starty**: `getState_StartY(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveArc>;`
- **setstate_arcangle**: `setState_ArcAngle(arcAngle: number): IPCB_PrimitiveArc;`
- **setstate_endx**: `setState_EndX(endX: number): IPCB_PrimitiveArc;`
- **setstate_endy**: `setState_EndY(endY: number): IPCB_PrimitiveArc;`
- **setstate_interactivemode**: `setState_InteractiveMode(interactiveMode: EPCB_PrimitiveArcInteractiveMode): IPCB_PrimitiveArc;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitiveArc;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveArc;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitiveArc;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveArc;`
- **setstate_startx**: `setState_StartX(startX: number): IPCB_PrimitiveArc;`
- **setstate_starty**: `setState_StartY(startY: number): IPCB_PrimitiveArc;`
- **toasync**: `toAsync(): IPCB_PrimitiveArc;`
- **tosync**: `toSync(): IPCB_PrimitiveArc;`
---
## IPCB_PrimitiveAttribute
属性图元
```typescript
declare class IPCB_PrimitiveAttribute implements IPCB_Primitive
```
- **_constructor_**: `constructor(layer: TPCB_LayersOfImage, x: number | null, y: number | null, key: string, value: string, keyVisible: boolean, valueVisible: boolean, fontFamily: string, fontSize: number, lineWidth: number, alignMode: EPCB_PrimitiveStringAlignMode, rotation: number, reverse: boolean, expansion: number, mirror: boolean, primitiveLock: boolean, primitiveId: string, parentPrimitiveId: string);`
- **getstate_alignmode**: `getState_AlignMode(): EPCB_PrimitiveStringAlignMode;`
- **getstate_expansion**: `getState_Expansion(): number;`
- **getstate_fontfamily**: `getState_FontFamily(): string;`
- **getstate_fontsize**: `getState_FontSize(): number;`
- **getstate_key**: `getState_Key(): string;`
- **getstate_keyvisible**: `getState_KeyVisible(): boolean;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfImage;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_mirror**: `getState_Mirror(): boolean;`
- **getstate_parentprimitiveid**: `getState_ParentPrimitiveId(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_reverse**: `getState_Reverse(): boolean;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_value**: `getState_Value(): string;`
- **getstate_valuevisible**: `getState_ValueVisible(): boolean;`
- **getstate_x**: `getState_X(): number | null;`
- **getstate_y**: `getState_Y(): number | null;`
- **isasync**: `isAsync(): boolean;`
- **setstate_alignmode**: `setState_AlignMode(alignMode: EPCB_PrimitiveStringAlignMode): IPCB_PrimitiveAttribute;`
- **setstate_expansion**: `setState_Expansion(expansion: number): IPCB_PrimitiveAttribute;`
- **setstate_fontfamily**: `setState_FontFamily(fontFamily: string): IPCB_PrimitiveAttribute;`
- **setstate_fontsize**: `setState_FontSize(fontSize: number): IPCB_PrimitiveAttribute;`
- **setstate_key**: `setState_Key(key: string): IPCB_PrimitiveAttribute;`
- **setstate_keyvisible**: `setState_KeyVisible(keyVisible: boolean): IPCB_PrimitiveAttribute;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveAttribute;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveAttribute;`
- **setstate_mirror**: `setState_Mirror(mirror: boolean): IPCB_PrimitiveAttribute;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveAttribute;`
- **setstate_reverse**: `setState_Reverse(reverse: boolean): IPCB_PrimitiveAttribute;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitiveAttribute;`
- **setstate_value**: `setState_Value(value: string): IPCB_PrimitiveAttribute;`
- **setstate_valuevisible**: `setState_ValueVisible(valueVisible: boolean): IPCB_PrimitiveAttribute;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitiveAttribute;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitiveAttribute;`
- **toasync**: `toAsync(): IPCB_PrimitiveAttribute;`
- **tosync**: `toSync(): IPCB_PrimitiveAttribute;`
---
## IPCB_PrimitiveComponent
器件图元
```typescript
declare class IPCB_PrimitiveComponent implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveComponent>;`
- **getallpins**: `getAllPins(): Promise<Array<IPCB_PrimitiveComponentPad>>;`
- **getstate_addintobom**: `getState_AddIntoBom(): boolean;`
- **getstate_component**: `getState_Component(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_designator**: `getState_Designator(): string | undefined;`
- **getstate_footprint**: `getState_Footprint(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfComponent;`
- **getstate_manufacturer**: `getState_Manufacturer(): string | undefined;`
- **getstate_manufacturerid**: `getState_ManufacturerId(): string | undefined;`
- **getstate_model3d**: `getState_Model3D(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_name**: `getState_Name(): string | undefined;`
- **getstate_otherproperty**: `getState_OtherProperty(): { [key: string]: string | number | boolean; } | undefined;`
- **getstate_pads**: `getState_Pads(): Array<{ primitiveId: string; net: string; padNumber: string; }> | undefined;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_supplier**: `getState_Supplier(): string | undefined;`
- **getstate_supplierid**: `getState_SupplierId(): string | undefined;`
- **getstate_uniqueid**: `getState_UniqueId(): string | undefined;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveComponent>;`
- **setstate_addintobom**: `setState_AddIntoBom(addIntoBom: boolean): IPCB_PrimitiveComponent;`
- **setstate_designator**: `setState_Designator(designator: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfComponent): IPCB_PrimitiveComponent;`
- **setstate_manufacturer**: `setState_Manufacturer(manufacturer: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_manufacturerid**: `setState_ManufacturerId(manufacturerId: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_name**: `setState_Name(name: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_otherproperty**: `setState_OtherProperty(otherProperty: { [key: string]: string | number | boolean; }): IPCB_PrimitiveComponent;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveComponent;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitiveComponent;`
- **setstate_supplier**: `setState_Supplier(supplier: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_supplierid**: `setState_SupplierId(supplierId: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_uniqueid**: `setState_UniqueId(uniqueId: string | undefined): IPCB_PrimitiveComponent;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitiveComponent;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitiveComponent;`
- **toasync**: `toAsync(): IPCB_PrimitiveComponent;`
- **tosync**: `toSync(): IPCB_PrimitiveComponent;`
---
## IPCB_PrimitiveComponentPad
器件焊盘图元
```typescript
declare class IPCB_PrimitiveComponentPad extends IPCB_PrimitivePad
```
- **done**: `done(): Promise<IPCB_PrimitiveComponentPad>;`
- **getconnectedprimitives**: `getConnectedPrimitives(onlyCentreConnection: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;`
- **getconnectedprimitives_1**: `getConnectedPrimitives(onlyCentreConnection: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia | IPCB_PrimitivePolyline | IPCB_PrimitiveFill>>;`
- **getstate_parentcomponentprimitiveid**: `getState_ParentComponentPrimitiveId(): string;`
- **primitivetype**: `protected readonly primitiveType: EPCB_PrimitiveType.COMPONENT_PAD;`
- **setstate_parentcomponentprimitiveid**: `setState_ParentComponentPrimitiveId(): IPCB_PrimitiveComponentPad;`
---
## IPCB_PrimitiveDimension
尺寸标注图元
```typescript
declare class IPCB_PrimitiveDimension implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveDimension>;`
- **getstate_coordinateset**: `getState_CoordinateSet(): TPCB_PrimitiveDimensionCoordinateSet;`
- **getstate_dimensiontype**: `getState_DimensionType(): EPCB_PrimitiveDimensionType;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfDimension;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_precision**: `getState_Precision(): number;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_textfollow**: `getState_TextFollow(): 0 | 1;`
- **getstate_unit**: `getState_Unit(): ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveDimension>;`
- **setstate_coordinateset**: `setState_CoordinateSet(coordinateSet: TPCB_PrimitiveDimensionCoordinateSet): IPCB_PrimitiveDimension;`
- **setstate_dimensiontype**: `setState_DimensionType(dimensionType: EPCB_PrimitiveDimensionType): IPCB_PrimitiveDimension;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfDimension): IPCB_PrimitiveDimension;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveDimension;`
- **setstate_precision**: `setState_Precision(precision: number): IPCB_PrimitiveDimension;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveDimension;`
- **setstate_unit**: `setState_Unit(unit: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL): IPCB_PrimitiveDimension;`
- **toasync**: `toAsync(): IPCB_PrimitiveDimension;`
- **tosync**: `toSync(): IPCB_PrimitiveDimension;`
---
## IPCB_PrimitiveFill
填充图元
```typescript
declare class IPCB_PrimitiveFill implements IPCB_Primitive
```
- **converttopolyline**: `convertToPolyline(): Promise<IPCB_PrimitivePolyline>;`
- **converttopour**: `convertToPour(): Promise<IPCB_PrimitivePour>;`
- **converttoregion**: `convertToRegion(): Promise<IPCB_PrimitiveRegion>;`
- **done**: `done(): Promise<IPCB_PrimitiveFill>;`
- **getstate_complexpolygon**: `getState_ComplexPolygon(): IPCB_Polygon;`
- **getstate_fillmode**: `getState_FillMode(): EPCB_PrimitiveFillMode | undefined;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfFill;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_net**: `getState_Net(): string | undefined;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveFill>;`
- **setstate_complexpolygon**: `setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitiveFill;`
- **setstate_fillmode**: `setState_FillMode(fillMode: EPCB_PrimitiveFillMode): IPCB_PrimitiveFill;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfFill): IPCB_PrimitiveFill;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveFill;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitiveFill;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveFill;`
- **toasync**: `toAsync(): IPCB_PrimitiveFill;`
- **tosync**: `toSync(): IPCB_PrimitiveFill;`
---
## IPCB_PrimitiveImage
图像图元
```typescript
declare class IPCB_PrimitiveImage implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveImage>;`
- **getstate_complexpolygon**: `getState_ComplexPolygon(): TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>;`
- **getstate_height**: `getState_Height(): number;`
- **getstate_horizonmirror**: `getState_HorizonMirror(): boolean;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfImage;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_width**: `getState_Width(): number;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveImage>;`
- **setstate_height**: `setState_Height(height: number): IPCB_PrimitiveImage;`
- **setstate_horizonmirror**: `setState_HorizonMirror(horizonMirror: boolean): IPCB_PrimitiveImage;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveImage;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveImage;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitiveImage;`
- **setstate_width**: `setState_Width(width: number): IPCB_PrimitiveImage;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitiveImage;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitiveImage;`
- **toasync**: `toAsync(): IPCB_PrimitiveImage;`
- **tosync**: `toSync(): IPCB_PrimitiveImage;`
---
## IPCB_PrimitiveLine
直线图元
```typescript
declare class IPCB_PrimitiveLine implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveLine>;`
- **getadjacentprimitives**: `getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveVia | IPCB_PrimitiveArc>>;`
- **getentiretrack**: `getEntireTrack(includeVias: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;`
- **getentiretrack_1**: `getEntireTrack(includeVias: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;`
- **getstate_endx**: `getState_EndX(): number;`
- **getstate_endy**: `getState_EndY(): number;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfLine;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_startx**: `getState_StartX(): number;`
- **getstate_starty**: `getState_StartY(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveLine>;`
- **setstate_endx**: `setState_EndX(endX: number): IPCB_PrimitiveLine;`
- **setstate_endy**: `setState_EndY(endY: number): IPCB_PrimitiveLine;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitiveLine;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveLine;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitiveLine;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveLine;`
- **setstate_startx**: `setState_StartX(startX: number): IPCB_PrimitiveLine;`
- **setstate_starty**: `setState_StartY(startY: number): IPCB_PrimitiveLine;`
- **toasync**: `toAsync(): IPCB_PrimitiveLine;`
- **tosync**: `toSync(): IPCB_PrimitiveLine;`
---
## IPCB_PrimitiveObject
二进制内嵌对象图元
```typescript
declare class IPCB_PrimitiveObject implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveObject>;`
- **getstate_binarydata**: `getState_BinaryData(): string;`
- **getstate_filename**: `getState_FileName(): string;`
- **getstate_height**: `getState_Height(): number;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfObject | undefined;`
- **getstate_mirror**: `getState_Mirror(): boolean;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_topleftx**: `getState_TopLeftX(): number | undefined;`
- **getstate_toplefty**: `getState_TopLeftY(): number | undefined;`
- **getstate_width**: `getState_Width(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveObject>;`
- **setstate_binarydata**: `setState_BinaryData(binaryData: string): IPCB_PrimitiveObject;`
- **setstate_filename**: `setState_FileName(fileName: string): IPCB_PrimitiveObject;`
- **setstate_height**: `setState_Height(height: number): IPCB_PrimitiveObject;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfObject): IPCB_PrimitiveObject;`
- **setstate_mirror**: `setState_Mirror(mirror: boolean): IPCB_PrimitiveObject;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveObject;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitiveObject;`
- **setstate_topleftx**: `setState_TopLeftX(topLeftX: number): IPCB_PrimitiveObject;`
- **setstate_toplefty**: `setState_TopLeftY(topLeftY: number): IPCB_PrimitiveObject;`
- **setstate_width**: `setState_Width(width: number): IPCB_PrimitiveObject;`
- **toasync**: `toAsync(): IPCB_PrimitiveObject;`
- **tosync**: `toSync(): IPCB_PrimitiveObject;`
---
## IPCB_PrimitivePad
焊盘图元
```typescript
declare class IPCB_PrimitivePad implements IPCB_Primitive
```
- **async**: `protected async: boolean;`
- **create**: `create(): Promise<IPCB_PrimitivePad>;`
- **done**: `done(): Promise<IPCB_PrimitivePad>;`
- **getstate_heatwelding**: `getState_HeatWelding(): IPCB_PrimitivePadHeatWelding | null;`
- **getstate_hole**: `getState_Hole(): TPCB_PrimitivePadHole | null;`
- **getstate_holeoffsetx**: `getState_HoleOffsetX(): number;`
- **getstate_holeoffsety**: `getState_HoleOffsetY(): number;`
- **getstate_holerotation**: `getState_HoleRotation(): number;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfPad;`
- **getstate_metallization**: `getState_Metallization(): boolean;`
- **getstate_net**: `getState_Net(): string | undefined;`
- **getstate_pad**: `getState_Pad(): TPCB_PrimitivePadShape | undefined;`
- **getstate_padnumber**: `getState_PadNumber(): string;`
- **getstate_padtype**: `getState_PadType(): EPCB_PrimitivePadType;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_soldermaskandpastemaskexpansion**: `getState_SolderMaskAndPasteMaskExpansion(): IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;`
- **getstate_specialpad**: `getState_SpecialPad(): TPCB_PrimitiveSpecialPadShape | undefined;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **heatwelding**: `protected heatWelding: IPCB_PrimitivePadHeatWelding | null;`
- **hole**: `protected hole: TPCB_PrimitivePadHole | null;`
- **holeoffsetx**: `protected holeOffsetX: number;`
- **holeoffsety**: `protected holeOffsetY: number;`
- **holerotation**: `protected holeRotation: number;`
- **isasync**: `isAsync(): boolean;`
- **layer**: `protected layer: TPCB_LayersOfPad;`
- **metallization**: `protected metallization: boolean;`
- **net**: `protected net?: string;`
- **pad**: `protected pad?: TPCB_PrimitivePadShape;`
- **padnumber**: `protected padNumber: string;`
- **padtype**: `protected padType: EPCB_PrimitivePadType;`
- **primitiveid**: `protected primitiveId?: string;`
- **primitivelock**: `protected primitiveLock: boolean;`
- **primitivetype**: `protected readonly primitiveType: EPCB_PrimitiveType;`
- **reset**: `reset(): Promise<IPCB_PrimitivePad>;`
- **rotation**: `protected rotation: number;`
- **setstate_heatwelding**: `setState_HeatWelding(heatWelding: IPCB_PrimitivePadHeatWelding | null): IPCB_PrimitivePad;`
- **setstate_hole**: `setState_Hole(hole: TPCB_PrimitivePadHole): IPCB_PrimitivePad;`
- **setstate_holeoffsetx**: `setState_HoleOffsetX(holeOffsetX: number): IPCB_PrimitivePad;`
- **setstate_holeoffsety**: `setState_HoleOffsetY(holeOffsetY: number): IPCB_PrimitivePad;`
- **setstate_holerotation**: `setState_HoleRotation(holeRotation: number): IPCB_PrimitivePad;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfPad): IPCB_PrimitivePad;`
- **setstate_metallization**: `setState_Metallization(metallization: boolean): IPCB_PrimitivePad;`
- **setstate_net**: `setState_Net(net?: string): IPCB_PrimitivePad;`
- **setstate_pad**: `setState_Pad(pad: TPCB_PrimitivePadShape): IPCB_PrimitivePad;`
- **setstate_padnumber**: `setState_PadNumber(padNumber: string): IPCB_PrimitivePad;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePad;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitivePad;`
- **setstate_soldermaskandpastemaskexpansion**: `setState_SolderMaskAndPasteMaskExpansion(solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null): IPCB_PrimitivePad;`
- **setstate_specialpad**: `setState_SpecialPad(specialPad: TPCB_PrimitiveSpecialPadShape): IPCB_PrimitivePad;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitivePad;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitivePad;`
- **soldermaskandpastemaskexpansion**: `protected solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;`
- **specialpad**: `protected specialPad?: TPCB_PrimitiveSpecialPadShape;`
- **toasync**: `toAsync(): IPCB_PrimitivePad;`
- **tosync**: `toSync(): IPCB_PrimitivePad;`
- **x**: `protected x: number;`
- **y**: `protected y: number;`
---
## IPCB_PrimitivePolyline
折线图元
```typescript
declare class IPCB_PrimitivePolyline implements IPCB_Primitive
```
- **converttofill**: `convertToFill(): Promise<IPCB_PrimitiveFill>;`
- **converttopour**: `convertToPour(): Promise<IPCB_PrimitivePour>;`
- **converttoregion**: `convertToRegion(): Promise<IPCB_PrimitiveRegion>;`
- **done**: `done(): Promise<IPCB_PrimitivePolyline>;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfLine;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_polygon**: `getState_Polygon(): IPCB_Polygon;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitivePolyline>;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitivePolyline;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitivePolyline;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitivePolyline;`
- **setstate_polygon**: `setState_Polygon(polygon: IPCB_Polygon): IPCB_PrimitivePolyline;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePolyline;`
- **toasync**: `toAsync(): IPCB_PrimitivePolyline;`
- **tosync**: `toSync(): IPCB_PrimitivePolyline;`
---
## IPCB_PrimitivePour
覆铜边框图元
```typescript
declare class IPCB_PrimitivePour implements IPCB_Primitive
```
- **converttofill**: `convertToFill(): Promise<IPCB_PrimitiveFill>;`
- **converttopolyline**: `convertToPolyline(): Promise<IPCB_PrimitivePolyline>;`
- **converttoregion**: `convertToRegion(): Promise<IPCB_PrimitiveRegion>;`
- **done**: `done(): Promise<IPCB_PrimitivePour>;`
- **getstate_complexpolygon**: `getState_ComplexPolygon(): IPCB_Polygon;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfCopper;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_pourfillmethod**: `getState_PourFillMethod(): any;`
- **getstate_pourname**: `getState_PourName(): string;`
- **getstate_pourpriority**: `getState_PourPriority(): number;`
- **getstate_preservesilos**: `getState_PreserveSilos(): boolean;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitivePour>;`
- **setstate_complexpolygon**: `setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitivePour;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfCopper): IPCB_PrimitivePour;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitivePour;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitivePour;`
- **setstate_pourfillmethod**: `setState_PourFillMethod(pourFillMethod: EPCB_PrimitivePourFillMethod): IPCB_PrimitivePour;`
- **setstate_pourname**: `setState_PourName(pourName: string): IPCB_PrimitivePour;`
- **setstate_pourpriority**: `setState_PourPriority(pourPriority: number): IPCB_PrimitivePour;`
- **setstate_preservesilos**: `setState_PreserveSilos(preserveSilos: boolean): IPCB_PrimitivePour;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePour;`
- **toasync**: `toAsync(): IPCB_PrimitivePour;`
- **tosync**: `toSync(): IPCB_PrimitivePour;`
---
## IPCB_PrimitivePoured
覆铜填充图元
```typescript
declare class IPCB_PrimitivePoured implements IPCB_Primitive
```
- **addsoldermaskfill**: `addSolderMaskFill(pourFillId: IPCB_PrimitivePouredPourFill['id']): Promise<IPCB_PrimitiveFill | undefined>;`
- **converttofill**: `convertToFill(pourFillId: IPCB_PrimitivePouredPourFill['id']): Promise<IPCB_PrimitiveFill | undefined>;`
- **deletepourfills**: `deletePourFills(pourFillIds: IPCB_PrimitivePouredPourFill['id'] | Array<IPCB_PrimitivePouredPourFill['id']>): Promise<boolean>;`
- **getstate_pourfills**: `getState_PourFills(): Array<IPCB_PrimitivePouredPourFill>;`
- **getstate_pourprimitiveid**: `getState_PourPrimitiveId(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
---
## IPCB_PrimitiveRegion
区域图元
```typescript
declare class IPCB_PrimitiveRegion implements IPCB_Primitive
```
- **converttofill**: `convertToFill(): Promise<IPCB_PrimitiveFill>;`
- **converttopolyline**: `convertToPolyline(): Promise<IPCB_PrimitivePolyline>;`
- **converttopour**: `convertToPour(): Promise<IPCB_PrimitivePour>;`
- **done**: `done(): Promise<IPCB_PrimitiveRegion>;`
- **getstate_complexpolygon**: `getState_ComplexPolygon(): IPCB_Polygon;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfRegion;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_regionname**: `getState_RegionName(): string | undefined;`
- **getstate_ruletype**: `getState_RuleType(): Array<EPCB_PrimitiveRegionRuleType>;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveRegion>;`
- **setstate_complexpolygon**: `setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitiveRegion;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfRegion): IPCB_PrimitiveRegion;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveRegion;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveRegion;`
- **setstate_regionname**: `setState_RegionName(regionName?: string): IPCB_PrimitiveRegion;`
- **setstate_ruletype**: `setState_RuleType(ruleType: Array<EPCB_PrimitiveRegionRuleType>): IPCB_PrimitiveRegion;`
- **toasync**: `toAsync(): IPCB_PrimitiveRegion;`
- **tosync**: `toSync(): IPCB_PrimitiveRegion;`
---
## IPCB_PrimitiveString
文本图元
```typescript
declare class IPCB_PrimitiveString implements IPCB_Primitive
```
- **_constructor_**: `constructor(layer: TPCB_LayersOfImage, x: number, y: number, text: string, fontFamily?: string, fontSize?: number, lineWidth?: number, alignMode?: EPCB_PrimitiveStringAlignMode, rotation?: number, reverse?: boolean, expansion?: number, mirror?: boolean, primitiveLock?: boolean, primitiveId?: string);`
- **getstate_alignmode**: `getState_AlignMode(): EPCB_PrimitiveStringAlignMode;`
- **getstate_expansion**: `getState_Expansion(): number;`
- **getstate_fontfamily**: `getState_FontFamily(): string;`
- **getstate_fontsize**: `getState_FontSize(): number;`
- **getstate_layer**: `getState_Layer(): TPCB_LayersOfImage;`
- **getstate_linewidth**: `getState_LineWidth(): number;`
- **getstate_mirror**: `getState_Mirror(): boolean;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_reverse**: `getState_Reverse(): boolean;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_text**: `getState_Text(): string;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **setstate_alignmode**: `setState_AlignMode(alignMode: EPCB_PrimitiveStringAlignMode): IPCB_PrimitiveString;`
- **setstate_expansion**: `setState_Expansion(expansion: number): IPCB_PrimitiveString;`
- **setstate_fontfamily**: `setState_FontFamily(fontFamily: string): IPCB_PrimitiveString;`
- **setstate_fontsize**: `setState_FontSize(fontSize: number): IPCB_PrimitiveString;`
- **setstate_layer**: `setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveString;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number): IPCB_PrimitiveString;`
- **setstate_mirror**: `setState_Mirror(mirror: boolean): IPCB_PrimitiveString;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveString;`
- **setstate_reverse**: `setState_Reverse(reverse: boolean): IPCB_PrimitiveString;`
- **setstate_rotation**: `setState_Rotation(rotation: number): IPCB_PrimitiveString;`
- **setstate_text**: `setState_Text(text: string): IPCB_PrimitiveString;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitiveString;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitiveString;`
- **toasync**: `toAsync(): IPCB_PrimitiveString;`
- **tosync**: `toSync(): IPCB_PrimitiveString;`
---
## IPCB_PrimitiveVia
过孔图元
```typescript
declare class IPCB_PrimitiveVia implements IPCB_Primitive
```
- **done**: `done(): Promise<IPCB_PrimitiveVia>;`
- **getadjacentprimitives**: `getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;`
- **getstate_designruleblindvianame**: `getState_DesignRuleBlindViaName(): string | null;`
- **getstate_diameter**: `getState_Diameter(): number;`
- **getstate_holediameter**: `getState_HoleDiameter(): number;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivelock**: `getState_PrimitiveLock(): boolean;`
- **getstate_primitivetype**: `getState_PrimitiveType(): EPCB_PrimitiveType;`
- **getstate_soldermaskexpansion**: `getState_SolderMaskExpansion(): IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;`
- **getstate_viatype**: `getState_ViaType(): EPCB_PrimitiveViaType;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<IPCB_PrimitiveVia>;`
- **setstate_designruleblindvianame**: `setState_DesignRuleBlindViaName(designRuleBlindViaName: string | null): IPCB_PrimitiveVia;`
- **setstate_diameter**: `setState_Diameter(diameter: number): IPCB_PrimitiveVia;`
- **setstate_holediameter**: `setState_HoleDiameter(holeDiameter: number): IPCB_PrimitiveVia;`
- **setstate_net**: `setState_Net(net: string): IPCB_PrimitiveVia;`
- **setstate_primitivelock**: `setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveVia;`
- **setstate_soldermaskexpansion**: `setState_SolderMaskExpansion(solderMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null): IPCB_PrimitiveVia;`
- **setstate_viatype**: `setState_ViaType(viaType: EPCB_PrimitiveViaType): IPCB_PrimitiveVia;`
- **setstate_x**: `setState_X(x: number): IPCB_PrimitiveVia;`
- **setstate_y**: `setState_Y(y: number): IPCB_PrimitiveVia;`
- **toasync**: `toAsync(): IPCB_PrimitiveVia;`
- **tosync**: `toSync(): IPCB_PrimitiveVia;`
---
## ISCH_PrimitiveArc
圆弧图元
```typescript
declare class ISCH_PrimitiveArc implements ISCH_Primitive
```
- **done**: `done(): Promise<ISCH_PrimitiveArc>;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_endx**: `getState_EndX(): number;`
- **getstate_endy**: `getState_EndY(): number;`
- **getstate_fillcolor**: `getState_FillColor(): string | null;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_referencex**: `getState_ReferenceX(): number;`
- **getstate_referencey**: `getState_ReferenceY(): number;`
- **getstate_startx**: `getState_StartX(): number;`
- **getstate_starty**: `getState_StartY(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitiveArc>;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveArc;`
- **setstate_endx**: `setState_EndX(endX: number): ISCH_PrimitiveArc;`
- **setstate_endy**: `setState_EndY(endY: number): ISCH_PrimitiveArc;`
- **setstate_fillcolor**: `setState_FillColor(fillColor: string | null): ISCH_PrimitiveArc;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveArc;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveArc;`
- **setstate_referencex**: `setState_ReferenceX(referenceX: number): ISCH_PrimitiveArc;`
- **setstate_referencey**: `setState_ReferenceY(referenceY: number): ISCH_PrimitiveArc;`
- **setstate_startx**: `setState_StartX(startX: number): ISCH_PrimitiveArc;`
- **setstate_starty**: `setState_StartY(startY: number): ISCH_PrimitiveArc;`
- **toasync**: `toAsync(): ISCH_PrimitiveArc;`
- **tosync**: `toSync(): ISCH_PrimitiveArc;`
---
## ISCH_PrimitiveAttribute
属性图元
```typescript
declare class ISCH_PrimitiveAttribute implements ISCH_Primitive
```
- **done**: `done(): Promise<ISCH_PrimitiveAttribute>;`
- **getstate_alignmode**: `getState_AlignMode(): ESCH_PrimitiveTextAlignMode | null;`
- **getstate_bold**: `getState_Bold(): boolean | null;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_fillcolor**: `getState_FillColor(): string | null;`
- **getstate_fontname**: `getState_FontName(): string | null;`
- **getstate_fontsize**: `getState_FontSize(): number | null;`
- **getstate_italic**: `getState_Italic(): boolean | null;`
- **getstate_key**: `getState_Key(): string;`
- **getstate_keyvisible**: `getState_KeyVisible(): boolean | null;`
- **getstate_parentprimitiveid**: `getState_ParentPrimitiveId(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number | null;`
- **getstate_underline**: `getState_UnderLine(): boolean | null;`
- **getstate_value**: `getState_Value(): string;`
- **getstate_valuevisible**: `getState_ValueVisible(): boolean | null;`
- **getstate_x**: `getState_X(): number | null;`
- **getstate_y**: `getState_Y(): number | null;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitiveAttribute>;`
- **setstate_alignmode**: `setState_AlignMode(alignMode: ESCH_PrimitiveTextAlignMode | null): ISCH_PrimitiveAttribute;`
- **setstate_bold**: `setState_Bold(bold: boolean | null): ISCH_PrimitiveAttribute;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveAttribute;`
- **setstate_fillcolor**: `setState_FillColor(fillColor: string | null): ISCH_PrimitiveAttribute;`
- **setstate_fontname**: `setState_FontName(fontName: string | null): ISCH_PrimitiveAttribute;`
- **setstate_fontsize**: `setState_FontSize(fontSize: number | null): ISCH_PrimitiveAttribute;`
- **setstate_italic**: `setState_Italic(italic: boolean | null): ISCH_PrimitiveAttribute;`
- **setstate_key**: `setState_Key(key: string): ISCH_PrimitiveAttribute;`
- **setstate_keyvisible**: `setState_KeyVisible(keyVisible: boolean | null): ISCH_PrimitiveAttribute;`
- **setstate_rotation**: `setState_Rotation(rotation: number | null): ISCH_PrimitiveAttribute;`
- **setstate_underline**: `setState_UnderLine(underLine: boolean | null): ISCH_PrimitiveAttribute;`
- **setstate_value**: `setState_Value(value: string): ISCH_PrimitiveAttribute;`
- **setstate_valuevisible**: `setState_ValueVisible(valueVisible: boolean | null): ISCH_PrimitiveAttribute;`
- **setstate_x**: `setState_X(x: number | null): ISCH_PrimitiveAttribute;`
- **setstate_y**: `setState_Y(y: number | null): ISCH_PrimitiveAttribute;`
- **toasync**: `toAsync(): ISCH_PrimitiveAttribute;`
- **tosync**: `toSync(): ISCH_PrimitiveAttribute;`
---
## ISCH_PrimitiveBus
总线图元
```typescript
declare class ISCH_PrimitiveBus implements ISCH_Primitive
```
- **done**: `done(): Promise<ISCH_PrimitiveBus>;`
- **getstate_busname**: `getState_BusName(): string;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_line**: `getState_Line(): Array<number> | Array<Array<number>>;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **setstate_busname**: `setState_BusName(busName: string): ISCH_PrimitiveBus;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveBus;`
- **setstate_line**: `setState_Line(line: Array<number> | Array<Array<number>>): ISCH_PrimitiveBus;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveBus;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveBus;`
- **toasync**: `toAsync(): ISCH_PrimitiveBus;`
- **tosync**: `toSync(): ISCH_PrimitiveBus;`
---
## ISCH_PrimitiveCbbSymbolComponent
复用模块符号图元
```typescript
declare class ISCH_PrimitiveCbbSymbolComponent extends ISCH_PrimitiveComponent
```
- **getstate_cbb**: `getState_Cbb(): { libraryUuid: string; uuid: string; };`
- **getstate_cbbsymbol**: `getState_CbbSymbol(): { libraryUuid: string; cbbUuid: string; uuid?: string; name?: string; };`
---
## ISCH_PrimitiveCircle
圆图元
```typescript
declare class ISCH_PrimitiveCircle implements ISCH_Primitive
```
- **done**: `done(): ISCH_PrimitiveCircle;`
- **getstate_centerx**: `getState_CenterX(): number;`
- **getstate_centery**: `getState_CenterY(): number;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_fillcolor**: `getState_FillColor(): string | null;`
- **getstate_fillstyle**: `getState_FillStyle(): ESCH_PrimitiveFillStyle | null;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_radius**: `getState_Radius(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitiveCircle>;`
- **setstate_centerx**: `setState_CenterX(centerX: number): ISCH_PrimitiveCircle;`
- **setstate_centery**: `setState_CenterY(centerY: number): ISCH_PrimitiveCircle;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveCircle;`
- **setstate_fillcolor**: `setState_FillColor(fillColor: string | null): ISCH_PrimitiveCircle;`
- **setstate_fillstyle**: `setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveCircle;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveCircle;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveCircle;`
- **setstate_radius**: `setState_Radius(radius: number): ISCH_PrimitiveCircle;`
- **toasync**: `toAsync(): ISCH_PrimitiveCircle;`
- **tosync**: `toSync(): ISCH_PrimitiveCircle;`
---
## ISCH_PrimitiveComponent
器件图元
```typescript
declare class ISCH_PrimitiveComponent implements ISCH_Primitive
```
- **async**: `protected async: boolean;`
- **designator**: `protected designator?: string;`
- **done**: `done(): Promise<ISCH_PrimitiveComponent>;`
- **getstate_addintobom**: `getState_AddIntoBom(): boolean | undefined;`
- **getstate_addintopcb**: `getState_AddIntoPcb(): boolean | undefined;`
- **getstate_component**: `getState_Component(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_componenttype**: `getState_ComponentType(): ESCH_PrimitiveComponentType;`
- **getstate_designator**: `getState_Designator(): string | undefined;`
- **getstate_footprint**: `getState_Footprint(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_manufacturer**: `getState_Manufacturer(): string | undefined;`
- **getstate_manufacturerid**: `getState_ManufacturerId(): string | undefined;`
- **getstate_mirror**: `getState_Mirror(): boolean;`
- **getstate_name**: `getState_Name(): string | undefined;`
- **getstate_net**: `getState_Net(): string | undefined;`
- **getstate_otherproperty**: `getState_OtherProperty(): { [key: string]: string | number | boolean; } | undefined;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_subpartname**: `getState_SubPartName(): string | undefined;`
- **getstate_supplier**: `getState_Supplier(): string | undefined;`
- **getstate_supplierid**: `getState_SupplierId(): string | undefined;`
- **getstate_symbol**: `getState_Symbol(): { libraryUuid: string; uuid: string; name?: string; } | undefined;`
- **getstate_uniqueid**: `getState_UniqueId(): string | undefined;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **mirror**: `protected mirror: boolean;`
- **name**: `protected name?: string;`
- **otherproperty**: `protected otherProperty?: { [key: string]: string | number | boolean; };`
- **primitiveid**: `protected primitiveId?: string;`
- **reset**: `reset(): Promise<ISCH_PrimitiveComponent>;`
- **rotation**: `protected rotation: number;`
- **setstate_addintobom**: `setState_AddIntoBom(addIntoBom: boolean | undefined): ISCH_PrimitiveComponent;`
- **setstate_addintopcb**: `setState_AddIntoPcb(addIntoPcb: boolean | undefined): ISCH_PrimitiveComponent;`
- **setstate_designator**: `setState_Designator(designator: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_manufacturer**: `setState_Manufacturer(manufacturer: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_manufacturerid**: `setState_ManufacturerId(manufacturerId: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_mirror**: `setState_Mirror(mirror: boolean): ISCH_PrimitiveComponent;`
- **setstate_name**: `setState_Name(name: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_net**: `setState_Net(net: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_otherproperty**: `setState_OtherProperty(otherProperty: { [key: string]: string | number | boolean; }): ISCH_PrimitiveComponent;`
- **setstate_rotation**: `setState_Rotation(rotation: number): ISCH_PrimitiveComponent;`
- **setstate_supplier**: `setState_Supplier(supplier: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_supplierid**: `setState_SupplierId(supplierId: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_uniqueid**: `setState_UniqueId(uniqueId: string | undefined): ISCH_PrimitiveComponent;`
- **setstate_x**: `setState_X(x: number): ISCH_PrimitiveComponent;`
- **setstate_y**: `setState_Y(y: number): ISCH_PrimitiveComponent;`
- **toasync**: `toAsync(): ISCH_PrimitiveComponent;`
- **tosync**: `toSync(): ISCH_PrimitiveComponent;`
- **x**: `protected x: number;`
- **y**: `protected y: number;`
---
## ISCH_PrimitiveComponentPin
器件引脚图元
```typescript
declare class ISCH_PrimitiveComponentPin extends ISCH_PrimitivePin
```
- **getstate_noconnected**: `getState_NoConnected(): boolean;`
- **primitivetype**: `protected readonly primitiveType: ESCH_PrimitiveType.COMPONENT_PIN;`
- **setstate_noconnected**: `setState_NoConnected(noConnected: boolean): ISCH_PrimitiveComponentPin;`
---
## ISCH_PrimitivePin
引脚图元
```typescript
declare class ISCH_PrimitivePin implements ISCH_Primitive
```
- **async**: `protected async: boolean;`
- **done**: `done(): Promise<ISCH_PrimitivePin>;`
- **getstate_otherproperty**: `getState_OtherProperty(): { [key: string]: string | number | boolean; } | undefined;`
- **getstate_pincolor**: `getState_PinColor(): string | null;`
- **getstate_pinlength**: `getState_PinLength(): number;`
- **getstate_pinname**: `getState_PinName(): string;`
- **getstate_pinnumber**: `getState_PinNumber(): string;`
- **getstate_pinshape**: `getState_PinShape(): ESCH_PrimitivePinShape;`
- **getstate_pintype**: `getState_pinType(): ESCH_PrimitivePinType;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **pincolor**: `protected pinColor: string | null;`
- **pinlength**: `protected pinLength: number;`
- **pinname**: `protected pinName: string;`
- **pinnumber**: `protected pinNumber: string;`
- **pinshape**: `protected pinShape: ESCH_PrimitivePinShape;`
- **pintype**: `protected pinType: ESCH_PrimitivePinType;`
- **primitiveid**: `protected primitiveId?: string;`
- **primitivetype**: `protected readonly primitiveType: ESCH_PrimitiveType;`
- **reset**: `reset(): Promise<ISCH_PrimitivePin>;`
- **rotation**: `protected rotation: number;`
- **setstate_otherproperty**: `setState_OtherProperty(otherProperty: { [key: string]: string | number | boolean; }): ISCH_PrimitivePin;`
- **setstate_pincolor**: `setState_PinColor(pinColor: string | null): ISCH_PrimitivePin;`
- **setstate_pinlength**: `setState_PinLength(pinLength: number): ISCH_PrimitivePin;`
- **setstate_pinname**: `setState_PinName(pinName: string): ISCH_PrimitivePin;`
- **setstate_pinnumber**: `setState_PinNumber(pinNumber: string): ISCH_PrimitivePin;`
- **setstate_pinshape**: `setState_PinShape(pinShape: ESCH_PrimitivePinShape): ISCH_PrimitivePin;`
- **setstate_pintype**: `setState_PinType(pinType: ESCH_PrimitivePinType): ISCH_PrimitivePin;`
- **setstate_rotation**: `setState_Rotation(rotation: number): ISCH_PrimitivePin;`
- **setstate_x**: `setState_X(x: number): ISCH_PrimitivePin;`
- **setstate_y**: `setState_Y(y: number): ISCH_PrimitivePin;`
- **toasync**: `toAsync(): ISCH_PrimitivePin;`
- **tosync**: `toSync(): ISCH_PrimitivePin;`
- **x**: `protected x: number;`
- **y**: `protected y: number;`
---
## ISCH_PrimitivePolygon
多边形(折线)图元
```typescript
declare class ISCH_PrimitivePolygon implements ISCH_Primitive
```
- **done**: `done(): ISCH_PrimitivePolygon;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_fillcolor**: `getState_FillColor(): string | null;`
- **getstate_line**: `getState_Line(): Array<number>;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitivePolygon>;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitivePolygon;`
- **setstate_fillcolor**: `setState_FillColor(fillColor: string | null): ISCH_PrimitivePolygon;`
- **setstate_line**: `setState_Line(line: Array<number>): ISCH_PrimitivePolygon;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitivePolygon;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitivePolygon;`
- **toasync**: `toAsync(): ISCH_PrimitivePolygon;`
- **tosync**: `toSync(): ISCH_PrimitivePolygon;`
---
## ISCH_PrimitiveRectangle
矩形图元
```typescript
declare class ISCH_PrimitiveRectangle implements ISCH_Primitive
```
- **done**: `done(): ISCH_PrimitiveRectangle;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_cornerradius**: `getState_CornerRadius(): number;`
- **getstate_fillcolor**: `getState_FillColor(): string | null;`
- **getstate_fillstyle**: `getState_FillStyle(): ESCH_PrimitiveFillStyle | null;`
- **getstate_height**: `getState_Height(): number;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_topleftx**: `getState_TopLeftX(): number;`
- **getstate_toplefty**: `getState_TopLeftY(): number;`
- **getstate_width**: `getState_Width(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitiveRectangle>;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveRectangle;`
- **setstate_cornerradius**: `setState_CornerRadius(cornerRadius: number): ISCH_PrimitiveRectangle;`
- **setstate_fillcolor**: `setState_FillColor(fillColor: string | null): ISCH_PrimitiveRectangle;`
- **setstate_fillstyle**: `setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveRectangle;`
- **setstate_height**: `setState_Height(height: number): ISCH_PrimitiveRectangle;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveRectangle;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveRectangle;`
- **setstate_rotation**: `setState_Rotation(rotation: number): ISCH_PrimitiveRectangle;`
- **setstate_topleftx**: `setState_TopLeftX(topLeftX: number): ISCH_PrimitiveRectangle;`
- **setstate_toplefty**: `setState_TopLeftY(topLeftY: number): ISCH_PrimitiveRectangle;`
- **setstate_width**: `setState_Width(width: number): ISCH_PrimitiveRectangle;`
- **toasync**: `toAsync(): ISCH_PrimitiveRectangle;`
- **tosync**: `toSync(): ISCH_PrimitiveRectangle;`
---
## ISCH_PrimitiveText
文本图元
```typescript
declare class ISCH_PrimitiveText implements ISCH_Primitive
```
- **done**: `done(): Promise<ISCH_PrimitiveText>;`
- **getstate_alignmode**: `getState_AlignMode(): ESCH_PrimitiveTextAlignMode;`
- **getstate_bold**: `getState_Bold(): boolean;`
- **getstate_content**: `getState_Content(): string;`
- **getstate_fontname**: `getState_FontName(): string | null;`
- **getstate_fontsize**: `getState_FontSize(): number | null;`
- **getstate_italic**: `getState_Italic(): boolean;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **getstate_rotation**: `getState_Rotation(): number;`
- **getstate_textcolor**: `getState_TextColor(): string | null;`
- **getstate_underline**: `getState_UnderLine(): boolean;`
- **getstate_x**: `getState_X(): number;`
- **getstate_y**: `getState_Y(): number;`
- **isasync**: `isAsync(): boolean;`
- **reset**: `reset(): Promise<ISCH_PrimitiveText>;`
- **setstate_alignmode**: `setState_AlignMode(alignMode: ESCH_PrimitiveTextAlignMode): ISCH_PrimitiveText;`
- **setstate_bold**: `setState_Bold(bold: boolean): ISCH_PrimitiveText;`
- **setstate_content**: `setState_Content(content: string): ISCH_PrimitiveText;`
- **setstate_fontname**: `setState_FontName(fontName: string | null): ISCH_PrimitiveText;`
- **setstate_fontsize**: `setState_FontSize(fontSize: number | null): ISCH_PrimitiveText;`
- **setstate_italic**: `setState_Italic(italic: boolean): ISCH_PrimitiveText;`
- **setstate_rotation**: `setState_Rotation(rotation: number): ISCH_PrimitiveText;`
- **setstate_textcolor**: `setState_TextColor(textColor: string | null): ISCH_PrimitiveText;`
- **setstate_underline**: `setState_UnderLine(underLine: boolean): ISCH_PrimitiveText;`
- **setstate_x**: `setState_X(x: number): ISCH_PrimitiveText;`
- **setstate_y**: `setState_Y(y: number): ISCH_PrimitiveText;`
- **toasync**: `toAsync(): ISCH_PrimitiveText;`
- **tosync**: `toSync(): ISCH_PrimitiveText;`
---
## ISCH_PrimitiveWire
导线图元
```typescript
declare class ISCH_PrimitiveWire implements ISCH_Primitive
```
- **done**: `done(): Promise<ISCH_PrimitiveWire>;`
- **getstate_color**: `getState_Color(): string | null;`
- **getstate_line**: `getState_Line(): Array<number> | Array<Array<number>>;`
- **getstate_linetype**: `getState_LineType(): ESCH_PrimitiveLineType | null;`
- **getstate_linewidth**: `getState_LineWidth(): number | null;`
- **getstate_net**: `getState_Net(): string;`
- **getstate_primitiveid**: `getState_PrimitiveId(): string;`
- **getstate_primitivetype**: `getState_PrimitiveType(): ESCH_PrimitiveType;`
- **isasync**: `isAsync(): boolean;`
- **setstate_color**: `setState_Color(color: string | null): ISCH_PrimitiveWire;`
- **setstate_line**: `setState_Line(line: Array<number> | Array<Array<number>>): ISCH_PrimitiveWire;`
- **setstate_linetype**: `setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveWire;`
- **setstate_linewidth**: `setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveWire;`
- **setstate_net**: `setState_Net(net: string): ISCH_PrimitiveWire;`
- **toasync**: `toAsync(): ISCH_PrimitiveWire;`
- **tosync**: `toSync(): ISCH_PrimitiveWire;`
---
## LIB_3DModel
综合库 / 3D 模型类
```typescript
declare class LIB_3DModel
```
- **copy**: `copy(modelUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newModelName?: string): Promise<string | undefined>;`
- **create**: `create(libraryUuid: string, modelFile: Blob, classification?: ILIB_ClassificationIndex | Array<string>, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.METER | ESYS_Unit.MIL | ESYS_Unit.INCH): Promise<string[] | undefined>;`
- **delete**: `delete(modelUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(modelUuid: string, libraryUuid?: string): Promise<ILIB_3DModelItem | undefined>;`
- **modify**: `modify(modelUuid: string, libraryUuid: string, modelName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;`
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_3DModelSearchItem>>;`
---
## LIB_Cbb
综合库 / 复用模块类
```typescript
declare class LIB_Cbb
```
- **copy**: `copy(cbbUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newCbbName?: string): Promise<string | undefined>;`
- **create**: `create(libraryUuid: string, cbbName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;`
- **delete**: `delete(cbbUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(cbbUuid: string, libraryUuid?: string): Promise<ILIB_CbbItem | undefined>;`
- **modify**: `modify(cbbUuid: string, libraryUuid: string, cbbName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;`
- **openprojectineditor**: `openProjectInEditor(cbbUuid: string, libraryUuid: string): Promise<boolean>;`
- **opensymbolineditor**: `openSymbolInEditor(cbbUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_CbbSearchItem>>;`
---
## LIB_Classification
综合库 / 库分类索引类
```typescript
declare class LIB_Classification
```
- **createprimary**: `createPrimary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;`
- **createsecondary**: `createSecondary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;`
- **deletebyindex**: `deleteByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<boolean>;`
- **deletebyuuid**: `deleteByUuid(libraryUuid: string, classificationUuid: string): Promise<boolean>;`
- **getallclassificationtree**: `getAllClassificationTree(libraryUuid: string, libraryType: ELIB_LibraryType): Promise<Array<{ name: string; uuid: string; children?: Array<{ name: string; uuid: string; }> | undefined; }>>;`
- **getindexbyname**: `getIndexByName(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string, secondaryClassificationName?: string): Promise<ILIB_ClassificationIndex | undefined>;`
- **getnamebyindex**: `getNameByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined; } | undefined>;`
- **getnamebyuuid**: `getNameByUuid(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationUuid?: string): Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined; } | undefined>;`
---
## LIB_Device
综合库 / 器件类
```typescript
declare class LIB_Device
```
- **copy**: `copy(deviceUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newDeviceName?: string): Promise<string | undefined>;`
- **create**: *(签名过长,请查看详细文档)*
- **delete**: `delete(deviceUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(deviceUuid: string, libraryUuid?: string): Promise<ILIB_DeviceItem | undefined>;`
- **getbylcscids**: `getByLcscIds<T extends boolean>(lcscIds: string, libraryUuid?: string, allowMultiMatch?: T): Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>;`
- **getbylcscids_1**: `getByLcscIds(lcscIds: Array<string>, libraryUuid?: string, allowMultiMatch?: boolean): Promise<Array<ILIB_DeviceSearchItem>>;`
- **modify**: *(签名过长,请查看详细文档)*
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_DeviceSearchItem>>;`
---
## LIB_Footprint
综合库 / 封装类
```typescript
declare class LIB_Footprint
```
- **copy**: `copy(footprintUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newFootprintName?: string): Promise<string | undefined>;`
- **create**: `create(libraryUuid: string, footprintName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;`
- **delete**: `delete(footprintUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(footprintUuid: string, libraryUuid?: string): Promise<ILIB_FootprintItem | undefined>;`
- **getrenderimage**: `getRenderImage(source: { footprintUuid: string; libraryUuid: string; }): Promise<Blob | undefined>;`
- **modify**: `modify(footprintUuid: string, libraryUuid: string, footprintName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;`
- **openineditor**: `openInEditor(footprintUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_FootprintSearchItem>>;`
- **updatedocumentsource**: `updateDocumentSource(footprintUuid: string, libraryUuid: string, documentSource: string): Promise<boolean | undefined>;`
---
## LIB_LibrariesList
综合库 / 库列表类
```typescript
declare class LIB_LibrariesList
```
- **getalllibrarieslist**: `getAllLibrariesList(): Promise<Array<ILIB_LibraryInfo>>;`
- **getfavoritelibraryuuid**: `getFavoriteLibraryUuid(): Promise<string | undefined>;`
- **getpersonallibraryuuid**: `getPersonalLibraryUuid(): Promise<string | undefined>;`
- **getprojectlibraryuuid**: `getProjectLibraryUuid(): Promise<string | undefined>;`
- **getsystemlibraryuuid**: `getSystemLibraryUuid(): Promise<string | undefined>;`
---
## LIB_PanelLibrary
综合库 / 面板库类
```typescript
declare class LIB_PanelLibrary
```
- **copy**: `copy(panelLibraryUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newPanelLibraryName?: string): Promise<string | undefined>;`
- **create**: `create(libraryUuid: string, panelLibraryName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;`
- **delete**: `delete(panelLibraryUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(panelLibraryUuid: string, libraryUuid?: string): Promise<ILIB_PanelLibraryItem | undefined>;`
- **modify**: `modify(panelLibraryUuid: string, libraryUuid: string, panelLibraryName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;`
- **openineditor**: `openInEditor(panelLibraryUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_PanelLibrarySearchItem>>;`
---
## LIB_SelectControl
综合库 / 选择控制类
```typescript
declare class LIB_SelectControl
```
- **getselectedlibraryrowinfo**: `getSelectedLibraryRowInfo(): Promise<ILIB_LibraryItem | undefined>;`
---
## LIB_Symbol
综合库 / 符号类
```typescript
declare class LIB_Symbol
```
- **copy**: `copy(symbolUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newSymbolName?: string): Promise<string | undefined>;`
- **create**: `create(libraryUuid: string, symbolName: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, description?: string): Promise<string | undefined>;`
- **delete**: `delete(symbolUuid: string, libraryUuid: string): Promise<boolean>;`
- **get**: `get(symbolUuid: string, libraryUuid?: string): Promise<ILIB_SymbolItem | undefined>;`
- **getrenderimage**: `getRenderImage(source: { symbolUuid: string; libraryUuid: string; subPartName?: string; }): Promise<Blob | undefined>;`
- **modify**: `modify(symbolUuid: string, libraryUuid: string, symbolName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;`
- **openineditor**: `openInEditor(symbolUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;`
- **search**: `search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_SymbolSearchItem>>;`
- **updatedocumentsource**: `updateDocumentSource(symbolUuid: string, libraryUuid: string, documentSource: string): Promise<boolean | undefined>;`
---
## PCB_Document
PCB & 封装 / 文档操作类
```typescript
declare class PCB_Document
```
- **convertcanvasorigintodataorigin**: `convertCanvasOriginToDataOrigin(x: number, y: number): Promise<{ x: number; y: number; }>;`
- **convertdataorigintocanvasorigin**: `convertDataOriginToCanvasOrigin(x: number, y: number): Promise<{ x: number; y: number; }>;`
- **getcalculatingratlinestatus**: `getCalculatingRatlineStatus(): Promise<EPCB_DocumentRatlineCalculatingActiveStatus>;`
- **getcanvasorigin**: `getCanvasOrigin(): Promise<{ offsetX: number; offsetY: number; }>;`
- **getcurrentfilterconfiguration**: `getCurrentFilterConfiguration(): Promise<{ [key: string]: any; } | undefined>;`
- **getprimitiveatpoint**: `getPrimitiveAtPoint(x: number, y: number): Promise<IPCB_Primitive | undefined>;`
- **getprimitivesinregion**: `getPrimitivesInRegion(left: number, right: number, top: number, bottom: number, leftToRight?: boolean): Promise<Array<IPCB_Primitive>>;`
- **importautolayoutjsonfile**: `importAutoLayoutJsonFile(autoLayoutFile: File): Promise<boolean>;`
- **importautoroutejsonfile**: `importAutoRouteJsonFile(autoRouteFile: File): Promise<boolean>;`
- **importautoroutesesfile**: `importAutoRouteSesFile(autoRouteFile: File): Promise<boolean>;`
- **importchanges**: `importChanges(uuid?: string): Promise<boolean>;`
- **navigatetocoordinates**: `navigateToCoordinates(x: number, y: number): Promise<boolean>;`
- **navigatetoregion**: `navigateToRegion(left: number, right: number, top: number, bottom: number): Promise<boolean>;`
- **save**: `save(uuid: string): Promise<boolean>;`
- **setcanvasorigin**: `setCanvasOrigin(offsetX: number, offsetY: number): Promise<boolean>;`
- **startcalculatingratline**: `startCalculatingRatline(): Promise<boolean>;`
- **stopcalculatingratline**: `stopCalculatingRatline(): Promise<boolean>;`
- **zoomtoboardoutline**: `zoomToBoardOutline(): Promise<boolean>;`
---
## PCB_Drc
PCB & 封装 / 设计规则检查(DRC)类
```typescript
declare class PCB_Drc
```
- **addnettoequallengthnetgroup**: `addNetToEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array<string>): Promise<boolean>;`
- **addnettonetclass**: `addNetToNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;`
- **addpadpairtopadpairgroup**: `addPadPairToPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>): Promise<boolean>;`
- **check**: `check(strict: boolean, userInterface: boolean, includeVerboseError: false): Promise<boolean>;`
- **check_1**: `check(strict: boolean, userInterface: boolean, includeVerboseError: true): Promise<Array<any>>;`
- **createdifferentialpair**: `createDifferentialPair(differentialPairName: string, positiveNet: string, negativeNet: string): Promise<boolean>;`
- **createequallengthnetgroup**: `createEqualLengthNetGroup(equalLengthNetGroupName: string, nets: Array<string>, color: IPCB_EqualLengthNetGroupItem['color']): Promise<boolean>;`
- **createnetclass**: `createNetClass(netClassName: string, nets: Array<string>, color: IPCB_EqualLengthNetGroupItem['color']): Promise<boolean>;`
- **createpadpairgroup**: `createPadPairGroup(padPairGroupName: string, padPairs: Array<[string, string]>): Promise<boolean>;`
- **deletedifferentialpair**: `deleteDifferentialPair(differentialPairName: string): Promise<boolean>;`
- **deleteequallengthnetgroup**: `deleteEqualLengthNetGroup(equalLengthNetGroupName: string): Promise<boolean>;`
- **deletenetclass**: `deleteNetClass(netClassName: string): Promise<boolean>;`
- **deletepadpairgroup**: `deletePadPairGroup(padPairGroupName: string): Promise<boolean>;`
- **deleteruleconfiguration**: `deleteRuleConfiguration(configurationName: string): Promise<boolean>;`
- **getalldifferentialpairs**: `getAllDifferentialPairs(): Promise<Array<IPCB_DifferentialPairItem> | { [key: string]: any; }>;`
- **getallequallengthnetgroups**: `getAllEqualLengthNetGroups(): Promise<Array<IPCB_EqualLengthNetGroupItem>>;`
- **getallnetclasses**: `getAllNetClasses(): Promise<Array<IPCB_NetClassItem>>;`
- **getallpadpairgroups**: `getAllPadPairGroups(): Promise<Array<IPCB_PadPairGroupItem>>;`
- **getallruleconfigurations**: `getAllRuleConfigurations(includeSystem?: boolean): Promise<Array<{ [key: string]: any; }>>;`
- **getcurrentruleconfiguration**: `getCurrentRuleConfiguration(): Promise<{ [key: string]: any; } | undefined>;`
- **getcurrentruleconfigurationname**: `getCurrentRuleConfigurationName(): Promise<string | undefined>;`
- **getdefaultruleconfigurationname**: `getDefaultRuleConfigurationName(): Promise<string | undefined>;`
- **getnetbynetrules**: `getNetByNetRules(): Promise<{ [key: string]: any; }>;`
- **getnetrules**: `getNetRules(): Promise<Array<{ [key: string]: any; }>>;`
- **getpadpairgroupminwirelength**: `getPadPairGroupMinWireLength(padPairGroupName: string): Promise<Array<IPCB_PadPairMinWireLengthItem>>;`
- **getregionrules**: `getRegionRules(): Promise<Array<{ [key: string]: any; }>>;`
- **getruleconfiguration**: `getRuleConfiguration(configurationName: string): Promise<{ [key: string]: any; } | undefined>;`
- **modifydifferentialpairname**: `modifyDifferentialPairName(originalDifferentialPairName: string, differentialPairName: string): Promise<boolean>;`
- **modifydifferentialpairnegativenet**: `modifyDifferentialPairNegativeNet(differentialPairName: string, negativeNet: string): Promise<boolean>;`
- **modifydifferentialpairpositivenet**: `modifyDifferentialPairPositiveNet(differentialPairName: string, positiveNet: string): Promise<boolean>;`
- **modifyequallengthnetgroupname**: `modifyEqualLengthNetGroupName(originalEqualLengthNetGroupName: string, equalLengthNetGroupName: string): Promise<boolean>;`
- **modifynetclassname**: `modifyNetClassName(originalNetClassName: string, netClassName: string): Promise<boolean>;`
- **modifypadpairgroupname**: `modifyPadPairGroupName(originalPadPairGroupName: string, padPairGroupName: string): Promise<boolean>;`
- **overwritecurrentruleconfiguration**: `overwriteCurrentRuleConfiguration(ruleConfiguration: { [key: string]: any; }): Promise<boolean>;`
- **overwritenetbynetrules**: `overwriteNetByNetRules(netByNetRules: { [key: string]: any; }): Promise<boolean>;`
- **overwritenetrules**: `overwriteNetRules(netRules: Array<{ [key: string]: any; }>): Promise<boolean>;`
- **overwriteregionrules**: `overwriteRegionRules(regionRules: Array<{ [key: string]: any; }>): Promise<boolean>;`
- **removenetfromequallengthnetgroup**: `removeNetFromEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array<string>): Promise<boolean>;`
- **removenetfromnetclass**: `removeNetFromNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;`
- **removepadpairfrompadpairgroup**: `removePadPairFromPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>): Promise<boolean>;`
- **renameruleconfiguration**: `renameRuleConfiguration(originalConfigurationName: string, configurationName: string): Promise<boolean>;`
- **saveruleconfiguration**: `saveRuleConfiguration(ruleConfiguration: { [key: string]: any; }, configurationName: string, allowOverwrite?: boolean): Promise<boolean>;`
- **setasdefaultruleconfiguration**: `setAsDefaultRuleConfiguration(configurationName: string): Promise<boolean>;`
---
## PCB_Event
PCB & 封装 / 事件类
```typescript
declare class PCB_Event
```
- **addcrossprobeselecteventlistener**: `addCrossProbeSelectEventListener(id: string, callFn: (props: any) => void | Promise<void>): void;`
- **addmouseeventlistener**: `addMouseEventListener(id: string, eventType: 'all' | EPCB_MouseEventType, callFn: (eventType: EPCB_MouseEventType, props: [ { primitiveId: string; primitiveType: EPCB_PrimitiveType; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string; } ]) => void | Promise<void>, onlyOnce?: boolean): void;`
- **addneteventlistener**: `addNetEventListener(id: string, eventType: 'all' | EPCB_NetEventType, callFn: (eventType: EPCB_NetEventType, props: [{ net: string; }]) => void | Promise<void>, onlyOnce?: boolean): void;`
- **addprimitiveeventlistener**: `addPrimitiveEventListener(id: string, eventType: 'all' | EPCB_PrimitiveEventType, callFn: (eventType: EPCB_PrimitiveEventType, props: [ { primitiveId: string; primitiveType: EPCB_PrimitiveType; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string; } ]) => void | Promise<void>, onlyOnce?: boolean): void;`
- **iseventlisteneralreadyexist**: `isEventListenerAlreadyExist(id: string): boolean;`
- **removeeventlistener**: `removeEventListener(id: string): boolean;`
---
## PCB_Layer
PCB & 封装 / 图层操作类
```typescript
declare class PCB_Layer
```
- **addcustomlayer**: `addCustomLayer(): Promise<TPCB_LayersOfCustom | undefined>;`
- **getalllayers**: `getAllLayers(): Promise<Array<IPCB_LayerItem>>;`
- **locklayer**: `lockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>): Promise<boolean>;`
- **modifylayer**: `modifyLayer(layer: TPCB_LayersInTheSelectable, property: { name?: string; type?: TPCB_LayerTypesOfInnerLayer; color?: string; transparency?: number; }): Promise<boolean>;`
- **removelayer**: `removeLayer(layer: TPCB_LayersOfCustom): Promise<boolean>;`
- **selectlayer**: `selectLayer(layer: TPCB_LayersInTheSelectable): Promise<boolean>;`
- **setinactivelayerdisplaymode**: `setInactiveLayerDisplayMode(displayMode?: EPCB_InactiveLayerDisplayMode): Promise<boolean>;`
- **setinactivelayertransparency**: `setInactiveLayerTransparency(transparency: number): Promise<boolean>;`
- **setlayercolorconfiguration**: `setLayerColorConfiguration(colorConfiguration: EPCB_LayerColorConfiguration): Promise<boolean>;`
- **setlayerinvisible**: `setLayerInvisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerVisible?: boolean): Promise<boolean>;`
- **setlayervisible**: `setLayerVisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerInvisible?: boolean): Promise<boolean>;`
- **setpcbtype**: `setPcbType(pcbType: EPCB_PcbPlateType): Promise<boolean>;`
- **setthenumberofcopperlayers**: `setTheNumberOfCopperLayers(numberOfLayers: 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32): Promise<boolean>;`
- **unlocklayer**: `unlockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>): Promise<boolean>;`
---
## PCB_ManufactureData
PCB & 封装 / 生产资料类
```typescript
declare class PCB_ManufactureData
```
- **deletebomtemplate**: `deleteBomTemplate(template: string): Promise<boolean>;`
- **get3dfile**: `get3DFile(fileName?: string, fileType?: 'step' | 'obj', element?: Array<'Component Model' | 'Via' | 'Silkscreen' | 'Wire In Signal Layer'>, modelMode?: 'Outfit' | 'Parts', autoGenerateModels?: boolean): Promise<File | undefined>;`
- **get3dshellfile**: `get3DShellFile(fileName?: string, fileType?: 'stl' | 'step' | 'obj'): Promise<File | undefined>;`
- **getaltiumdesignerfile**: `getAltiumDesignerFile(fileName?: string): Promise<File | undefined>;`
- **getautolayoutjsonfile**: `getAutoLayoutJsonFile(fileName?: string): Promise<File | undefined>;`
- **getautoroutejsonfile**: `getAutoRouteJsonFile(fileName?: string): Promise<File | undefined>;`
- **getautoroutejsonfileforjrouter**: `getAutoRouteJsonFileForJRouter(fileName?: string): Promise<File | undefined>;`
- **getbomfile**: `getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{ property: string; includeValue: boolean | string; }>, statistics?: Array<string>, property?: Array<string>, columns?: Array<IPCB_BomPropertiesTableColumns>): Promise<File | undefined>;`
- **getbomtemplatefile**: `getBomTemplateFile(template: string): Promise<File | undefined>;`
- **getbomtemplates**: `getBomTemplates(): Promise<Array<string>>;`
- **getdsnfile**: `getDsnFile(fileName?: string): Promise<File | undefined>;`
- **getdxffile**: `getDxfFile(fileName?: string, layers?: Array<{ layerId: number; mirror: boolean; }>, objects?: Array<string>): Promise<File | undefined>;`
- **getflyingprobetestfile**: `getFlyingProbeTestFile(fileName?: string): Promise<File | undefined>;`
- **getgerberfile**: *(签名过长,请查看详细文档)*
- **getidxfile**: `getIdxFile(fileName?: string): Promise<File | undefined>;`
- **getipcd356afile**: `getIpcD356AFile(fileName?: string): Promise<File | undefined>;`
- **getmanufacturedata**: `getManufactureData(): Promise<File | undefined>;`
- **getnetlistfile**: `getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;`
- **getopendatabasedoubleplusfile**: `getOpenDatabaseDoublePlusFile(fileName?: string, unit?: ESYS_Unit.INCH, otherData?: { metallizedDrilledHoles?: boolean; nonMetallizedDrilledHoles?: boolean; drillTable?: boolean; flyingProbeTestFile?: boolean; }, layers?: Array<{ layerId: number; mirror: boolean; }>, objects?: Array<{ objectName: string; }>): Promise<File | undefined>;`
- **getpadsfile**: `getPadsFile(fileName?: string): Promise<File | undefined>;`
- **getpcbinfofile**: `getPcbInfoFile(fileName?: string): Promise<File | undefined>;`
- **getpdffile**: *(签名过长,请查看详细文档)*
- **getpickandplacefile**: `getPickAndPlaceFile(fileName?: string, fileType?: 'xlsx' | 'csv', unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.MIL): Promise<File | undefined>;`
- **gettestpointfile**: `getTestPointFile(fileName?: string, fileType?: 'xlsx' | 'csv'): Promise<File | undefined>;`
- **place3dshellorder**: `place3DShellOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
- **placecomponentsorder**: `placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
- **placepcborder**: `placePcbOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
- **placesmtcomponentsorder**: `placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
- **uploadbomtemplatefile**: `uploadBomTemplateFile(templateFile: File, template?: string): Promise<string | undefined>;`
---
## PCB_MathPolygon
PCB & 封装 / 多边形数学类
```typescript
declare class PCB_MathPolygon
```
- **calculatebboxheight**: `calculateBBoxHeight(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>): number;`
- **calculatebboxwidth**: `calculateBBoxWidth(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>): number;`
- **convertimagetocomplexpolygon**: `convertImageToComplexPolygon(imageBlob: Blob, imageWidth: number, imageHeight: number, tolerance?: number, simplification?: number, smoothing?: number, despeckling?: number, whiteAsBackgroundColor?: boolean, inversion?: boolean): Promise<IPCB_ComplexPolygon | undefined>;`
- **createcomplexpolygon**: `createComplexPolygon(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | Array<IPCB_Polygon>): IPCB_ComplexPolygon | undefined;`
- **createpolygon**: `createPolygon(polygon: TPCB_PolygonSourceArray): IPCB_Polygon | undefined;`
- **splitpolygon**: `splitPolygon(...complexPolygons: Array<IPCB_ComplexPolygon>): Array<IPCB_Polygon>;`
---
## PCB_Net
PCB & 封装 / 网络类
```typescript
declare class PCB_Net
```
- **getallnetname**: `getAllNetName(): Promise<Array<string>>;`
- **getallnets**: `getAllNets(): Promise<Array<IPCB_NetInfo>>;`
- **getallnetsname**: `getAllNetsName(): Promise<Array<string>>;`
- **getallprimitivesbynet**: `getAllPrimitivesByNet(net: string, primitiveTypes?: Array<EPCB_PrimitiveType>): Promise<Array<IPCB_Primitive>>;`
- **getnet**: `getNet(net: string): Promise<IPCB_NetInfo | undefined>;`
- **getnetcolor**: `getNetColor(net: string): Promise<IPCB_NetInfo['color'] | undefined>;`
- **getnetlength**: `getNetLength(net: string): Promise<number | undefined>;`
- **getnetlist**: `getNetlist(type?: ESYS_NetlistType): Promise<string>;`
- **highlightnet**: `highlightNet(net: string): Promise<boolean>;`
- **selectnet**: `selectNet(net: string): Promise<boolean>;`
- **setnetcolor**: `setNetColor(net: string, color: IPCB_NetInfo['color']): Promise<boolean>;`
- **setnetlist**: `setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<boolean>;`
- **unhighlightallnets**: `unhighlightAllNets(): Promise<boolean>;`
- **unhighlightnet**: `unhighlightNet(net: string): Promise<boolean>;`
- **unselectallnets**: `unselectAllNets(): Promise<boolean>;`
- **unselectnet**: `unselectNet(net: string): Promise<boolean>;`
---
## PCB_Primitive
PCB & 封装 / 图元类
```typescript
declare class PCB_Primitive
```
- **getprimitivesbbox**: `getPrimitivesBBox(primitiveIds: Array<string | IPCB_Primitive>): Promise<{ minX: number; minY: number; maxX: number; maxY: number; } | undefined>;`
---
## PCB_PrimitiveArc
PCB & 封装 / 圆弧线图元类
```typescript
declare class PCB_PrimitiveArc implements IPCB_PrimitiveAPI
```
- **create**: `create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, arcAngle: number, lineWidth?: number, interactiveMode?: EPCB_PrimitiveArcInteractiveMode, primitiveLock?: boolean): Promise<IPCB_PrimitiveArc | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveArc | Array<string> | Array<IPCB_PrimitiveArc>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveArc | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveArc>>;`
- **getall**: `getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveArc>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveArc, property: { net?: string; layer?: TPCB_LayersOfLine; startX?: number; startY?: number; endX?: number; endY?: number; arcAngle?: number; lineWidth?: number; interactiveMode?: EPCB_PrimitiveArcInteractiveMode; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveArc | undefined>;`
---
## PCB_PrimitiveAttribute
PCB & 封装 / 属性图元类
```typescript
declare class PCB_PrimitiveAttribute implements IPCB_PrimitiveAPI
```
---
## PCB_PrimitiveComponent
PCB & 封装 / 器件图元类
```typescript
declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI
```
- **create**: `create(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem | { libraryType: ELIB_LibraryType.FOOTPRINT; libraryUuid: string; uuid: string; } | ILIB_FootprintItem | ILIB_FootprintSearchItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveComponent | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveComponent | Array<string> | Array<IPCB_PrimitiveComponent>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveComponent | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveComponent>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveComponent>>;`
- **getallpinsbyprimitiveid**: `getAllPinsByPrimitiveId(primitiveId: string): Promise<Array<IPCB_PrimitiveComponentPad> | undefined>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: *(签名过长,请查看详细文档)*
- **placecomponentwithmouse**: `placeComponentWithMouse(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
---
## PCB_PrimitiveDimension
PCB & 封装 / 尺寸标注图元类
```typescript
declare class PCB_PrimitiveDimension implements IPCB_PrimitiveAPI
```
- **create**: `create(dimensionType: EPCB_PrimitiveDimensionType, coordinateSet: TPCB_PrimitiveDimensionCoordinateSet, layer?: TPCB_LayersOfDimension, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL, lineWidth?: number, precision?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveDimension | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveDimension | Array<string> | Array<IPCB_PrimitiveDimension>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveDimension | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveDimension>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveDimension>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveDimension, property: { dimensionType?: EPCB_PrimitiveDimensionType; coordinateSet?: TPCB_PrimitiveDimensionCoordinateSet; layer?: TPCB_LayersOfDimension; unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL; lineWidth?: number; precision?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveDimension | undefined>;`
---
## PCB_PrimitiveFill
PCB & 封装 / 填充图元类
```typescript
declare class PCB_PrimitiveFill implements IPCB_PrimitiveAPI
```
- **create**: `create(layer: TPCB_LayersOfFill, complexPolygon: IPCB_Polygon, net?: string, fillMode?: EPCB_PrimitiveFillMode, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveFill | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveFill | Array<string> | Array<IPCB_PrimitiveFill>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveFill | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveFill>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveFill>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveFill, property: { layer?: TPCB_LayersOfFill; complexPolygon?: IPCB_Polygon; net?: string; fillMode?: EPCB_PrimitiveFillMode; lineWidth?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveFill | undefined>;`
---
## PCB_PrimitiveImage
PCB & 封装 / 图像图元类
```typescript
declare class PCB_PrimitiveImage implements IPCB_PrimitiveAPI
```
- **create**: `create(x: number, y: number, complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | IPCB_ComplexPolygon, layer: TPCB_LayersOfImage, width?: number, height?: number, rotation?: number, horizonMirror?: boolean, primitiveLock?: boolean): Promise<IPCB_PrimitiveImage | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveImage | Array<string> | Array<IPCB_PrimitiveImage>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveImage | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveImage>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfImage, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveImage>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfImage, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveImage, property: { x?: number; y?: number; layer?: TPCB_LayersOfImage; width?: number; height?: number; rotation?: number; horizonMirror?: boolean; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveImage | undefined>;`
---
## PCB_PrimitiveLine
PCB & 封装 / 直线图元类
```typescript
declare class PCB_PrimitiveLine implements IPCB_PrimitiveAPI
```
- **create**: `create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveLine | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveLine | Array<string> | Array<IPCB_PrimitiveLine>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveLine | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveLine>>;`
- **getall**: `getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveLine>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveLine, property: { net?: string; layer?: TPCB_LayersOfLine; startX?: number; startY?: number; endX?: number; endY?: number; lineWidth?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveLine | undefined>;`
---
## PCB_PrimitiveObject
PCB & 封装 / 二进制内嵌对象图元类
```typescript
declare class PCB_PrimitiveObject implements IPCB_PrimitiveAPI
```
- **create**: `create(layer: TPCB_LayersOfObject, topLeftX: number, topLeftY: number, binaryData: string, width: number, height: number, rotation?: number, mirror?: boolean, fileName?: string, primitiveLock?: boolean): Promise<IPCB_PrimitiveObject | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveObject | Array<string> | Array<IPCB_PrimitiveObject>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveObject | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveObject>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfObject, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveObject>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfObject, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveObject, property: { layer?: TPCB_LayersOfObject; topLeftX?: number; topLeftY?: number; binaryData?: string; width?: number; height?: number; rotation?: number; mirror?: boolean; fileName?: string; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveObject | undefined>;`
---
## PCB_PrimitivePad
PCB & 封装 / 焊盘图元类
```typescript
declare class PCB_PrimitivePad implements IPCB_PrimitiveAPI
```
- **create**: *(签名过长,请查看详细文档)*
- **delete**: `delete(primitiveIds: string | IPCB_PrimitivePad | Array<string> | Array<IPCB_PrimitivePad>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitivePad | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePad>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType): Promise<Array<IPCB_PrimitivePad>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType): Promise<Array<string>>;`
- **modify**: *(签名过长,请查看详细文档)*
---
## PCB_PrimitivePolyline
PCB & 封装 / 折线图元类
```typescript
declare class PCB_PrimitivePolyline implements IPCB_PrimitiveAPI
```
- **create**: `create(net: string, layer: TPCB_LayersOfLine, polygon: IPCB_Polygon, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitivePolyline | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitivePolyline | Array<string> | Array<IPCB_PrimitivePolyline>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitivePolyline | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePolyline>>;`
- **getall**: `getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitivePolyline>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitivePolyline, property: { net?: string; layer?: TPCB_LayersOfLine; polygon?: IPCB_Polygon; lineWidth?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitivePolyline | undefined>;`
---
## PCB_PrimitivePour
PCB & 封装 / 覆铜边框图元类
```typescript
declare class PCB_PrimitivePour implements IPCB_PrimitiveAPI
```
- **create**: `create(net: string, layer: TPCB_LayersOfCopper, complexPolygon: IPCB_Polygon, pourFillMethod?: EPCB_PrimitivePourFillMethod, preserveSilos?: boolean, pourName?: string, pourPriority?: number, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitivePour | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitivePour | Array<string> | Array<IPCB_PrimitivePour>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitivePour | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePour>>;`
- **getall**: `getAll(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean): Promise<Array<IPCB_PrimitivePour>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitivePour, property: { net?: string; layer?: TPCB_LayersOfCopper; complexPolygon?: IPCB_Polygon; pourFillMethod?: EPCB_PrimitivePourFillMethod; preserveSilos?: boolean; pourName?: string; pourPriority?: number; lineWidth?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitivePour | undefined>;`
---
## PCB_PrimitivePoured
PCB & 封装 / 覆铜填充图元类
```typescript
declare class PCB_PrimitivePoured implements IPCB_PrimitiveAPI
```
- **delete**: `delete(primitiveIds: string | IPCB_PrimitivePoured | Array<string> | Array<IPCB_PrimitivePoured>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitivePoured | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePoured>>;`
- **getall**: `getAll(): Promise<Array<IPCB_PrimitivePoured>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
---
## PCB_PrimitiveRegion
PCB & 封装 / 禁止区域和约束区域图元类
```typescript
declare class PCB_PrimitiveRegion implements IPCB_PrimitiveAPI
```
- **create**: `create(layer: TPCB_LayersOfRegion, complexPolygon: IPCB_Polygon, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, regionName?: string, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveRegion | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveRegion | Array<string> | Array<IPCB_PrimitiveRegion>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveRegion | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveRegion>>;`
- **getall**: `getAll(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveRegion>>;`
- **getallprimitiveid**: `getAllPrimitiveId(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveRegion, property: { layer?: TPCB_LayersOfRegion; complexPolygon?: IPCB_Polygon; ruleType?: Array<EPCB_PrimitiveRegionRuleType>; regionName?: string; lineWidth?: number; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveRegion | undefined>;`
---
## PCB_PrimitiveString
PCB & 封装 / 文本图元类
```typescript
declare class PCB_PrimitiveString implements IPCB_PrimitiveAPI
```
---
## PCB_PrimitiveVia
PCB & 封装 / 过孔图元类
```typescript
declare class PCB_PrimitiveVia implements IPCB_PrimitiveAPI
```
- **create**: `create(net: string, x: number, y: number, holeDiameter: number, diameter: number, viaType?: EPCB_PrimitiveViaType, designRuleBlindViaName?: string | null, solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null, primitiveLock?: boolean): Promise<IPCB_PrimitiveVia | undefined>;`
- **delete**: `delete(primitiveIds: string | IPCB_PrimitiveVia | Array<string> | Array<IPCB_PrimitiveVia>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<IPCB_PrimitiveVia | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveVia>>;`
- **getall**: `getAll(net?: string, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveVia>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string, primitiveLock?: boolean): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | IPCB_PrimitiveVia, property: { net?: string; x?: number; y?: number; holeDiameter?: number; diameter?: number; viaType?: EPCB_PrimitiveViaType; designRuleBlindViaName?: string | null; solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null; primitiveLock?: boolean; }): Promise<IPCB_PrimitiveVia | undefined>;`
---
## PCB_RayTracerEngine
PCB & 封装 / 光线追踪引擎类
```typescript
declare class PCB_RayTracerEngine
```
---
## PCB_SelectControl
PCB & 封装 / 选择控制类
```typescript
declare class PCB_SelectControl
```
- **clearselected**: `clearSelected(): Promise<boolean>;`
- **docrossprobeselect**: `doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): Promise<boolean>;`
- **doselectprimitives**: `doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;`
- **getallselectedprimitives**: `getAllSelectedPrimitives(): Promise<Array<IPCB_Primitive>>;`
- **getallselectedprimitives_primitiveid**: `getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;`
- **getcurrentmouseposition**: `getCurrentMousePosition(): Promise<{ x: number; y: number; } | undefined>;`
- **getselectedprimitives**: `getSelectedPrimitives(): Promise<Array<Object>>;`
---
## PNL_Document
面板 / 文档操作类
```typescript
declare class PNL_Document
```
- **save**: `save(): Promise<boolean>;`
---
## SCH_Document
原理图 & 符号 / 文档操作类
```typescript
declare class SCH_Document
```
- **autolayout**: *(签名过长,请查看详细文档)*
- **autorouting**: *(签名过长,请查看详细文档)*
- **importchanges**: `importChanges(): Promise<boolean>;`
- **save**: `save(): Promise<boolean>;`
---
## SCH_Drc
原理图 & 符号 / 设计规则检查(DRC)类
```typescript
declare class SCH_Drc
```
- **check**: `check(strict: boolean, userInterface: boolean, includeVerboseError: false): Promise<boolean>;`
- **check_1**: `check(strict: boolean, userInterface: boolean, includeVerboseError: true): Promise<Array<any>>;`
---
## SCH_Event
原理图 & 符号 / 事件类
```typescript
declare class SCH_Event
```
- **addmouseeventlistener**: `addMouseEventListener(id: string, eventType: 'all' | ESCH_MouseEventType, callFn: (eventType: ESCH_MouseEventType) => void | Promise<void>, onlyOnce?: boolean): void;`
- **addprimitiveeventlistener**: `addPrimitiveEventListener(id: string, eventType: 'all' | ESCH_PrimitiveEventType, callFn: (eventType: ESCH_PrimitiveEventType, props: { primitiveIds: Array<string>; }) => void | Promise<void>, onlyOnce?: boolean): void;`
- **addsimulationenginepulleventlistener**: `addSimulationEnginePullEventListener(id: string, eventType: 'all', callFn: (eventType: ESCH_DynamicSimulationEnginePullEventType | ESCH_SpiceSimulationEnginePullEventType, props: { [key: string]: any; }) => void | Promise<void>): void;`
- **iseventlisteneralreadyexist**: `isEventListenerAlreadyExist(id: string): boolean;`
- **removeeventlistener**: `removeEventListener(id: string): boolean;`
---
## SCH_ManufactureData
原理图 & 符号 / 生产资料类
```typescript
declare class SCH_ManufactureData
```
- **getassemblyvariantsconfigs**: `getAssemblyVariantsConfigs(): Promise<Array<{ text: string; value: string; }>>;`
- **getbomfile**: `getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{ property: string; includeValue: boolean | string; }>, statistics?: Array<string>, property?: Array<string>, columns?: Array<IPCB_BomPropertiesTableColumns>, assemblyVariantsConfig?: { text: string; value: string; }): Promise<File | undefined>;`
- **getexportdocumentfile**: *(签名过长,请查看详细文档)*
- **getnetlistfile**: `getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;`
- **getsimulationnetlistfile**: `getSimulationNetlistFile(fileName?: string, netlistType?: ESCH_SimulationNetlistType): Promise<File | undefined>;`
- **placecomponentsorder**: `placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
- **placesmtcomponentsorder**: `placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;`
---
## SCH_Net
原理图 & 符号 / 网络类
```typescript
declare class SCH_Net
```
---
## SCH_Netlist
原理图 & 符号 / 网表类
```typescript
declare class SCH_Netlist
```
- **getnetlist**: `getNetlist(type?: ESYS_NetlistType): Promise<string>;`
- **setnetlist**: `setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<void>;`
---
## SCH_Primitive
原理图 & 符号 / 图元类
```typescript
declare class SCH_Primitive
```
- **getprimitivebyprimitiveid**: `getPrimitiveByPrimitiveId(id: string): Promise<ISCH_Primitive | undefined>;`
- **getprimitivesbbox**: `getPrimitivesBBox(primitiveIds: Array<string | ISCH_Primitive>): Promise<{ minX: number; minY: number; maxX: number; maxY: number; } | undefined>;`
- **getprimitivetypebyprimitiveid**: `getPrimitiveTypeByPrimitiveId(id: string): Promise<ESCH_PrimitiveType | undefined>;`
---
## SCH_PrimitiveArc
原理图 & 符号 / 圆弧图元类
```typescript
declare class SCH_PrimitiveArc implements ISCH_PrimitiveAPI
```
- **create**: `create(startX: number, startY: number, referenceX: number, referenceY: number, endX: number, endY: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveArc | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveArc | Array<string> | Array<ISCH_PrimitiveArc>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveArc | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveArc>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitiveArc>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveArc, property: { startX?: number; startY?: number; referenceX?: number; referenceY?: number; endX?: number; endY?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; }): Promise<ISCH_PrimitiveArc | undefined>;`
---
## SCH_PrimitiveAttribute
原理图 & 符号 / 属性图元类
```typescript
declare class SCH_PrimitiveAttribute implements ISCH_PrimitiveAPI
```
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveAttribute | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveAttribute>>;`
- **getall**: `getAll(parentPrimitiveId?: string): Promise<Array<ISCH_PrimitiveAttribute>>;`
- **getallprimitiveid**: `getAllPrimitiveId(parentPrimitiveId?: string): Promise<Array<string>>;`
- **modify**: *(签名过长,请查看详细文档)*
---
## SCH_PrimitiveBus
原理图 & 符号 / 总线图元类
```typescript
declare class SCH_PrimitiveBus implements ISCH_PrimitiveAPI
```
- **create**: `create(busName: string, line: Array<number> | Array<Array<number>>, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveBus | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveBus | Array<string> | Array<ISCH_PrimitiveBus>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveBus | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveBus>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitiveBus>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveBus, property: { busName?: string; line?: Array<number> | Array<Array<number>>; color?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; }): Promise<ISCH_PrimitiveBus | undefined>;`
---
## SCH_PrimitiveCircle
原理图 & 符号 / 圆图元类
```typescript
declare class SCH_PrimitiveCircle implements ISCH_PrimitiveAPI
```
- **create**: `create(centerX: number, centerY: number, radius: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null): Promise<ISCH_PrimitiveCircle>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveCircle | Array<string> | Array<ISCH_PrimitiveCircle>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveCircle | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveCircle>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitiveCircle>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveCircle, property: { centerX?: number; centerY?: number; radius?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; fillStyle?: ESCH_PrimitiveFillStyle | null; }): Promise<ISCH_PrimitiveCircle | undefined>;`
---
## SCH_PrimitiveComponent
原理图 & 符号 / 器件图元类
```typescript
declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI
```
- **create**: `create(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem, x: number, y: number, subPartName?: string, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;`
- **createnetflag**: `createNetFlag(identification: 'Power' | 'Ground' | 'AnalogGround' | 'ProtectGround', net: string, x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;`
- **createnetport**: `createNetPort(direction: 'IN' | 'OUT' | 'BI', net: string, x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;`
- **createshortcircuitflag**: `createShortCircuitFlag(x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveComponent$1 | Array<string> | Array<ISCH_PrimitiveComponent$1>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveComponent$1 | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveComponent$1>>;`
- **getall**: `getAll(componentType?: ESCH_PrimitiveComponentType$1, allSchematicPages?: boolean): Promise<Array<ISCH_PrimitiveComponent$1>>;`
- **getallpinsbyprimitiveid**: `getAllPinsByPrimitiveId(primitiveId: string): Promise<Array<ISCH_PrimitiveComponentPin> | undefined>;`
- **getallprimitiveid**: `getAllPrimitiveId(componentType?: ESCH_PrimitiveComponentType$1, allSchematicPages?: boolean): Promise<Array<string>>;`
- **getallpropertynames**: `getAllPropertyNames(): Promise<Array<string>>;`
- **modify**: *(签名过长,请查看详细文档)*
- **placecomponentwithmouse**: `placeComponentWithMouse(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem, subPartName?: string): Promise<boolean>;`
- **setnetflagcomponentuuid_analogground**: `setNetFlagComponentUuid_AnalogGround(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetflagcomponentuuid_ground**: `setNetFlagComponentUuid_Ground(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetflagcomponentuuid_power**: `setNetFlagComponentUuid_Power(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetflagcomponentuuid_protectground**: `setNetFlagComponentUuid_ProtectGround(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetportcomponentuuid_bi**: `setNetPortComponentUuid_BI(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetportcomponentuuid_in**: `setNetPortComponentUuid_IN(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
- **setnetportcomponentuuid_out**: `setNetPortComponentUuid_OUT(component: { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;`
---
## SCH_PrimitiveObject
原理图 & 符号 / 二进制内嵌对象图元类
```typescript
declare class SCH_PrimitiveObject implements ISCH_PrimitiveAPI
```
---
## SCH_PrimitivePin
原理图 & 符号 / 引脚图元类
```typescript
declare class SCH_PrimitivePin implements ISCH_PrimitiveAPI
```
- **create**: `create(x: number, y: number, pinNumber: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: ESCH_PrimitivePinShape, pinType?: ESCH_PrimitivePinType): Promise<ISCH_PrimitivePin | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitivePin | Array<string> | Array<ISCH_PrimitivePin>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitivePin>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitivePin | ISCH_PrimitiveComponentPin, property: { x?: number; y?: number; pinNumber?: string; pinName?: string; rotation?: number; pinLength?: number; pinColor?: string | null; pinShape?: ESCH_PrimitivePinShape; pinType?: ESCH_PrimitivePinType; }): Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined>;`
---
## SCH_PrimitivePolygon
原理图 & 符号 / 多边形(折线)图元类
```typescript
declare class SCH_PrimitivePolygon implements ISCH_PrimitiveAPI
```
- **create**: `create(line: Array<number>, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitivePolygon | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitivePolygon | Array<string> | Array<ISCH_PrimitivePolygon>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitivePolygon | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitivePolygon>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitivePolygon>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitivePolygon, property: { line?: Array<number>; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; }): Promise<ISCH_PrimitivePolygon | undefined>;`
---
## SCH_PrimitiveRectangle
原理图 & 符号 / 矩形图元类
```typescript
declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI
```
- **create**: `create(topLeftX: number, topLeftY: number, width: number, height: number, cornerRadius?: number, rotation?: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null): Promise<ISCH_PrimitiveRectangle | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveRectangle | Array<string> | Array<ISCH_PrimitiveRectangle>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveRectangle | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveRectangle>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitiveRectangle>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveRectangle, property: { topLeftX?: number; topLeftY?: number; width?: number; height?: number; cornerRadius?: number; rotation?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; fillStyle?: ESCH_PrimitiveFillStyle | null; }): Promise<ISCH_PrimitiveRectangle | undefined>;`
---
## SCH_PrimitiveText
原理图 & 符号 / 文本图元类
```typescript
declare class SCH_PrimitiveText implements ISCH_PrimitiveAPI
```
- **create**: `create(x: number, y: number, content: string, rotation?: number, textColor?: string | null, fontName?: string | null, fontSize?: number | null, bold?: boolean, italic?: boolean, underLine?: boolean, alignMode?: ESCH_PrimitiveTextAlignMode): Promise<ISCH_PrimitiveText | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveText | Array<string> | Array<ISCH_PrimitiveText>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveText | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveText>>;`
- **getall**: `getAll(): Promise<Array<ISCH_PrimitiveText>>;`
- **getallprimitiveid**: `getAllPrimitiveId(): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveText, property: { x?: number; y?: number; content?: string; rotation?: number; textColor?: string | null; fontName?: string | null; fontSize?: number | null; bold?: boolean; italic?: boolean; underLine?: boolean; alignMode?: ESCH_PrimitiveTextAlignMode; }): Promise<ISCH_PrimitiveText | undefined>;`
---
## SCH_PrimitiveWire
原理图 & 符号 / 导线图元类
```typescript
declare class SCH_PrimitiveWire implements ISCH_PrimitiveAPI
```
- **create**: `create(line: Array<number> | Array<Array<number>>, net?: string, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveWire | undefined>;`
- **delete**: `delete(primitiveIds: string | ISCH_PrimitiveWire | Array<string> | Array<ISCH_PrimitiveWire>): Promise<boolean>;`
- **get**: `get(primitiveIds: string): Promise<ISCH_PrimitiveWire | undefined>;`
- **get_1**: `get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveWire>>;`
- **getall**: `getAll(net?: string | Array<string>): Promise<Array<ISCH_PrimitiveWire>>;`
- **getallprimitiveid**: `getAllPrimitiveId(net?: string | Array<string>): Promise<Array<string>>;`
- **modify**: `modify(primitiveId: string | ISCH_PrimitiveWire, property: { line?: Array<number> | Array<Array<number>>; net?: string; color?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; }): Promise<ISCH_PrimitiveWire | undefined>;`
---
## SCH_SelectControl
原理图 & 符号 / 选择控制类
```typescript
declare class SCH_SelectControl
```
- **clearselected**: `clearSelected(): boolean;`
- **docrossprobeselect**: `doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): boolean;`
- **doselectprimitives**: `doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;`
- **getallselectedprimitives**: `getAllSelectedPrimitives(): Promise<Array<ISCH_Primitive>>;`
- **getallselectedprimitives_primitiveid**: `getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;`
- **getcurrentmouseposition**: `getCurrentMousePosition(): Promise<{ x: number; y: number; } | undefined>;`
- **getselectedprimitives**: `getSelectedPrimitives(): Promise<Array<Object>>;`
- **getselectedprimitives_primitiveid**: `getSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;`
- **refactorgetallselectedprimitives**: `refactorGetAllSelectedPrimitives(): Promise<Array<ISCH_Primitive>>;`
---
## SCH_SimulationEngine
原理图 & 符号 / 仿真引擎类
```typescript
declare class SCH_SimulationEngine
```
- **pushdata**: `pushData(eventType: ESCH_DynamicSimulationEnginePushEventType | ESCH_SpiceSimulationEnginePushEventType, props: { [key: string]: any; }): void;`
---
## SCH_Utils
原理图 & 符号 / 工具类
```typescript
declare class SCH_Utils
```
---
## SYS_ClientUrl
系统 / 外部请求类
```typescript
declare class SYS_ClientUrl
```
- **request**: `request(url: string, method?: 'GET' | 'POST' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH', data?: string | Blob | FormData | URLSearchParams, options?: { headers?: { [header: string]: any; }; integrity?: string; }, succeedCallFn?: (data: Response) => void | Promise<void>): Promise<Response>;`
---
## SYS_Dialog
系统 / 对话框类
```typescript
declare class SYS_Dialog
```
- **showconfirmationmessage**: `showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;`
- **showinformationmessage**: `showInformationMessage(content: string, title?: string, buttonTitle?: string): void;`
- **showinputdialog**: *(签名过长,请查看详细文档)*
- **showselectdialog**: `showSelectDialog(options: Array<string> | Array<{ value: string; displayContent: string; }>, beforeContent?: string, afterContent?: string, title?: string, defaultOption?: string, multiple?: false, callbackFn?: (value: string) => void | Promise<void>): void;`
- **showselectdialog_1**: `showSelectDialog(options: Array<string> | Array<{ value: string; displayContent: string; }>, beforeContent?: string, afterContent?: string, title?: string, defaultOption?: Array<string>, multiple?: true, callbackFn?: (value: Array<string>) => void | Promise<void>): void;`
---
## SYS_Environment
系统 / 运行环境类
```typescript
declare class SYS_Environment
```
- **geteditorcomplieddate**: `getEditorCompliedDate(): string;`
- **geteditorcurrentversion**: `getEditorCurrentVersion(): string;`
- **getuserinfo**: `getUserInfo(): { username?: string; nickname?: string; avatar?: string; uuid?: string; customerCode?: string; };`
- **isclient**: `isClient(): boolean;`
- **iseasyedaproedition**: `isEasyEDAProEdition(): boolean;`
- **ishalfofflinemode**: `isHalfOfflineMode(): boolean;`
- **isjlcedaproedition**: `isJLCEDAProEdition(): boolean;`
- **isofflinemode**: `isOfflineMode(): boolean;`
- **isonlinemode**: `isOnlineMode(): boolean;`
- **isproprivateedition**: `isProPrivateEdition(): boolean;`
- **isweb**: `isWeb(): boolean;`
---
## SYS_FileManager
系统 / 文件管理类
```typescript
declare class SYS_FileManager
```
- **extractlibinfo**: `extractLibInfo(data: File | Array<File>): Promise<any>;`
- **extractprojectinfo**: `extractProjectInfo(data: File): Promise<any>;`
- **getcbbfilebycbbuuid**: `getCbbFileByCbbUuid(cbbUuid: string, libraryUuid?: string, props?: { fileName?: string; password?: string; fileType?: 'epro' | 'epro2'; templateSchematicUuid?: string; templatePcbUuid?: string; }): Promise<File | undefined>;`
- **getdevicefilebydeviceuuid**: `getDeviceFileByDeviceUuid(deviceUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;`
- **getdocumentfile**: `getDocumentFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;`
- **getdocumentfootprintsources**: `getDocumentFootprintSources(): Promise<Array<{ footprintUuid: string; documentSource: string; }>>;`
- **getdocumentsource**: `getDocumentSource(): Promise<string | undefined>;`
- **getfootprintfilebyfootprintuuid**: `getFootprintFileByFootprintUuid(footprintUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;`
- **getpanellibraryfilebypanellibraryuuid**: `getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;`
- **getprojectfile**: `getProjectFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;`
- **getprojectfilebyprojectuuid**: `getProjectFileByProjectUuid(projectUuid: string, fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;`
- **importprojectbyprojectfile**: *(签名过长,请查看详细文档)*
- **importprojectbyprojectfile_1**: *(签名过长,请查看详细文档)*
- **setdocumentsource**: `setDocumentSource(source: string): Promise<boolean>;`
---
## SYS_FileSystem
系统 / 文件系统交互类
```typescript
declare class SYS_FileSystem
```
- **deletefileinfilesystem**: `deleteFileInFileSystem(uri: string, force?: boolean): Promise<boolean>;`
- **getdocumentspath**: `getDocumentsPath(): Promise<string>;`
- **getedapath**: `getEdaPath(): Promise<string>;`
- **getextensionfile**: `getExtensionFile(uri: string): Promise<File | undefined>;`
- **getlibrariespaths**: `getLibrariesPaths(): Promise<Array<string>>;`
- **getprojectspaths**: `getProjectsPaths(): Promise<Array<string>>;`
- **listfilesoffilesystem**: `listFilesOfFileSystem(folderPath: string, recursive?: boolean): Promise<Array<ISYS_FileSystemFileList>>;`
- **openreadfiledialog**: `openReadFileDialog(filenameExtensions?: string | Array<string>, multiFiles?: true): Promise<Array<File> | undefined>;`
- **openreadfiledialog_1**: `openReadFileDialog(filenameExtensions?: string | Array<string>, multiFiles?: false): Promise<File | undefined>;`
- **readfilefromfilesystem**: `readFileFromFileSystem(uri: string): Promise<File | undefined>;`
- **savefile**: `saveFile(fileData: File | Blob, fileName?: string): Promise<void>;`
- **savefiletofilesystem**: `saveFileToFileSystem(uri: string, fileData: File | Blob, fileName?: string, force?: boolean): Promise<boolean>;`
---
## SYS_FontManager
系统 / 字体管理类
```typescript
declare class SYS_FontManager
```
- **addfont**: `addFont(fontName: string): Promise<boolean>;`
- **deletefont**: `deleteFont(fontName: string): Promise<boolean>;`
- **getfontslist**: `getFontsList(): Promise<Array<string>>;`
---
## SYS_FormatConversion
系统 / 格式转换(Chameleon)类
```typescript
declare class SYS_FormatConversion
```
- **convertaltiumdesignerlibrariestoeasyedamultifiles**: `convertAltiumDesignerLibrariesToEasyEDAMultiFiles(file: File | Array<File>): Promise<Array<File>>;`
- **convertaltiumdesignerlibrariestoeasyedasinglefile**: `convertAltiumDesignerLibrariesToEasyEDASingleFile(file: File | Array<File>): Promise<File | undefined>;`
- **convertdisalibrariestoeasyedamultifiles**: `convertDisaLibrariesToEasyEDAMultiFiles(file: File | Array<File>): Promise<Array<File>>;`
- **convertdisalibrariestoeasyedasinglefile**: `convertDisaLibrariesToEasyEDASingleFile(file: File | Array<File>): Promise<File | undefined>;`
---
## SYS_HeaderMenu
系统 / 顶部菜单类
```typescript
declare class SYS_HeaderMenu
```
- **insertheadermenus**: `insertHeaderMenus(headerMenus: ISYS_HeaderMenus): Promise<void>;`
- **insertsystemheadermenuitem**: `insertSystemHeaderMenuItem(env: ESYS_HeaderMenuEnvironment, id: Array<string>, props: { title: string; registerFn?: string; menuItems?: Array<ISYS_HeaderMenuSub1MenuItem | ISYS_HeaderMenuSub2MenuItem | null>; insertDividerBefore?: boolean; insertDividerAfter?: boolean; insertBefore?: string; crossDividerWhenInsert?: boolean; }): Promise<string | undefined>;`
- **removeheadermenus**: `removeHeaderMenus(): void;`
- **removesystemheadermenuitem**: `removeSystemHeaderMenuItem(id: Array<string>, props?: { removeTheBeforeDivider?: boolean; removeTheAfterDivider?: boolean; }): Promise<boolean>;`
- **replaceheadermenus**: `replaceHeaderMenus(headerMenus: ISYS_HeaderMenus): Promise<void>;`
---
## SYS_I18n
系统 / 多语言类
```typescript
declare class SYS_I18n
```
- **addlanguagechangedeventlistener**: `addLanguageChangedEventListener(id: string, callFn: (newLanguage: string, lastLanguage: string) => void | Promise<void>, onlyOnce: boolean): void;`
- **getallsupportedlanguages**: `getAllSupportedLanguages(): Array<string>;`
- **getcurrentlanguage**: `getCurrentLanguage(): Promise<string>;`
- **importmultilingual**: `importMultilingual(language: string, source: ISYS_LanguageKeyValuePairs): boolean;`
- **importmultilinguallanguage**: `importMultilingualLanguage(namespace: string, language: string, source: ISYS_LanguageKeyValuePairs): boolean;`
- **importmultilingualnamespace**: `importMultilingualNamespace(namespace: string, source: ISYS_MultilingualLanguagesData): boolean;`
- **iseventlisteneralreadyexist**: `isEventListenerAlreadyExist(id: string): boolean;`
- **islanguagesupported**: `isLanguageSupported(language: string): boolean;`
- **removeeventlistener**: `removeEventListener(id: string): boolean;`
- **text**: `text(tag: string, namespace?: string, language?: string, ...args: Array<any>): string;`
---
## SYS_IFrame
系统 / 内联框架窗口类
```typescript
declare class SYS_IFrame
```
- **closeiframe**: `closeIFrame(id?: string): Promise<boolean>;`
- **hideiframe**: `hideIFrame(id?: string): Promise<boolean>;`
- **openiframe**: `openIFrame(htmlFileName: string, width?: number, height?: number, id?: string, props?: { maximizeButton?: boolean; minimizeButton?: boolean; minimizeStyle?: 'collapsed' | 'constricted'; buttonCallbackFn?: (button: 'close' | 'minimize' | 'maximize') => void | Promise<void>; onBeforeCloseCallFn?: () => boolean | undefined | Promise<boolean | undefined>; grayscaleMask?: boolean; title?: string; }): Promise<boolean>;`
- **showiframe**: `showIFrame(id?: string): Promise<boolean>;`
---
## SYS_LoadingAndProgressBar
系统 / 加载与进度条类
```typescript
declare class SYS_LoadingAndProgressBar
```
- **destroyloading**: `destroyLoading(): void;`
- **destroyprogressbar**: `destroyProgressBar(): void;`
- **showloading**: `showLoading(): void;`
- **showprogressbar**: `showProgressBar(progress?: number, title?: string): void;`
---
## SYS_Log
系统 / 日志类
```typescript
declare class SYS_Log
```
- **add**: `add(message: string, type?: ESYS_LogType): void;`
- **clear**: `clear(): void;`
- **export**: `export(types?: ESYS_LogType | Array<ESYS_LogType>): void;`
- **find**: `find(message: string | Array<string | { text: string; attr?: { id?: string; path?: string; sheet?: string; pcbid?: string; type?: string; }; }>, types?: ESYS_LogType | Array<ESYS_LogType>): Promise<Array<ISYS_LogLine>>;`
- **sort**: `sort(types?: ESYS_LogType | Array<ESYS_LogType>): Promise<Array<ISYS_LogLine>>;`
---
## SYS_Message
系统 / 消息通知类
```typescript
declare class SYS_Message
```
- **removefollowmousetip**: `removeFollowMouseTip(tip?: string): Promise<void>;`
- **showfollowmousetip**: `showFollowMouseTip(tip: string, msTimeout?: number): Promise<void>;`
- **showtoastmessage**: `showToastMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string): void;`
---
## SYS_MessageBox
系统 / 消息框类
```typescript
declare class SYS_MessageBox
```
- **showconfirmationmessage**: `showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;`
- **showinformationmessage**: `showInformationMessage(content: string, title?: string, buttonTitle?: string): void;`
---
## SYS_MessageBus
系统 / 消息总线类
```typescript
declare class SYS_MessageBus
```
- **createprivatemessagebus**: `createPrivateMessageBus(): void;`
- **publish**: `publish(topic: string, message: any): void;`
- **publishpublic**: `publishPublic(topic: string, message: any): void;`
- **pull**: `pull(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
- **pullasync**: `pullAsync(topic: string): Promise<any>;`
- **pullasyncpublic**: `pullAsyncPublic(topic: string): Promise<any>;`
- **pullpublic**: `pullPublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
- **push**: `push(topic: string, message: any): void;`
- **pushpublic**: `pushPublic(topic: string, message: any): void;`
- **removeprivatemessagebus**: `removePrivateMessageBus(): void;`
- **rpccall**: `rpcCall(topic: string, message?: any, timeout?: number): Promise<any>;`
- **rpccallpublic**: `rpcCallPublic(topic: string, message?: any, timeout?: number): Promise<any>;`
- **rpcservice**: `rpcService(topic: string, callbackFn: (...args: Array<any>) => any | Promise<any>): void;`
- **rpcservicepublic**: `rpcServicePublic(topic: string, callbackFn: (...args: Array<any>) => any | Promise<any>): void;`
- **subscribe**: `subscribe(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
- **subscribeonce**: `subscribeOnce(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
- **subscribeoncepublic**: `subscribeOncePublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
- **subscribepublic**: `subscribePublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;`
---
## SYS_PanelControl
系统 / 面板控制类
```typescript
declare class SYS_PanelControl
```
- **closebottompanel**: `closeBottomPanel(): void;`
- **closeleftpanel**: `closeLeftPanel(): void;`
- **closerightpanel**: `closeRightPanel(): void;`
- **isbottompanellocked**: `isBottomPanelLocked(): Promise<boolean>;`
- **isleftpanellocked**: `isLeftPanelLocked(): Promise<boolean>;`
- **isrightpanellocked**: `isRightPanelLocked(): Promise<boolean>;`
- **openbottompanel**: `openBottomPanel(tab?: ESYS_BottomPanelTab): void;`
- **openleftpanel**: `openLeftPanel(tab?: ESYS_LeftPanelTab): void;`
- **openrightpanel**: `openRightPanel(tab?: ESYS_RightPanelTab): void;`
- **togglebottompanellockstate**: `toggleBottomPanelLockState(state?: boolean): void;`
- **toggleleftpanellockstate**: `toggleLeftPanelLockState(state?: boolean): void;`
- **togglerightpanellockstate**: `toggleRightPanelLockState(state?: boolean): void;`
---
## SYS_RightClickMenu
系统 / 右键菜单类
```typescript
declare class SYS_RightClickMenu
```
- **changemenu**: `changeMenu(menuId: string, menuItems: Array<ISYS_RightClickMenuItem | null>): Promise<void>;`
---
## SYS_Setting
系统 / 设置类
```typescript
declare class SYS_Setting
```
- **restoredefault**: `restoreDefault(): Promise<boolean>;`
---
## SYS_ShortcutKey
系统 / 快捷键类
```typescript
declare class SYS_ShortcutKey
```
- **getshortcutkeys**: `getShortcutKeys(includeSystem?: boolean): Promise<Array<{ shortcutKey: TSYS_ShortcutKeys; title: string; documentType: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>; scene: Array<ESYS_ShortcutKeyEffectiveEditorScene>; }>>;`
- **registershortcutkey**: `registerShortcutKey(shortcutKey: TSYS_ShortcutKeys, title: string, callbackFn: (shortcutKey: TSYS_ShortcutKeys) => void | Promise<void>, documentType?: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>, scene?: Array<ESYS_ShortcutKeyEffectiveEditorScene>): Promise<boolean>;`
- **unregistershortcutkey**: `unregisterShortcutKey(shortcutKey: TSYS_ShortcutKeys): Promise<boolean>;`
---
## SYS_Storage
系统 / 存储类
```typescript
declare class SYS_Storage
```
- **clearextensionalluserconfigs**: `clearExtensionAllUserConfigs(): Promise<boolean>;`
- **deleteextensionuserconfig**: `deleteExtensionUserConfig(key: string): Promise<boolean>;`
- **getextensionalluserconfigs**: `getExtensionAllUserConfigs(): { [key: string]: any; };`
- **getextensionuserconfig**: `getExtensionUserConfig(key: string): any | undefined;`
- **setextensionalluserconfigs**: `setExtensionAllUserConfigs(configs: { [key: string]: any; }): Promise<boolean>;`
- **setextensionuserconfig**: `setExtensionUserConfig(key: string, value: any): Promise<boolean>;`
---
## SYS_Timer
系统 / 定时器类
```typescript
declare class SYS_Timer
```
- **clearintervaltimer**: `clearIntervalTimer(id: string): boolean;`
- **cleartimeouttimer**: `clearTimeoutTimer(id: string): boolean;`
- **setintervaltimer**: `setIntervalTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;`
- **settimeouttimer**: `setTimeoutTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;`
---
## SYS_ToastMessage
系统 / 吐司消息类
```typescript
declare class SYS_ToastMessage
```
- **showmessage**: `showMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string): void;`
---
## SYS_Tool
系统 / 工具类
```typescript
declare class SYS_Tool
```
- **netlistcomparison**: `netlistComparison(netlist1: string | { projectUuid: string; documentUuid: string; } | File, netlist2: string | { projectUuid: string; documentUuid: string; } | File): Promise<Array<{ type: 'Net' | 'Component'; object: string; netlist1Name: Array<string>; netlist2Name: Array<string>; }>>;`
---
## SYS_Unit
系统 / 单位类
```typescript
declare class SYS_Unit
```
- **getfrontenddataunit**: `getFrontendDataUnit(): Promise<ESYS_Unit | undefined>;`
- **inchtomil**: `inchToMil(inch: number, numberOfDecimals?: number): number;`
- **inchtomm**: `inchToMm(inch: number, numberOfDecimals?: number): number;`
- **miltoinch**: `milToInch(mil: number, numberOfDecimals?: number): number;`
- **miltomm**: `milToMm(mil: number, numberOfDecimals?: number): number;`
- **mmtoinch**: `mmToInch(mm: number, numberOfDecimals?: number): number;`
- **mmtomil**: `mmToMil(mm: number, numberOfDecimals?: number): number;`
---
## SYS_WebSocket
系统 / WebSocket 类
```typescript
declare class SYS_WebSocket
```
- **close**: `close(id: string, code?: number, reason?: string, extensionUuid?: string): void;`
- **register**: `register(id: string, serviceUri: string, receiveMessageCallFn?: (event: MessageEvent<any>) => void | Promise<void>, connectedCallFn?: () => void | Promise<void>, protocols?: string | Array<string>): void;`
- **send**: `send(id: string, data: string | ArrayBuffer | Blob | ArrayBufferView, extensionUuid?: string): void;`
---
## SYS_Window
系统 / 窗口类
```typescript
declare class SYS_Window
```
- **addeventlistener**: `addEventListener(type: ESYS_WindowEventType, listener: (ev: any) => any, options?: { capture?: boolean; once?: boolean; passive?: boolean; signal?: AbortSignal; }): ISYS_WindowEventListenerRemovableObject | undefined;`
- **getcurrenttheme**: `getCurrentTheme(): Promise<ESYS_Theme>;`
- **geturlanchor**: `getUrlAnchor(): string;`
- **geturlparam**: `getUrlParam(key: string): string | null;`
- **open**: `open(url: string, target?: ESYS_WindowOpenTarget): void;`
- **openui**: `openUI(uiName: string, args?: { [key: string]: any; }): Promise<void>;`
- **removeeventlistener**: `removeEventListener(removableObject: ISYS_WindowEventListenerRemovableObject): void;`
- **urlpushstate**: `urlPushState(url: string): void;`
- **urlreplacestate**: `urlReplaceState(url: string): void;`
---
FILE:references/classes/DMT_Board.md
# DMT\_Board class
文档树 / 板子管理类
## Signature
```typescript
declare class DMT_Board
```
## Remarks
在当前打开的工程内进行板子管理的相关操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copyBoard(sourceBoardName)](./DMT_Board.md)
</td><td>
</td><td>
复制板子
</td></tr>
<tr><td>
[createBoard(schematicUuid, pcbUuid)](./DMT_Board.md)
</td><td>
</td><td>
**_(BETA)_** 创建板子
</td></tr>
<tr><td>
[deleteBoard(boardName)](./DMT_Board.md)
</td><td>
</td><td>
删除板子
</td></tr>
<tr><td>
[getAllBoardsInfo()](./DMT_Board.md)
</td><td>
</td><td>
获取工程内所有板子的详细属性
</td></tr>
<tr><td>
[getBoardInfo(boardName)](./DMT_Board.md)
</td><td>
</td><td>
获取板子的详细属性
</td></tr>
<tr><td>
[getCurrentBoardInfo()](./DMT_Board.md)
</td><td>
</td><td>
获取当前板子的详细属性
</td></tr>
<tr><td>
[modifyBoardName(originalBoardName, boardName)](./DMT_Board.md)
</td><td>
</td><td>
修改板子名称
</td></tr>
</tbody></table>
---
## 方法详情
### copyboard
# DMT\_Board.copyBoard() method
复制板子
## Signature
```typescript
copyBoard(sourceBoardName: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
sourceBoardName
</td><td>
string
</td><td>
源板子名称
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
新板子名称,如若为 `undefined` 则复制失败
### createboard
# DMT\_Board.createBoard() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建板子
## Signature
```typescript
createBoard(schematicUuid?: string, pcbUuid?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
_(Optional)_ 关联原理图 UUID
</td></tr>
<tr><td>
pcbUuid
</td><td>
string
</td><td>
_(Optional)_ 关联 PCB UUID
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
板子名称,如若为 `undefined` 则创建失败
### deleteboard
# DMT\_Board.deleteBoard() method
删除板子
## Signature
```typescript
deleteBoard(boardName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
boardName
</td><td>
string
</td><td>
板子名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如若指定板子不存在,接口将返回 `false` 的结果,表示操作失败
### getallboardsinfo
# DMT\_Board.getAllBoardsInfo() method
获取工程内所有板子的详细属性
## Signature
```typescript
getAllBoardsInfo(): Promise<Array<IDMT_BoardItem>>;
```
## Returns
Promise<Array<[IDMT\_BoardItem](../interfaces/IDMT_BoardItem.md)<!-- -->>>
所有板子的详细属性的数组
### getboardinfo
# DMT\_Board.getBoardInfo() method
获取板子的详细属性
## Signature
```typescript
getBoardInfo(boardName: string): Promise<IDMT_BoardItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
boardName
</td><td>
string
</td><td>
板子名称
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_BoardItem](../interfaces/IDMT_BoardItem.md) \| undefined>
板子的详细属性,如若为 `undefined` 则获取失败
### getcurrentboardinfo
# DMT\_Board.getCurrentBoardInfo() method
获取当前板子的详细属性
## Signature
```typescript
getCurrentBoardInfo(): Promise<IDMT_BoardItem | undefined>;
```
## Returns
Promise<[IDMT\_BoardItem](../interfaces/IDMT_BoardItem.md) \| undefined>
板子的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的原理图、PCB 所关联的板子的详细属性
### modifyboardname
# DMT\_Board.modifyBoardName() method
修改板子名称
## Signature
```typescript
modifyBoardName(originalBoardName: string, boardName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalBoardName
</td><td>
string
</td><td>
原板子名称
</td></tr>
<tr><td>
boardName
</td><td>
string
</td><td>
新板子名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
FILE:references/classes/DMT_EditorControl.md
# DMT\_EditorControl class
文档树 / 编辑器控制类
## Signature
```typescript
declare class DMT_EditorControl
```
## Remarks
此处编辑器控制基于当前已打开的工程设计下的图页,其它任何 `documentUuid` 都将被认为是不存在的文档页
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[activateDocument(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
激活文档
</td></tr>
<tr><td>
[activateSplitScreen(splitScreenId)](./DMT_EditorControl.md)
</td><td>
</td><td>
激活分屏
</td></tr>
<tr><td>
[closeDocument(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
关闭文档
</td></tr>
<tr><td>
[createSplitScreen(splitScreenType, tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
创建分屏
</td></tr>
<tr><td>
[generateIndicatorMarkers(markers, color, lineWidth, zoom, tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 生成指示标记
</td></tr>
<tr><td>
[getCurrentRenderedAreaImage(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 获取画布渲染区域图像
</td></tr>
<tr><td>
[getSplitScreenIdByTabId(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
使用标签页 ID 获取分屏 ID
</td></tr>
<tr><td>
[getSplitScreenTree()](./DMT_EditorControl.md)
</td><td>
</td><td>
获取编辑器分屏属性树
</td></tr>
<tr><td>
[getTabsBySplitScreenId(splitScreenId)](./DMT_EditorControl.md)
</td><td>
</td><td>
获取指定分屏 ID 下的所有标签页
</td></tr>
<tr><td>
[mergeAllDocumentFromSplitScreen()](./DMT_EditorControl.md)
</td><td>
</td><td>
合并所有分屏
</td></tr>
<tr><td>
[moveDocumentToSplitScreen(tabId, splitScreenId)](./DMT_EditorControl.md)
</td><td>
</td><td>
将文档移动到指定分屏
</td></tr>
<tr><td>
[openDocument(documentUuid, splitScreenId)](./DMT_EditorControl.md)
</td><td>
</td><td>
打开文档
</td></tr>
<tr><td>
[openLibraryDocument(libraryUuid, libraryType, uuid, splitScreenId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 打开库符号、封装文档
</td></tr>
<tr><td>
[removeIndicatorMarkers(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 移除指示标记
</td></tr>
<tr><td>
[tileAllDocumentToSplitScreen()](./DMT_EditorControl.md)
</td><td>
</td><td>
平铺所有文档
</td></tr>
<tr><td>
[zoomTo(x, y, scaleRatio, tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 缩放到坐标
</td></tr>
<tr><td>
[zoomToAllPrimitives(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 缩放到所有图元(适应全部)
</td></tr>
<tr><td>
[zoomToRegion(left, right, top, bottom, tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 缩放到区域
</td></tr>
<tr><td>
[zoomToSelectedPrimitives(tabId)](./DMT_EditorControl.md)
</td><td>
</td><td>
**_(BETA)_** 缩放到已选中图元(适应选中)
</td></tr>
</tbody></table>
---
## 方法详情
### activatedocument
# DMT\_EditorControl.activateDocument() method
激活文档
## Signature
```typescript
activateDocument(tabId: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
标签页 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
切换到指定文档的标签页,并将输入焦点置于其中
### activatesplitscreen
# DMT\_EditorControl.activateSplitScreen() method
激活分屏
## Signature
```typescript
activateSplitScreen(splitScreenId: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
splitScreenId
</td><td>
string
</td><td>
分屏 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
使输入焦点
### closedocument
# DMT\_EditorControl.closeDocument() method
关闭文档
## Signature
```typescript
closeDocument(tabId: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
标签页 ID,此处支持 [IDMT\_SchematicPageItem.uuid](../interfaces/IDMT_SchematicPageItem.md)<!-- -->、[IDMT\_PcbItem.uuid](../interfaces/IDMT_PcbItem.md)<!-- -->、[IDMT\_PanelItem.uuid](../interfaces/IDMT_PanelItem.md) 作为输入
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如若文档尚未保存,执行此操作将会直接丢失所有未保存的数据,请在修改操作完成后首先执行 [SCH\_Document.save()](./SCH_Document.md)<!-- -->、[PCB\_Document.save()](./PCB_Document.md)<!-- -->、[PNL\_Document.save()](./PNL_Document.md) 保存数据
### createsplitscreen
# DMT\_EditorControl.createSplitScreen() method
创建分屏
## Signature
```typescript
createSplitScreen(splitScreenType: EDMT_EditorSplitScreenDirection, tabId: string): Promise<{
sourceSplitScreenId: string;
newSplitScreenId: string;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
splitScreenType
</td><td>
[EDMT\_EditorSplitScreenDirection](../enums/EDMT_EditorSplitScreenDirection.md)
</td><td>
分屏类型,`horizontal` 水平、`vertical` 垂直
</td></tr>
<tr><td>
tabId
</td><td>
string
</td><td>
标签页 ID,该标签页将会被移入新的分屏中
</td></tr>
</tbody></table>
## Returns
Promise<{ sourceSplitScreenId: string; newSplitScreenId: string; } \| undefined>
分屏 ID,`sourceSplitScreenId` 代表源分屏,`newSplitScreenId` 代表新分屏
## Remarks
请确认 [tabId](./DMT_EditorControl.md) 对应的分屏存在两个以上的标签页,否则分屏将不会执行,并返回 `undefined`
### generateindicatormarkers
# DMT\_EditorControl.generateIndicatorMarkers() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
生成指示标记
## Signature
```typescript
generateIndicatorMarkers(markers: Array<IDMT_IndicatorMarkerShape>, color?: {
r: number;
g: number;
b: number;
alpha: number;
}, lineWidth?: number, zoom?: boolean, tabId?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
markers
</td><td>
Array<[IDMT\_IndicatorMarkerShape](../interfaces/IDMT_IndicatorMarkerShape.md)<!-- -->>
</td><td>
指示标记外形对象数组
</td></tr>
<tr><td>
color
</td><td>
\{ r: number; g: number; b: number; alpha: number; \}
</td><td>
_(Optional)_ 指示标记颜色
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
zoom
</td><td>
boolean
</td><td>
_(Optional)_ 是否定位并缩放
</td></tr>
<tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
指示标记生成是否成功,`false` 表示画布不支持该操作或 `tabId` 不存在
## Remarks
指示标记外形数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil
### getcurrentrenderedareaimage
# DMT\_EditorControl.getCurrentRenderedAreaImage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取画布渲染区域图像
## Signature
```typescript
getCurrentRenderedAreaImage(tabId?: string): Promise<Blob | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则获取最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<Blob \| undefined>
- 画布渲染区域的 Blob 格式图像数据
### getsplitscreenidbytabid
# DMT\_EditorControl.getSplitScreenIdByTabId() method
使用标签页 ID 获取分屏 ID
## Signature
```typescript
getSplitScreenIdByTabId(tabId: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
标签页 ID
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
分屏 ID
### getsplitscreentree
# DMT\_EditorControl.getSplitScreenTree() method
获取编辑器分屏属性树
## Signature
```typescript
getSplitScreenTree(): Promise<IDMT_EditorSplitScreenItem | undefined>;
```
## Returns
Promise<[IDMT\_EditorSplitScreenItem](../interfaces/IDMT_EditorSplitScreenItem.md) \| undefined>
编辑器分屏属性树,如若为 `undefined`<!-- -->,则数据获取失败
### gettabsbysplitscreenid
# DMT\_EditorControl.getTabsBySplitScreenId() method
获取指定分屏 ID 下的所有标签页
## Signature
```typescript
getTabsBySplitScreenId(splitScreenId: string): Promise<Array<IDMT_EditorTabItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
splitScreenId
</td><td>
string
</td><td>
分屏 ID
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IDMT\_EditorTabItem](../interfaces/IDMT_EditorTabItem.md)<!-- -->>>
标签页列表
## Remarks
如果指定分屏下不存在直接标签页(即它属下还存在 [children](../interfaces/IDMT_EditorSplitScreenItem.md)<!-- -->),则返回空数组
### mergealldocumentfromsplitscreen
# DMT\_EditorControl.mergeAllDocumentFromSplitScreen() method
合并所有分屏
## Signature
```typescript
mergeAllDocumentFromSplitScreen(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
仅当存在子分屏时可用,将会取消所有子分屏,并将所有文档标签页合并到初始分屏内
### movedocumenttosplitscreen
# DMT\_EditorControl.moveDocumentToSplitScreen() method
将文档移动到指定分屏
## Signature
```typescript
moveDocumentToSplitScreen(tabId: string, splitScreenId: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
标签页 ID
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
[分屏 ID](../interfaces/IDMT_EditorSplitScreenItem.md)
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
移动文档后,编辑器分屏属性树可能会出现变化
### opendocument
# DMT\_EditorControl.openDocument() method
打开文档
## Signature
```typescript
openDocument(documentUuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
documentUuid
</td><td>
string
</td><td>
文档 UUID,此处支持 [IDMT\_SchematicItem.uuid](../interfaces/IDMT_SchematicItem.md)<!-- -->、[IDMT\_SchematicPageItem.uuid](../interfaces/IDMT_SchematicPageItem.md)<!-- -->、[IDMT\_PcbItem.uuid](../interfaces/IDMT_PcbItem.md)<!-- -->、[IDMT\_PanelItem.uuid](../interfaces/IDMT_PanelItem.md) 作为输入
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,即 [DMT\_EditorControl.getSplitScreenTree()](./DMT_EditorControl.md) 方法获取到的 [IDMT\_EditorSplitScreenItem.id](../interfaces/IDMT_EditorSplitScreenItem.md)
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,如若为 `undefined`<!-- -->,则打开文档失败
### openlibrarydocument
# DMT\_EditorControl.openLibraryDocument() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
打开库符号、封装文档
## Signature
```typescript
openLibraryDocument(libraryUuid: string, libraryType: ELIB_LibraryType.SYMBOL | ELIB_LibraryType.FOOTPRINT, uuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType.SYMBOL](../enums/ELIB_LibraryType.md) \| [ELIB\_LibraryType.FOOTPRINT](../enums/ELIB_LibraryType.md)
</td><td>
库类型,支持符号和封装
</td></tr>
<tr><td>
uuid
</td><td>
string
</td><td>
符号、封装 UUID
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,即 [DMT\_EditorControl.getSplitScreenTree()](./DMT_EditorControl.md) 方法获取到的 [IDMT\_EditorSplitScreenItem.id](../interfaces/IDMT_EditorSplitScreenItem.md)
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,如若为 `undefined`<!-- -->,则打开文档失败
### removeindicatormarkers
# DMT\_EditorControl.removeIndicatorMarkers() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
移除指示标记
## Signature
```typescript
removeIndicatorMarkers(tabId?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
指示标记移除是否成功,`false` 表示画布不支持该操作或 `tabId` 不存在
## Remarks
本接口会移除所有已生成的指示标记
### tilealldocumenttosplitscreen
# DMT\_EditorControl.tileAllDocumentToSplitScreen() method
平铺所有文档
## Signature
```typescript
tileAllDocumentToSplitScreen(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
仅当不存在子分屏时可用,将会自动为所有已打开的文档标签页创建分屏
### zoomto
# DMT\_EditorControl.zoomTo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
缩放到坐标
## Signature
```typescript
zoomTo(x?: number, y?: number, scaleRatio?: number, tabId?: string): Promise<{
left: number;
right: number;
top: number;
bottom: number;
} | false>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
_(Optional)_ 中心坐标 X,如若不传入则不改变当前 X 坐标
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
_(Optional)_ 中心坐标 Y,如若不传入则不改变当前 Y 坐标
</td></tr>
<tr><td>
scaleRatio
</td><td>
number
</td><td>
_(Optional)_ 缩放比,如若不传入则不改变当前缩放比,单位跨度为 `1/100`<!-- -->,如若传入 `200`<!-- -->,则表示缩放比为 `200%`
</td></tr>
<tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<{ left: number; right: number; top: number; bottom: number; } \| false>
缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
## Remarks
在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil
### zoomtoallprimitives
# DMT\_EditorControl.zoomToAllPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
缩放到所有图元(适应全部)
## Signature
```typescript
zoomToAllPrimitives(tabId?: string): Promise<{
left: number;
right: number;
top: number;
bottom: number;
} | false>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<{ left: number; right: number; top: number; bottom: number; } \| false>
缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
## Remarks
在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil
### zoomtoregion
# DMT\_EditorControl.zoomToRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
缩放到区域
## Signature
```typescript
zoomToRegion(left: number, right: number, top: number, bottom: number, tabId?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
left
</td><td>
number
</td><td>
矩形框第一 X 坐标
</td></tr>
<tr><td>
right
</td><td>
number
</td><td>
矩形框第二 X 坐标
</td></tr>
<tr><td>
top
</td><td>
number
</td><td>
矩形框第一 Y 坐标
</td></tr>
<tr><td>
bottom
</td><td>
number
</td><td>
矩形框第二 Y 坐标
</td></tr>
<tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil
### zoomtoselectedprimitives
# DMT\_EditorControl.zoomToSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
缩放到已选中图元(适应选中)
## Signature
```typescript
zoomToSelectedPrimitives(tabId?: string): Promise<{
left: number;
right: number;
top: number;
bottom: number;
} | false>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tabId
</td><td>
string
</td><td>
_(Optional)_ 标签页 ID,如若未传入,则为最后输入焦点的画布
</td></tr>
</tbody></table>
## Returns
Promise<{ left: number; right: number; top: number; bottom: number; } \| false>
缩放到的区域数据,`false` 表示画布不支持该缩放操作或 `tabId` 不存在
## Remarks
在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil
FILE:references/classes/DMT_Folder.md
# DMT\_Folder class
文档树 / 文件夹类
## Signature
```typescript
declare class DMT_Folder
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createFolder(folderName, teamUuid, parentFolderUuid, description)](./DMT_Folder.md)
</td><td>
</td><td>
**_(BETA)_** 创建文件夹
</td></tr>
<tr><td>
[deleteFolder(teamUuid, folderUuid)](./DMT_Folder.md)
</td><td>
</td><td>
删除文件夹
</td></tr>
<tr><td>
[getAllFoldersUuid(teamUuid)](./DMT_Folder.md)
</td><td>
</td><td>
获取所有文件夹的 UUID
</td></tr>
<tr><td>
[getFolderInfo(teamUuid, folderUuid)](./DMT_Folder.md)
</td><td>
</td><td>
获取文件夹详细属性
</td></tr>
<tr><td>
[modifyFolderDescription(teamUuid, folderUuid, description)](./DMT_Folder.md)
</td><td>
</td><td>
**_(BETA)_** 修改文件夹描述
</td></tr>
<tr><td>
[modifyFolderName(teamUuid, folderUuid, folderName)](./DMT_Folder.md)
</td><td>
</td><td>
修改文件夹名称
</td></tr>
<tr><td>
[moveFolderToFolder(teamUuid, folderUuid, parentFolderUuid)](./DMT_Folder.md)
</td><td>
</td><td>
移动文件夹
</td></tr>
</tbody></table>
---
## 方法详情
### createfolder
# DMT\_Folder.createFolder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建文件夹
## Signature
```typescript
createFolder(folderName: string, teamUuid: string, parentFolderUuid?: string, description?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
folderName
</td><td>
string
</td><td>
文件夹名称
</td></tr>
<tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
parentFolderUuid
</td><td>
string
</td><td>
_(Optional)_ 父文件夹 UUID,如若不指定,则为根文件夹
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 文件夹描述
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
文件夹 UUID,如若为 `undefined` 则创建失败
### deletefolder
# DMT\_Folder.deleteFolder() method
删除文件夹
## Signature
```typescript
deleteFolder(teamUuid: string, folderUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallfoldersuuid
# DMT\_Folder.getAllFoldersUuid() method
获取所有文件夹的 UUID
## Signature
```typescript
getAllFoldersUuid(teamUuid: string): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
文件夹 UUID 数组
## Remarks
本接口忽略层级信息,将会返回所有层级的文件夹的 UUID 并放置于一维数组中
### getfolderinfo
# DMT\_Folder.getFolderInfo() method
获取文件夹详细属性
## Signature
```typescript
getFolderInfo(teamUuid: string, folderUuid: string): Promise<IDMT_FolderItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_FolderItem](../interfaces/IDMT_FolderItem.md) \| undefined>
文件夹属性,如若为 `undefined` 则获取失败
## Remarks
当 [parentFolderUuid](../interfaces/IDMT_FolderItem.md) 等于 [teamUuid](../interfaces/IDMT_FolderItem.md) 时,代表当前文件夹为指定团队下的一级文件夹
### modifyfolderdescription
# DMT\_Folder.modifyFolderDescription() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改文件夹描述
## Signature
```typescript
modifyFolderDescription(teamUuid: string, folderUuid: string, description?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 文件夹描述,如若为 `undefined` 则清空工程现有描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
## Remarks
修改文件夹描述需要与工作区系统进行交互,修改操作存在延迟,需要短暂等待后才会呈现效果
### modifyfoldername
# DMT\_Folder.modifyFolderName() method
修改文件夹名称
## Signature
```typescript
modifyFolderName(teamUuid: string, folderUuid: string, folderName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
<tr><td>
folderName
</td><td>
string
</td><td>
文件夹名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
### movefoldertofolder
# DMT\_Folder.moveFolderToFolder() method
移动文件夹
## Signature
```typescript
moveFolderToFolder(teamUuid: string, folderUuid: string, parentFolderUuid?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
<tr><td>
parentFolderUuid
</td><td>
string
</td><td>
_(Optional)_ 父文件夹 UUID,如若不指定,则默认为根文件夹
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否移动成功
FILE:references/classes/DMT_Panel.md
# DMT\_Panel class
文档树 / 面板管理类
## Signature
```typescript
declare class DMT_Panel
```
## Remarks
在当前打开的工程内进行面板管理的相关操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copyPanel(panelUuid)](./DMT_Panel.md)
</td><td>
</td><td>
复制面板
</td></tr>
<tr><td>
[createPanel()](./DMT_Panel.md)
</td><td>
</td><td>
**_(BETA)_** 创建面板
</td></tr>
<tr><td>
[deletePanel(panelUuid)](./DMT_Panel.md)
</td><td>
</td><td>
删除面板
</td></tr>
<tr><td>
[getAllPanelsInfo()](./DMT_Panel.md)
</td><td>
</td><td>
获取工程内所有面板的详细属性
</td></tr>
<tr><td>
[getCurrentPanelInfo()](./DMT_Panel.md)
</td><td>
</td><td>
获取当前面板的详细属性
</td></tr>
<tr><td>
[getPanelInfo(panelUuid)](./DMT_Panel.md)
</td><td>
</td><td>
获取面板的详细属性
</td></tr>
<tr><td>
[modifyPanelName(panelUuid, panelName)](./DMT_Panel.md)
</td><td>
</td><td>
修改面板名称
</td></tr>
</tbody></table>
---
## 方法详情
### copypanel
# DMT\_Panel.copyPanel() method
复制面板
## Signature
```typescript
copyPanel(panelUuid: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelUuid
</td><td>
string
</td><td>
源面板 UUID
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
新面板 UUID,如若为 `undefined` 则复制失败
### createpanel
# DMT\_Panel.createPanel() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建面板
## Signature
```typescript
createPanel(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
面板 UUID,如若为 `undefined` 则创建失败
### deletepanel
# DMT\_Panel.deletePanel() method
删除面板
## Signature
```typescript
deletePanel(panelUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelUuid
</td><td>
string
</td><td>
面板 UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallpanelsinfo
# DMT\_Panel.getAllPanelsInfo() method
获取工程内所有面板的详细属性
## Signature
```typescript
getAllPanelsInfo(): Promise<Array<IDMT_PanelItem>>;
```
## Returns
Promise<Array<[IDMT\_PanelItem](../interfaces/IDMT_PanelItem.md)<!-- -->>>
所有面板的详细属性的数组
### getcurrentpanelinfo
# DMT\_Panel.getCurrentPanelInfo() method
获取当前面板的详细属性
## Signature
```typescript
getCurrentPanelInfo(): Promise<IDMT_PanelItem | undefined>;
```
## Returns
Promise<[IDMT\_PanelItem](../interfaces/IDMT_PanelItem.md) \| undefined>
面板的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的面板的详细属性
### getpanelinfo
# DMT\_Panel.getPanelInfo() method
获取面板的详细属性
## Signature
```typescript
getPanelInfo(panelUuid: string): Promise<IDMT_PanelItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelUuid
</td><td>
string
</td><td>
面板 UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_PanelItem](../interfaces/IDMT_PanelItem.md) \| undefined>
面板的详细属性,如若为 `undefined` 则获取失败
### modifypanelname
# DMT\_Panel.modifyPanelName() method
修改面板名称
## Signature
```typescript
modifyPanelName(panelUuid: string, panelName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelUuid
</td><td>
string
</td><td>
面板 UUID
</td></tr>
<tr><td>
panelName
</td><td>
string
</td><td>
面板名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
FILE:references/classes/DMT_Pcb.md
# DMT\_Pcb class
文档树 / PCB 管理类
## Signature
```typescript
declare class DMT_Pcb
```
## Remarks
在当前打开的工程内进行 PCB 管理的相关操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copyPcb(pcbUuid, boardName)](./DMT_Pcb.md)
</td><td>
</td><td>
复制 PCB
</td></tr>
<tr><td>
[createPcb(boardName)](./DMT_Pcb.md)
</td><td>
</td><td>
创建 PCB
</td></tr>
<tr><td>
[deletePcb(pcbUuid)](./DMT_Pcb.md)
</td><td>
</td><td>
删除 PCB
</td></tr>
<tr><td>
[getAllPcbsInfo()](./DMT_Pcb.md)
</td><td>
</td><td>
获取工程内所有 PCB 的详细属性
</td></tr>
<tr><td>
[getCurrentPcbInfo()](./DMT_Pcb.md)
</td><td>
</td><td>
获取当前 PCB 的详细属性
</td></tr>
<tr><td>
[getPcbInfo(pcbUuid)](./DMT_Pcb.md)
</td><td>
</td><td>
获取 PCB 的详细属性
</td></tr>
<tr><td>
[modifyPcbName(pcbUuid, pcbName)](./DMT_Pcb.md)
</td><td>
</td><td>
修改 PCB 名称
</td></tr>
</tbody></table>
---
## 方法详情
### copypcb
# DMT\_Pcb.copyPcb() method
复制 PCB
## Signature
```typescript
copyPcb(pcbUuid: string, boardName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pcbUuid
</td><td>
string
</td><td>
源 PCB UUID
</td></tr>
<tr><td>
boardName
</td><td>
string
</td><td>
_(Optional)_ 新 PCB 所属板子名称,如若不指定则为游离 PCB
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
新 PCB UUID,如若为 `undefined` 则复制失败
## Remarks
即使此处 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),也不新建复用模块符号,此操作逻辑与当前编辑器前端保持一致
### createpcb
# DMT\_Pcb.createPcb() method
创建 PCB
## Signature
```typescript
createPcb(boardName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
boardName
</td><td>
string
</td><td>
_(Optional)_ 所属板子名称,如若不指定则为游离 PCB
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
PCB UUID,如若为 `undefined` 则创建失败
### deletepcb
# DMT\_Pcb.deletePcb() method
删除 PCB
## Signature
```typescript
deletePcb(pcbUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pcbUuid
</td><td>
string
</td><td>
PCB UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如若 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),则删除 PCB 时将同步删除关联的原理图和复用模块符号,复用模块符号不可删除则跳过
### getallpcbsinfo
# DMT\_Pcb.getAllPcbsInfo() method
获取工程内所有 PCB 的详细属性
## Signature
```typescript
getAllPcbsInfo(): Promise<Array<IDMT_PcbItem>>;
```
## Returns
Promise<Array<[IDMT\_PcbItem](../interfaces/IDMT_PcbItem.md)<!-- -->>>
所有 PCB 的详细属性的数组
### getcurrentpcbinfo
# DMT\_Pcb.getCurrentPcbInfo() method
获取当前 PCB 的详细属性
## Signature
```typescript
getCurrentPcbInfo(): Promise<IDMT_PcbItem | undefined>;
```
## Returns
Promise<[IDMT\_PcbItem](../interfaces/IDMT_PcbItem.md) \| undefined>
PCB 的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的 PCB 的详细属性
### getpcbinfo
# DMT\_Pcb.getPcbInfo() method
获取 PCB 的详细属性
## Signature
```typescript
getPcbInfo(pcbUuid: string): Promise<IDMT_PcbItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pcbUuid
</td><td>
string
</td><td>
PCB UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_PcbItem](../interfaces/IDMT_PcbItem.md) \| undefined>
PCB 的详细属性,如若为 `undefined` 则获取失败
### modifypcbname
# DMT\_Pcb.modifyPcbName() method
修改 PCB 名称
## Signature
```typescript
modifyPcbName(pcbUuid: string, pcbName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pcbUuid
</td><td>
string
</td><td>
PCB UUID
</td></tr>
<tr><td>
pcbName
</td><td>
string
</td><td>
PCB 名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
## Remarks
如若 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),则修改名称时将同步修改复用模块符号名称与关联原理图名称
FILE:references/classes/DMT_Project.md
# DMT\_Project class
文档树 / 工程管理类
## Signature
```typescript
declare class DMT_Project
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createProject(projectFriendlyName, projectName, teamUuid, folderUuid, description, collaborationMode)](./DMT_Project.md)
</td><td>
</td><td>
**_(BETA)_** 创建工程
</td></tr>
<tr><td>
[getAllProjectsUuid(teamUuid, folderUuid, workspaceUuid)](./DMT_Project.md)
</td><td>
</td><td>
获取所有工程的 UUID
</td></tr>
<tr><td>
[getCurrentProjectInfo()](./DMT_Project.md)
</td><td>
</td><td>
获取当前工程的详细属性
</td></tr>
<tr><td>
[getProjectInfo(projectUuid)](./DMT_Project.md)
</td><td>
</td><td>
获取工程属性
</td></tr>
<tr><td>
[moveProjectToFolder(projectUuid, folderUuid)](./DMT_Project.md)
</td><td>
</td><td>
移动工程到文件夹
</td></tr>
<tr><td>
[openProject(projectUuid)](./DMT_Project.md)
</td><td>
</td><td>
打开工程
</td></tr>
</tbody></table>
---
## 方法详情
### createproject
# DMT\_Project.createProject() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建工程
## Signature
```typescript
createProject(projectFriendlyName: string, projectName?: string, teamUuid?: string, folderUuid?: string, description?: string, collaborationMode?: EDMT_ProjectCollaborationMode): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectFriendlyName
</td><td>
string
</td><td>
工程友好名称
</td></tr>
<tr><td>
projectName
</td><td>
string
</td><td>
_(Optional)_ 工程名称,不可重复,仅支持字母 `a-zA-Z`<!-- -->、数字 `0-9`<!-- -->、中划线 `-`<!-- -->,如若不指定,则根据工程友好名称自动生成
</td></tr>
<tr><td>
teamUuid
</td><td>
string
</td><td>
_(Optional)_ 团队 UUID,如若不指定,则默认为个人;在不存在个人工程的环境下必须指定团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
_(Optional)_ 文件夹 UUID,如若不指定,则为根文件夹
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 工程描述
</td></tr>
<tr><td>
collaborationMode
</td><td>
[EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md)
</td><td>
_(Optional)_ 工程协作模式,如若团队权限无需工程设置协作模式,则该参数将被忽略
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
工程 UUID,如若为 `undefined` 则创建失败
### getallprojectsuuid
# DMT\_Project.getAllProjectsUuid() method
获取所有工程的 UUID
## Signature
```typescript
getAllProjectsUuid(teamUuid?: string, folderUuid?: string, workspaceUuid?: string): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
teamUuid
</td><td>
string
</td><td>
_(Optional)_ 团队 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
_(Optional)_ 文件夹 UUID,如若不指定,则默认为团队的根文件夹
</td></tr>
<tr><td>
workspaceUuid
</td><td>
string
</td><td>
_(Optional)_ 工作区 UUID
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
工程 UUID 数组
## Remarks
如若指定 `teamUuid`<!-- -->,则获取指定团队下的所有工程;
如若指定 `folderUuid`<!-- -->,则获取指定文件夹下的所有工程;
`teamUuid`<!-- -->、`folderUuid` 需要且仅允许指定其一,如若都指定则只取 `folderUuid`<!-- -->;
如若指定 `workspaceUuid`<!-- -->,则在指定 Workspace 下获取指定团队/文件夹下的所有工程
### getcurrentprojectinfo
# DMT\_Project.getCurrentProjectInfo() method
获取当前工程的详细属性
## Signature
```typescript
getCurrentProjectInfo(): Promise<IDMT_ProjectItem | undefined>;
```
## Returns
Promise<[IDMT\_ProjectItem](../interfaces/IDMT_ProjectItem.md) \| undefined>
工程属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的原理图、PCB、面板所关联的工程的详细属性
### getprojectinfo
# DMT\_Project.getProjectInfo() method
获取工程属性
## Signature
```typescript
getProjectInfo(projectUuid: string): Promise<IDMT_BriefProjectItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectUuid
</td><td>
string
</td><td>
工程 UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined>
简略的工程属性,如若为 `undefined` 则获取失败
## Remarks
本接口只能读取简略的工程属性,如需详细的工程树,请使用 [getCurrentProjectInfo](./DMT_Project.md) 接口
### moveprojecttofolder
# DMT\_Project.moveProjectToFolder() method
移动工程到文件夹
## Signature
```typescript
moveProjectToFolder(projectUuid: string, folderUuid?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectUuid
</td><td>
string
</td><td>
工程 UUID
</td></tr>
<tr><td>
folderUuid
</td><td>
string
</td><td>
_(Optional)_ 文件夹 UUID,只能为当前工程所在团队或个人下的文件夹,如若为 `undefined` 则移动到当前团队的根文件夹
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否移动成功
### openproject
# DMT\_Project.openProject() method
打开工程
## Signature
```typescript
openProject(projectUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectUuid
</td><td>
string
</td><td>
工程 UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否成功打开工程
## Remarks
本操作将会在 EDA 前端打开指定工程,如若原先已打开其它工程且有未保存的变更,执行本操作将直接丢失所有未保存的数据
FILE:references/classes/DMT_Schematic.md
# DMT\_Schematic class
文档树 / 原理图管理类
## Signature
```typescript
declare class DMT_Schematic
```
## Remarks
在当前打开的工程内进行原理图管理的相关操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copySchematic(schematicUuid, boardName)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 复制原理图
</td></tr>
<tr><td>
[copySchematicPage(schematicPageUuid, schematicUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 复制原理图图页
</td></tr>
<tr><td>
[createSchematic(boardName)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 创建原理图
</td></tr>
<tr><td>
[createSchematicPage(schematicUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 创建原理图图页
</td></tr>
<tr><td>
[deleteSchematic(schematicUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 删除原理图
</td></tr>
<tr><td>
[deleteSchematicPage(schematicPageUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 删除原理图图页
</td></tr>
<tr><td>
[getAllSchematicPagesInfo()](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取工程内所有原理图图页的详细属性
</td></tr>
<tr><td>
[getAllSchematicsInfo()](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取工程内所有原理图的详细属性
</td></tr>
<tr><td>
[getCurrentSchematicAllSchematicPagesInfo()](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前原理图内所有原理图图页的详细属性
</td></tr>
<tr><td>
[getCurrentSchematicInfo()](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前原理图的详细属性
</td></tr>
<tr><td>
[getCurrentSchematicPageInfo()](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前原理图图页的详细属性
</td></tr>
<tr><td>
[getSchematicInfo(schematicUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取原理图的详细属性
</td></tr>
<tr><td>
[getSchematicPageInfo(schematicPageUuid)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 获取原理图图页的详细属性
</td></tr>
<tr><td>
[modifySchematicName(schematicUuid, schematicName)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 修改原理图名称
</td></tr>
<tr><td>
[modifySchematicPageName(schematicPageUuid, schematicPageName)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 修改原理图图页名称
</td></tr>
<tr><td>
[modifySchematicPageTitleBlock(showTitleBlock, titleBlockData)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 修改原理图图页明细表
</td></tr>
<tr><td>
[reorderSchematicPages(schematicUuid, schematicPageItemsArray)](./DMT_Schematic.md)
</td><td>
</td><td>
**_(BETA)_** 重新排序原理图图页
</td></tr>
</tbody></table>
---
## 方法详情
### copyschematic
# DMT\_Schematic.copySchematic() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制原理图
## Signature
```typescript
copySchematic(schematicUuid: string, boardName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
源原理图 UUID
</td></tr>
<tr><td>
boardName
</td><td>
string
</td><td>
_(Optional)_ 新原理图所属板子名称,如若不指定则为游离原理图
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
新原理图 UUID,如若为 `undefined` 则复制失败
## Remarks
如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则复制原理图时将同步新建复用模块符号
### copyschematicpage
# DMT\_Schematic.copySchematicPage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制原理图图页
## Signature
```typescript
copySchematicPage(schematicPageUuid: string, schematicUuid?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicPageUuid
</td><td>
string
</td><td>
源原理图图页 UUID
</td></tr>
<tr><td>
schematicUuid
</td><td>
string
</td><td>
_(Optional)_ 目标原理图 UUID,如若不指定则为当前原理图
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
新原理图图页 UUID,如若为 `undefined` 则复制失败
### createschematic
# DMT\_Schematic.createSchematic() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建原理图
## Signature
```typescript
createSchematic(boardName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
boardName
</td><td>
string
</td><td>
_(Optional)_ 所属板子名称,如若不指定则为游离原理图
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
原理图 UUID,如若为 `undefined` 则创建失败
### createschematicpage
# DMT\_Schematic.createSchematicPage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建原理图图页
## Signature
```typescript
createSchematicPage(schematicUuid: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
所属原理图 UUID
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
原理图图页 UUID,如若为 `undefined` 则创建失败
### deleteschematic
# DMT\_Schematic.deleteSchematic() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除原理图
## Signature
```typescript
deleteSchematic(schematicUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
原理图 UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则删除原理图时将同步删除关联的 PCB 和复用模块符号,复用模块符号不可删除则跳过
### deleteschematicpage
# DMT\_Schematic.deleteSchematicPage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除原理图图页
## Signature
```typescript
deleteSchematicPage(schematicPageUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicPageUuid
</td><td>
string
</td><td>
原理图图页 UUID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallschematicpagesinfo
# DMT\_Schematic.getAllSchematicPagesInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取工程内所有原理图图页的详细属性
## Signature
```typescript
getAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
```
## Returns
Promise<Array<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>>
所有原理图图页的详细属性的数组
### getallschematicsinfo
# DMT\_Schematic.getAllSchematicsInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取工程内所有原理图的详细属性
## Signature
```typescript
getAllSchematicsInfo(): Promise<Array<IDMT_SchematicItem>>;
```
## Returns
Promise<Array<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md)<!-- -->>>
所有原理图的详细属性的数组
### getcurrentschematicallschematicpagesinfo
# DMT\_Schematic.getCurrentSchematicAllSchematicPagesInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前原理图内所有原理图图页的详细属性
## Signature
```typescript
getCurrentSchematicAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
```
## Returns
Promise<Array<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>>
所有原理图图页的详细属性的数组
### getcurrentschematicinfo
# DMT\_Schematic.getCurrentSchematicInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前原理图的详细属性
## Signature
```typescript
getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
```
## Returns
Promise<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined>
原理图的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的原理图图页所关联的原理图的详细属性
### getcurrentschematicpageinfo
# DMT\_Schematic.getCurrentSchematicPageInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前原理图图页的详细属性
## Signature
```typescript
getCurrentSchematicPageInfo(): Promise<IDMT_SchematicPageItem | undefined>;
```
## Returns
Promise<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined>
原理图图页的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的原理图图页的详细属性
### getschematicinfo
# DMT\_Schematic.getSchematicInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取原理图的详细属性
## Signature
```typescript
getSchematicInfo(schematicUuid: string): Promise<IDMT_SchematicItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
原理图 UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined>
原理图的详细属性,如若为 `undefined` 则获取失败
### getschematicpageinfo
# DMT\_Schematic.getSchematicPageInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取原理图图页的详细属性
## Signature
```typescript
getSchematicPageInfo(schematicPageUuid: string): Promise<IDMT_SchematicPageItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicPageUuid
</td><td>
string
</td><td>
原理图图页 UUID
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined>
原理图图页的详细属性,如若为 `undefined` 则获取失败
### modifyschematicname
# DMT\_Schematic.modifySchematicName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改原理图名称
## Signature
```typescript
modifySchematicName(schematicUuid: string, schematicName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
原理图 UUID
</td></tr>
<tr><td>
schematicName
</td><td>
string
</td><td>
原理图名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
## Remarks
如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则修改名称时将同步修改复用模块符号名称与关联 PCB 名称
### modifyschematicpagename
# DMT\_Schematic.modifySchematicPageName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改原理图图页名称
## Signature
```typescript
modifySchematicPageName(schematicPageUuid: string, schematicPageName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicPageUuid
</td><td>
string
</td><td>
原理图图页 UUID
</td></tr>
<tr><td>
schematicPageName
</td><td>
string
</td><td>
原理图图页名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功
### modifyschematicpagetitleblock
# DMT\_Schematic.modifySchematicPageTitleBlock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改原理图图页明细表
## Signature
```typescript
modifySchematicPageTitleBlock(showTitleBlock?: boolean, titleBlockData?: {
[key: string]: {
showTitle?: boolean;
showValue?: boolean;
value?: any;
};
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
showTitleBlock
</td><td>
boolean
</td><td>
_(Optional)_ 是否显示明细表,不定义将保持当前状态
</td></tr>
<tr><td>
titleBlockData
</td><td>
\{ \[key: string\]: \{ showTitle?: boolean; showValue?: boolean; value?: any; \}; \}
</td><td>
_(Optional)_ 需要修改的明细项及其修改的值
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
修改操作是否成功,如若未传入 `showTitleBlock` 和 `titleBlockData` 将返回 `false`<!-- -->;请注意,如若存在无法识别的明细项但程序并未出错,将返回 `true` 的结果,因为无法识别的明细项被忽略
## Remarks
`titleBlockData` 仅需要传入任何需要修改的明细项作为 `key`<!-- -->,并传入其需要修改的值,任何无法识别的明细项将被忽略,任何未传入的项和值将保持默认状态
### reorderschematicpages
# DMT\_Schematic.reorderSchematicPages() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
重新排序原理图图页
## Signature
```typescript
reorderSchematicPages(schematicUuid: string, schematicPageItemsArray: Array<IDMT_SchematicPageItem>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
schematicUuid
</td><td>
string
</td><td>
执行排序的图页所关联的原理图 UUID
</td></tr>
<tr><td>
schematicPageItemsArray
</td><td>
Array<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>
</td><td>
所有原理图图页属性的数组
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
排序操作是否成功
## Remarks
此处源原理图图页属性的数组需要通过 [DMT\_Schematic.getAllSchematicPagesInfo()](./DMT_Schematic.md) 或其它上游方法取得,完成数组排序后传入
FILE:references/classes/DMT_SelectControl.md
# DMT\_SelectControl class
文档树 / 选择控制类
## Signature
```typescript
declare class DMT_SelectControl
```
## Remarks
在文档树内进行选择焦点的查询、控制
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getCurrentDocumentInfo()](./DMT_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前文档的属性
</td></tr>
</tbody></table>
---
## 方法详情
### getcurrentdocumentinfo
# DMT\_SelectControl.getCurrentDocumentInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前文档的属性
## Signature
```typescript
getCurrentDocumentInfo(): Promise<IDMT_EditorDocumentItem | undefined>;
```
## Returns
Promise<[IDMT\_EditorDocumentItem](../interfaces/IDMT_EditorDocumentItem.md) \| undefined>
文档类型、UUID、所属工程的 UUID、所属库的 UUID 组成的对象,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的文档的文档类型、UUID、所属工程的 UUID 或所属库的 UUID
FILE:references/classes/DMT_Team.md
# DMT\_Team class
文档树 / 团队类
## Signature
```typescript
declare class DMT_Team
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getAllInvolvedTeamInfo()](./DMT_Team.md)
</td><td>
</td><td>
获取所有参与的团队的详细属性
</td></tr>
<tr><td>
[getAllTeamsInfo()](./DMT_Team.md)
</td><td>
</td><td>
获取所有直接团队的详细属性
</td></tr>
<tr><td>
[getCurrentTeamInfo()](./DMT_Team.md)
</td><td>
</td><td>
获取当前团队的详细属性
</td></tr>
</tbody></table>
---
## 方法详情
### getallinvolvedteaminfo
# DMT\_Team.getAllInvolvedTeamInfo() method
获取所有参与的团队的详细属性
## Signature
```typescript
getAllInvolvedTeamInfo(): Promise<Array<IDMT_TeamItem>>;
```
## Returns
Promise<Array<[IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->>>
所有参与的团队的详细属性
### getallteamsinfo
# DMT\_Team.getAllTeamsInfo() method
获取所有直接团队的详细属性
## Signature
```typescript
getAllTeamsInfo(): Promise<Array<IDMT_TeamItem>>;
```
## Returns
Promise<Array<[IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->>>
所有团队的详细属性
## Remarks
个人本质上也是一个名为 \*\*个人\*\* 的团队
### getcurrentteaminfo
# DMT\_Team.getCurrentTeamInfo() method
获取当前团队的详细属性
## Signature
```typescript
getCurrentTeamInfo(): Promise<IDMT_TeamItem | undefined>;
```
## Returns
Promise<[IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md) \| undefined>
团队的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前打开且拥有最后输入焦点的原理图、PCB、面板所关联的工程的所属团队的详细属性
FILE:references/classes/DMT_Workspace.md
# DMT\_Workspace class
文档树 / 工作区类
## Signature
```typescript
declare class DMT_Workspace
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getAllWorkspacesInfo()](./DMT_Workspace.md)
</td><td>
</td><td>
获取所有工作区的详细属性
</td></tr>
<tr><td>
[getCurrentWorkspaceInfo()](./DMT_Workspace.md)
</td><td>
</td><td>
获取当前工作区的详细属性
</td></tr>
<tr><td>
[toggleToWorkspace(workspaceUuid)](./DMT_Workspace.md)
</td><td>
</td><td>
切换到工作区
</td></tr>
</tbody></table>
---
## 方法详情
### getallworkspacesinfo
# DMT\_Workspace.getAllWorkspacesInfo() method
获取所有工作区的详细属性
## Signature
```typescript
getAllWorkspacesInfo(): Promise<Array<IDMT_WorkspaceItem>>;
```
## Returns
Promise<Array<[IDMT\_WorkspaceItem](../interfaces/IDMT_WorkspaceItem.md)<!-- -->>>
所有工作区的详细属性
### getcurrentworkspaceinfo
# DMT\_Workspace.getCurrentWorkspaceInfo() method
获取当前工作区的详细属性
## Signature
```typescript
getCurrentWorkspaceInfo(): Promise<IDMT_WorkspaceItem | undefined>;
```
## Returns
Promise<[IDMT\_WorkspaceItem](../interfaces/IDMT_WorkspaceItem.md) \| undefined>
工作区的详细属性,如若为 `undefined` 则获取失败
## Remarks
将会获取当前工作区的详细属性
### toggletoworkspace
# DMT\_Workspace.toggleToWorkspace() method
切换到工作区
## Signature
```typescript
toggleToWorkspace(workspaceUuid?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
workspaceUuid
</td><td>
string
</td><td>
_(Optional)_ 工作区 UUID,如若不指定,则将切换到个人工作区
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
切换操作是否成功
FILE:references/classes/EDA.md
# eda variable
扩展用户 API 接口
## Signature
```typescript
eda: EDA
```
---
## 属性详情
### dmt_board
# EDA.dmt\_Board property
## Signature
```typescript
dmt_Board: DMT_Board;
```
### dmt_editorcontrol
# EDA.dmt\_EditorControl property
## Signature
```typescript
dmt_EditorControl: DMT_EditorControl;
```
### dmt_folder
# EDA.dmt\_Folder property
## Signature
```typescript
dmt_Folder: DMT_Folder;
```
### dmt_panel
# EDA.dmt\_Panel property
## Signature
```typescript
dmt_Panel: DMT_Panel;
```
### dmt_pcb
# EDA.dmt\_Pcb property
## Signature
```typescript
dmt_Pcb: DMT_Pcb;
```
### dmt_project
# EDA.dmt\_Project property
## Signature
```typescript
dmt_Project: DMT_Project;
```
### dmt_schematic
# EDA.dmt\_Schematic property
## Signature
```typescript
dmt_Schematic: DMT_Schematic;
```
### dmt_selectcontrol
# EDA.dmt\_SelectControl property
## Signature
```typescript
dmt_SelectControl: DMT_SelectControl;
```
### dmt_team
# EDA.dmt\_Team property
## Signature
```typescript
dmt_Team: DMT_Team;
```
### dmt_workspace
# EDA.dmt\_Workspace property
## Signature
```typescript
dmt_Workspace: DMT_Workspace;
```
### lib_3dmodel
# EDA.lib\_3DModel property
## Signature
```typescript
lib_3DModel: LIB_3DModel;
```
### lib_cbb
# EDA.lib\_Cbb property
## Signature
```typescript
lib_Cbb: LIB_Cbb;
```
### lib_classification
# EDA.lib\_Classification property
## Signature
```typescript
lib_Classification: LIB_Classification;
```
### lib_device
# EDA.lib\_Device property
## Signature
```typescript
lib_Device: LIB_Device;
```
### lib_footprint
# EDA.lib\_Footprint property
## Signature
```typescript
lib_Footprint: LIB_Footprint;
```
### lib_librarieslist
# EDA.lib\_LibrariesList property
## Signature
```typescript
lib_LibrariesList: LIB_LibrariesList;
```
### lib_panellibrary
# EDA.lib\_PanelLibrary property
## Signature
```typescript
lib_PanelLibrary: LIB_PanelLibrary;
```
### lib_selectcontrol
# EDA.lib\_SelectControl property
## Signature
```typescript
lib_SelectControl: LIB_SelectControl;
```
### lib_symbol
# EDA.lib\_Symbol property
## Signature
```typescript
lib_Symbol: LIB_Symbol;
```
### pcb_document
# EDA.pcb\_Document property
## Signature
```typescript
pcb_Document: PCB_Document;
```
### pcb_drc
# EDA.pcb\_Drc property
## Signature
```typescript
pcb_Drc: PCB_Drc;
```
### pcb_event
# EDA.pcb\_Event property
## Signature
```typescript
pcb_Event: PCB_Event;
```
### pcb_layer
# EDA.pcb\_Layer property
## Signature
```typescript
pcb_Layer: PCB_Layer;
```
### pcb_manufacturedata
# EDA.pcb\_ManufactureData property
## Signature
```typescript
pcb_ManufactureData: PCB_ManufactureData;
```
### pcb_mathpolygon
# EDA.pcb\_MathPolygon property
## Signature
```typescript
pcb_MathPolygon: PCB_MathPolygon;
```
### pcb_net
# EDA.pcb\_Net property
## Signature
```typescript
pcb_Net: PCB_Net;
```
### pcb_primitive
# EDA.pcb\_Primitive property
## Signature
```typescript
pcb_Primitive: PCB_Primitive;
```
### pcb_primitivearc
# EDA.pcb\_PrimitiveArc property
## Signature
```typescript
pcb_PrimitiveArc: PCB_PrimitiveArc;
```
### pcb_primitiveattribute
# EDA.pcb\_PrimitiveAttribute property
## Signature
```typescript
pcb_PrimitiveAttribute: PCB_PrimitiveAttribute;
```
### pcb_primitivecomponent
# EDA.pcb\_PrimitiveComponent property
## Signature
```typescript
pcb_PrimitiveComponent: PCB_PrimitiveComponent;
```
### pcb_primitivedimension
# EDA.pcb\_PrimitiveDimension property
## Signature
```typescript
pcb_PrimitiveDimension: PCB_PrimitiveDimension;
```
### pcb_primitivefill
# EDA.pcb\_PrimitiveFill property
## Signature
```typescript
pcb_PrimitiveFill: PCB_PrimitiveFill;
```
### pcb_primitiveimage
# EDA.pcb\_PrimitiveImage property
## Signature
```typescript
pcb_PrimitiveImage: PCB_PrimitiveImage;
```
### pcb_primitiveline
# EDA.pcb\_PrimitiveLine property
## Signature
```typescript
pcb_PrimitiveLine: PCB_PrimitiveLine;
```
### pcb_primitiveobject
# EDA.pcb\_PrimitiveObject property
## Signature
```typescript
pcb_PrimitiveObject: PCB_PrimitiveObject;
```
### pcb_primitivepad
# EDA.pcb\_PrimitivePad property
## Signature
```typescript
pcb_PrimitivePad: PCB_PrimitivePad;
```
### pcb_primitivepolyline
# EDA.pcb\_PrimitivePolyline property
## Signature
```typescript
pcb_PrimitivePolyline: PCB_PrimitivePolyline;
```
### pcb_primitivepour
# EDA.pcb\_PrimitivePour property
## Signature
```typescript
pcb_PrimitivePour: PCB_PrimitivePour;
```
### pcb_primitivepoured
# EDA.pcb\_PrimitivePoured property
## Signature
```typescript
pcb_PrimitivePoured: PCB_PrimitivePoured;
```
### pcb_primitiveregion
# EDA.pcb\_PrimitiveRegion property
## Signature
```typescript
pcb_PrimitiveRegion: PCB_PrimitiveRegion;
```
### pcb_primitivestring
# EDA.pcb\_PrimitiveString property
## Signature
```typescript
pcb_PrimitiveString: PCB_PrimitiveString;
```
### pcb_primitivevia
# EDA.pcb\_PrimitiveVia property
## Signature
```typescript
pcb_PrimitiveVia: PCB_PrimitiveVia;
```
### pcb_raytracerengine
# EDA.pcb\_RayTracerEngine property
## Signature
```typescript
pcb_RayTracerEngine: PCB_RayTracerEngine;
```
### pcb_selectcontrol
# EDA.pcb\_SelectControl property
## Signature
```typescript
pcb_SelectControl: PCB_SelectControl;
```
### pnl_document
# EDA.pnl\_Document property
## Signature
```typescript
pnl_Document: PNL_Document;
```
### sch_document
# EDA.sch\_Document property
## Signature
```typescript
sch_Document: SCH_Document;
```
### sch_drc
# EDA.sch\_Drc property
## Signature
```typescript
sch_Drc: SCH_Drc;
```
### sch_event
# EDA.sch\_Event property
## Signature
```typescript
sch_Event: SCH_Event;
```
### sch_manufacturedata
# EDA.sch\_ManufactureData property
## Signature
```typescript
sch_ManufactureData: SCH_ManufactureData;
```
### sch_net
# EDA.sch\_Net property
## Signature
```typescript
sch_Net: SCH_Net;
```
### sch_netlist
# EDA.sch\_Netlist property
## Signature
```typescript
sch_Netlist: SCH_Netlist;
```
### sch_primitive
# EDA.sch\_Primitive property
## Signature
```typescript
sch_Primitive: SCH_Primitive;
```
### sch_primitivearc
# EDA.sch\_PrimitiveArc property
## Signature
```typescript
sch_PrimitiveArc: SCH_PrimitiveArc;
```
### sch_primitiveattribute
# EDA.sch\_PrimitiveAttribute property
## Signature
```typescript
sch_PrimitiveAttribute: SCH_PrimitiveAttribute;
```
### sch_primitivebus
# EDA.sch\_PrimitiveBus property
## Signature
```typescript
sch_PrimitiveBus: SCH_PrimitiveBus;
```
### sch_primitivecircle
# EDA.sch\_PrimitiveCircle property
## Signature
```typescript
sch_PrimitiveCircle: SCH_PrimitiveCircle;
```
### sch_primitivecomponent
# EDA.sch\_PrimitiveComponent property
## Signature
```typescript
sch_PrimitiveComponent: SCH_PrimitiveComponent | SCH_PrimitiveComponent3;
```
### sch_primitiveobject
# EDA.sch\_PrimitiveObject property
## Signature
```typescript
sch_PrimitiveObject: SCH_PrimitiveObject;
```
### sch_primitivepin
# EDA.sch\_PrimitivePin property
## Signature
```typescript
sch_PrimitivePin: SCH_PrimitivePin;
```
### sch_primitivepolygon
# EDA.sch\_PrimitivePolygon property
## Signature
```typescript
sch_PrimitivePolygon: SCH_PrimitivePolygon;
```
### sch_primitiverectangle
# EDA.sch\_PrimitiveRectangle property
## Signature
```typescript
sch_PrimitiveRectangle: SCH_PrimitiveRectangle;
```
### sch_primitivetext
# EDA.sch\_PrimitiveText property
## Signature
```typescript
sch_PrimitiveText: SCH_PrimitiveText;
```
### sch_primitivewire
# EDA.sch\_PrimitiveWire property
## Signature
```typescript
sch_PrimitiveWire: SCH_PrimitiveWire;
```
### sch_selectcontrol
# EDA.sch\_SelectControl property
## Signature
```typescript
sch_SelectControl: SCH_SelectControl;
```
### sch_simulationengine
# EDA.sch\_SimulationEngine property
## Signature
```typescript
sch_SimulationEngine: SCH_SimulationEngine;
```
### sch_utils
# EDA.sch\_Utils property
## Signature
```typescript
sch_Utils: SCH_Utils;
```
### sys_clienturl
# EDA.sys\_ClientUrl property
## Signature
```typescript
sys_ClientUrl: SYS_ClientUrl;
```
### sys_dialog
# EDA.sys\_Dialog property
## Signature
```typescript
sys_Dialog: SYS_Dialog;
```
### sys_environment
# EDA.sys\_Environment property
## Signature
```typescript
sys_Environment: SYS_Environment;
```
### sys_filemanager
# EDA.sys\_FileManager property
## Signature
```typescript
sys_FileManager: SYS_FileManager;
```
### sys_filesystem
# EDA.sys\_FileSystem property
## Signature
```typescript
sys_FileSystem: SYS_FileSystem;
```
### sys_fontmanager
# EDA.sys\_FontManager property
## Signature
```typescript
sys_FontManager: SYS_FontManager;
```
### sys_formatconversion
# EDA.sys\_FormatConversion property
## Signature
```typescript
sys_FormatConversion: SYS_FormatConversion;
```
### sys_headermenu
# EDA.sys\_HeaderMenu property
## Signature
```typescript
sys_HeaderMenu: SYS_HeaderMenu;
```
### sys_i18n
# EDA.sys\_I18n property
## Signature
```typescript
sys_I18n: SYS_I18n;
```
### sys_iframe
# EDA.sys\_IFrame property
## Signature
```typescript
sys_IFrame: SYS_IFrame;
```
### sys_loadingandprogressbar
# EDA.sys\_LoadingAndProgressBar property
## Signature
```typescript
sys_LoadingAndProgressBar: SYS_LoadingAndProgressBar;
```
### sys_log
# EDA.sys\_Log property
## Signature
```typescript
sys_Log: SYS_Log;
```
### sys_message
# EDA.sys\_Message property
## Signature
```typescript
sys_Message: SYS_Message;
```
### sys_messagebox
# EDA.sys\_MessageBox property
## Signature
```typescript
sys_MessageBox: SYS_MessageBox;
```
### sys_messagebus
# EDA.sys\_MessageBus property
## Signature
```typescript
sys_MessageBus: SYS_MessageBus;
```
### sys_panelcontrol
# EDA.sys\_PanelControl property
## Signature
```typescript
sys_PanelControl: SYS_PanelControl;
```
### sys_rightclickmenu
# EDA.sys\_RightClickMenu property
## Signature
```typescript
sys_RightClickMenu: SYS_RightClickMenu;
```
### sys_setting
# EDA.sys\_Setting property
## Signature
```typescript
sys_Setting: SYS_Setting;
```
### sys_shortcutkey
# EDA.sys\_ShortcutKey property
## Signature
```typescript
sys_ShortcutKey: SYS_ShortcutKey;
```
### sys_storage
# EDA.sys\_Storage property
## Signature
```typescript
sys_Storage: SYS_Storage;
```
### sys_timer
# EDA.sys\_Timer property
## Signature
```typescript
sys_Timer: SYS_Timer;
```
### sys_toastmessage
# EDA.sys\_ToastMessage property
## Signature
```typescript
sys_ToastMessage: SYS_ToastMessage;
```
### sys_tool
# EDA.sys\_Tool property
## Signature
```typescript
sys_Tool: SYS_Tool;
```
### sys_unit
# EDA.sys\_Unit property
## Signature
```typescript
sys_Unit: SYS_Unit;
```
### sys_websocket
# EDA.sys\_WebSocket property
## Signature
```typescript
sys_WebSocket: SYS_WebSocket;
```
### sys_window
# EDA.sys\_Window property
## Signature
```typescript
sys_Window: SYS_Window;
```
FILE:references/classes/IPCB_ComplexPolygon.md
# IPCB\_ComplexPolygon class
复杂多边形
## Signature
```typescript
declare class IPCB_ComplexPolygon
```
## Remarks
复杂多边形可以包含多个单多边形,通过 [fill-rule](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/fill-rule) 将其组合,以实现多边形的布尔运算。 目前嘉立创 EDA 专业版固定使用 [nonzero](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/fill-rule#nonzero) 这个 fill-rule。
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addSource(complexPolygon)](./IPCB_ComplexPolygon.md)
</td><td>
</td><td>
添加多边形数据
</td></tr>
<tr><td>
[getSource()](./IPCB_ComplexPolygon.md)
</td><td>
</td><td>
获取多边形数据
</td></tr>
<tr><td>
[getSourceStrictComplex()](./IPCB_ComplexPolygon.md)
</td><td>
</td><td>
获取复杂多边形数据
</td></tr>
</tbody></table>
---
## 方法详情
### addsource
# IPCB\_ComplexPolygon.addSource() method
添加多边形数据
## Signature
```typescript
addSource(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | Array<IPCB_Polygon>): IPCB_ComplexPolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->> \| [IPCB\_Polygon](./IPCB_Polygon.md) \| Array<[IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->>
</td><td>
复杂多边形数据
</td></tr>
</tbody></table>
## Returns
[IPCB\_ComplexPolygon](./IPCB_ComplexPolygon.md)
复杂多边形对象
### getsource
# IPCB\_ComplexPolygon.getSource() method
获取多边形数据
## Signature
```typescript
getSource(): TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>;
```
## Returns
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->>
单多边形或复杂多边形数据
## Remarks
如遇仅包含单一的单多边形,将会化简最外层的数组
### getsourcestrictcomplex
# IPCB\_ComplexPolygon.getSourceStrictComplex() method
获取复杂多边形数据
## Signature
```typescript
getSourceStrictComplex(): Array<TPCB_PolygonSourceArray>;
```
## Returns
Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->>
复杂多边形数据
## Remarks
强制返回复杂多边形格式数据,即使它仅包含单一的单多边形
FILE:references/classes/IPCB_Polygon.md
# IPCB\_Polygon class
单多边形
## Signature
```typescript
declare class IPCB_Polygon
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getSource()](./IPCB_Polygon.md)
</td><td>
</td><td>
获取单多边形数据
</td></tr>
</tbody></table>
---
## 方法详情
### getsource
# IPCB\_Polygon.getSource() method
获取单多边形数据
## Signature
```typescript
getSource(): TPCB_PolygonSourceArray;
```
## Returns
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)
单多边形数据
FILE:references/classes/IPCB_PrimitiveArc.md
# IPCB\_PrimitiveArc class
圆弧线图元
## Signature
```typescript
declare class IPCB_PrimitiveArc implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
直线和圆弧线均为导线,对应画布的线条走线和圆弧走线
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getAdjacentPrimitives()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取相邻的图元对象
</td></tr>
<tr><td>
[getEntireTrack(includeVias)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取整段导线
</td></tr>
<tr><td>
[getEntireTrack(includeVias)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取整段导线
</td></tr>
<tr><td>
[getState\_ArcAngle()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:圆弧角度
</td></tr>
<tr><td>
[getState\_EndX()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:终止位置 X
</td></tr>
<tr><td>
[getState\_EndY()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:终止位置 Y
</td></tr>
<tr><td>
[getState\_InteractiveMode()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:交互模式
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_StartX()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:起始位置 X
</td></tr>
<tr><td>
[getState\_StartY()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:起始位置 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_ArcAngle(arcAngle)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:圆弧角度
</td></tr>
<tr><td>
[setState\_EndX(endX)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止位置 X
</td></tr>
<tr><td>
[setState\_EndY(endY)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止位置 Y
</td></tr>
<tr><td>
[setState\_InteractiveMode(interactiveMode)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:交互模式
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_StartX(startX)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始位置 X
</td></tr>
<tr><td>
[setState\_StartY(startY)](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始位置 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveArc.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveArc.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveArc>;
```
## Returns
Promise<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>
圆弧线图元对象
### getadjacentprimitives
# IPCB\_PrimitiveArc.getAdjacentPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取相邻的图元对象
## Signature
```typescript
getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveVia | IPCB_PrimitiveArc>>;
```
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
相邻的直线、过孔、圆弧线图元对象
## Remarks
将会获取与圆弧线直接相连的直线、过孔、圆弧线图元对象
### getentiretrack
# IPCB\_PrimitiveArc.getEntireTrack() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取整段导线
## Signature
```typescript
getEntireTrack(includeVias: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeVias
</td><td>
false
</td><td>
是否包含导线两端的过孔
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
整段导线内的所有直线和圆弧线
### getentiretrack_1
# IPCB\_PrimitiveArc.getEntireTrack() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取整段导线
## Signature
```typescript
getEntireTrack(includeVias: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeVias
</td><td>
true
</td><td>
是否包含导线两端的过孔
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>>
整段导线内的所有直线、圆弧线,以及两端连接的过孔(如果有)
### getstate_arcangle
# IPCB\_PrimitiveArc.getState\_ArcAngle() method
获取属性状态:圆弧角度
## Signature
```typescript
getState_ArcAngle(): number;
```
## Returns
number
圆弧角度
### getstate_endx
# IPCB\_PrimitiveArc.getState\_EndX() method
获取属性状态:终止位置 X
## Signature
```typescript
getState_EndX(): number;
```
## Returns
number
终止位置 X
### getstate_endy
# IPCB\_PrimitiveArc.getState\_EndY() method
获取属性状态:终止位置 Y
## Signature
```typescript
getState_EndY(): number;
```
## Returns
number
终止位置 Y
### getstate_interactivemode
# IPCB\_PrimitiveArc.getState\_InteractiveMode() method
获取属性状态:交互模式
## Signature
```typescript
getState_InteractiveMode(): EPCB_PrimitiveArcInteractiveMode;
```
## Returns
[EPCB\_PrimitiveArcInteractiveMode](../enums/EPCB_PrimitiveArcInteractiveMode.md)
交互模式
### getstate_layer
# IPCB\_PrimitiveArc.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfLine;
```
## Returns
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
层
### getstate_linewidth
# IPCB\_PrimitiveArc.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_net
# IPCB\_PrimitiveArc.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_primitiveid
# IPCB\_PrimitiveArc.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveArc.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveArc.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_startx
# IPCB\_PrimitiveArc.getState\_StartX() method
获取属性状态:起始位置 X
## Signature
```typescript
getState_StartX(): number;
```
## Returns
number
起始位置 X
### getstate_starty
# IPCB\_PrimitiveArc.getState\_StartY() method
获取属性状态:起始位置 Y
## Signature
```typescript
getState_StartY(): number;
```
## Returns
number
起始位置 Y
### isasync
# IPCB\_PrimitiveArc.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveArc.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveArc>;
```
## Returns
Promise<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>
圆弧线图元对象
### setstate_arcangle
# IPCB\_PrimitiveArc.setState\_ArcAngle() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:圆弧角度
## Signature
```typescript
setState_ArcAngle(arcAngle: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
arcAngle
</td><td>
number
</td><td>
圆弧角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_endx
# IPCB\_PrimitiveArc.setState\_EndX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止位置 X
## Signature
```typescript
setState_EndX(endX: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endX
</td><td>
number
</td><td>
终止位置 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_endy
# IPCB\_PrimitiveArc.setState\_EndY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止位置 Y
## Signature
```typescript
setState_EndY(endY: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endY
</td><td>
number
</td><td>
终止位置 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_interactivemode
# IPCB\_PrimitiveArc.setState\_InteractiveMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:交互模式
## Signature
```typescript
setState_InteractiveMode(interactiveMode: EPCB_PrimitiveArcInteractiveMode): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactiveMode
</td><td>
[EPCB\_PrimitiveArcInteractiveMode](../enums/EPCB_PrimitiveArcInteractiveMode.md)
</td><td>
交互模式
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_layer
# IPCB\_PrimitiveArc.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_linewidth
# IPCB\_PrimitiveArc.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_net
# IPCB\_PrimitiveArc.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_primitivelock
# IPCB\_PrimitiveArc.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_startx
# IPCB\_PrimitiveArc.setState\_StartX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始位置 X
## Signature
```typescript
setState_StartX(startX: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startX
</td><td>
number
</td><td>
起始位置 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### setstate_starty
# IPCB\_PrimitiveArc.setState\_StartY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始位置 Y
## Signature
```typescript
setState_StartY(startY: number): IPCB_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startY
</td><td>
number
</td><td>
起始位置 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### toasync
# IPCB\_PrimitiveArc.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveArc;
```
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
### tosync
# IPCB\_PrimitiveArc.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveArc;
```
## Returns
[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
圆弧线图元对象
FILE:references/classes/IPCB_PrimitiveAttribute.md
# IPCB\_PrimitiveAttribute class
属性图元
## Signature
```typescript
declare class IPCB_PrimitiveAttribute implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[(constructor)(layer, x, y, key, value, keyVisible, valueVisible, fontFamily, fontSize, lineWidth, alignMode, rotation, reverse, expansion, mirror, primitiveLock, primitiveId, parentPrimitiveId)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
Constructs a new instance of the `IPCB_PrimitiveAttribute` class
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getState\_AlignMode()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:对齐模式
</td></tr>
<tr><td>
[getState\_Expansion()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:反相扩展
</td></tr>
<tr><td>
[getState\_FontFamily()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:字体
</td></tr>
<tr><td>
[getState\_FontSize()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:字号
</td></tr>
<tr><td>
[getState\_Key()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:Key
</td></tr>
<tr><td>
[getState\_KeyVisible()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:Key 是否可见
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Mirror()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否镜像
</td></tr>
<tr><td>
[getState\_ParentPrimitiveId()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:关联的父图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Reverse()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否反相
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_Value()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:Value
</td></tr>
<tr><td>
[getState\_ValueVisible()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:Value 是否可见
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[setState\_AlignMode(alignMode)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:对齐模式
</td></tr>
<tr><td>
[setState\_Expansion(expansion)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:反相扩展
</td></tr>
<tr><td>
[setState\_FontFamily(fontFamily)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体
</td></tr>
<tr><td>
[setState\_FontSize(fontSize)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字号
</td></tr>
<tr><td>
[setState\_Key(key)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:Key
</td></tr>
<tr><td>
[setState\_KeyVisible(keyVisible)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:Key 是否可见
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Mirror(mirror)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否镜像
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Reverse(reverse)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否反相
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_Value(value)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:Value
</td></tr>
<tr><td>
[setState\_ValueVisible(valueVisible)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:Value 是否可见
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveAttribute.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 构造函数详情
### _constructor_
# IPCB\_PrimitiveAttribute.(constructor)
Constructs a new instance of the `IPCB_PrimitiveAttribute` class
## Signature
```typescript
constructor(layer: TPCB_LayersOfImage, x: number | null, y: number | null, key: string, value: string, keyVisible: boolean, valueVisible: boolean, fontFamily: string, fontSize: number, lineWidth: number, alignMode: EPCB_PrimitiveStringAlignMode, rotation: number, reverse: boolean, expansion: number, mirror: boolean, primitiveLock: boolean, primitiveId: string, parentPrimitiveId: string);
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
</td></tr>
<tr><td>
x
</td><td>
number \| null
</td><td>
</td></tr>
<tr><td>
y
</td><td>
number \| null
</td><td>
</td></tr>
<tr><td>
key
</td><td>
string
</td><td>
</td></tr>
<tr><td>
value
</td><td>
string
</td><td>
</td></tr>
<tr><td>
keyVisible
</td><td>
boolean
</td><td>
</td></tr>
<tr><td>
valueVisible
</td><td>
boolean
</td><td>
</td></tr>
<tr><td>
fontFamily
</td><td>
string
</td><td>
</td></tr>
<tr><td>
fontSize
</td><td>
number
</td><td>
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
</td></tr>
<tr><td>
alignMode
</td><td>
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
</td><td>
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
</td></tr>
<tr><td>
reverse
</td><td>
boolean
</td><td>
</td></tr>
<tr><td>
expansion
</td><td>
number
</td><td>
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
</td></tr>
<tr><td>
primitiveId
</td><td>
string
</td><td>
</td></tr>
<tr><td>
parentPrimitiveId
</td><td>
string
</td><td>
</td></tr>
</tbody></table>
---
## 方法详情
### getstate_alignmode
# IPCB\_PrimitiveAttribute.getState\_AlignMode() method
获取属性状态:对齐模式
## Signature
```typescript
getState_AlignMode(): EPCB_PrimitiveStringAlignMode;
```
## Returns
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
对齐模式
### getstate_expansion
# IPCB\_PrimitiveAttribute.getState\_Expansion() method
获取属性状态:反相扩展
## Signature
```typescript
getState_Expansion(): number;
```
## Returns
number
反相扩展
### getstate_fontfamily
# IPCB\_PrimitiveAttribute.getState\_FontFamily() method
获取属性状态:字体
## Signature
```typescript
getState_FontFamily(): string;
```
## Returns
string
字体
### getstate_fontsize
# IPCB\_PrimitiveAttribute.getState\_FontSize() method
获取属性状态:字号
## Signature
```typescript
getState_FontSize(): number;
```
## Returns
number
字号
### getstate_key
# IPCB\_PrimitiveAttribute.getState\_Key() method
获取属性状态:Key
## Signature
```typescript
getState_Key(): string;
```
## Returns
string
Key
### getstate_keyvisible
# IPCB\_PrimitiveAttribute.getState\_KeyVisible() method
获取属性状态:Key 是否可见
## Signature
```typescript
getState_KeyVisible(): boolean;
```
## Returns
boolean
Key 是否可见
### getstate_layer
# IPCB\_PrimitiveAttribute.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfImage;
```
## Returns
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
层
### getstate_linewidth
# IPCB\_PrimitiveAttribute.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_mirror
# IPCB\_PrimitiveAttribute.getState\_Mirror() method
获取属性状态:是否镜像
## Signature
```typescript
getState_Mirror(): boolean;
```
## Returns
boolean
是否镜像
### getstate_parentprimitiveid
# IPCB\_PrimitiveAttribute.getState\_ParentPrimitiveId() method
获取属性状态:关联的父图元 ID
## Signature
```typescript
getState_ParentPrimitiveId(): string;
```
## Returns
string
关联的父图元 ID
### getstate_primitiveid
# IPCB\_PrimitiveAttribute.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveAttribute.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveAttribute.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_reverse
# IPCB\_PrimitiveAttribute.getState\_Reverse() method
获取属性状态:是否反相
## Signature
```typescript
getState_Reverse(): boolean;
```
## Returns
boolean
是否反相
### getstate_rotation
# IPCB\_PrimitiveAttribute.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_value
# IPCB\_PrimitiveAttribute.getState\_Value() method
获取属性状态:Value
## Signature
```typescript
getState_Value(): string;
```
## Returns
string
Value
### getstate_valuevisible
# IPCB\_PrimitiveAttribute.getState\_ValueVisible() method
获取属性状态:Value 是否可见
## Signature
```typescript
getState_ValueVisible(): boolean;
```
## Returns
boolean
Value 是否可见
### getstate_x
# IPCB\_PrimitiveAttribute.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number | null;
```
## Returns
number \| null
坐标 X
### getstate_y
# IPCB\_PrimitiveAttribute.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number | null;
```
## Returns
number \| null
坐标 Y
### isasync
# IPCB\_PrimitiveAttribute.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### setstate_alignmode
# IPCB\_PrimitiveAttribute.setState\_AlignMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:对齐模式
## Signature
```typescript
setState_AlignMode(alignMode: EPCB_PrimitiveStringAlignMode): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
alignMode
</td><td>
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
</td><td>
对齐模式
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_expansion
# IPCB\_PrimitiveAttribute.setState\_Expansion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:反相扩展
## Signature
```typescript
setState_Expansion(expansion: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
expansion
</td><td>
number
</td><td>
反相扩展
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_fontfamily
# IPCB\_PrimitiveAttribute.setState\_FontFamily() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体
## Signature
```typescript
setState_FontFamily(fontFamily: string): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontFamily
</td><td>
string
</td><td>
字体
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_fontsize
# IPCB\_PrimitiveAttribute.setState\_FontSize() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字号
## Signature
```typescript
setState_FontSize(fontSize: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontSize
</td><td>
number
</td><td>
字号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_key
# IPCB\_PrimitiveAttribute.setState\_Key() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:Key
## Signature
```typescript
setState_Key(key: string): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
Key
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_keyvisible
# IPCB\_PrimitiveAttribute.setState\_KeyVisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:Key 是否可见
## Signature
```typescript
setState_KeyVisible(keyVisible: boolean): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
keyVisible
</td><td>
boolean
</td><td>
Key 是否可见
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_layer
# IPCB\_PrimitiveAttribute.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_linewidth
# IPCB\_PrimitiveAttribute.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_mirror
# IPCB\_PrimitiveAttribute.setState\_Mirror() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否镜像
## Signature
```typescript
setState_Mirror(mirror: boolean): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mirror
</td><td>
boolean
</td><td>
是否镜像
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_primitivelock
# IPCB\_PrimitiveAttribute.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_reverse
# IPCB\_PrimitiveAttribute.setState\_Reverse() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否反相
## Signature
```typescript
setState_Reverse(reverse: boolean): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
reverse
</td><td>
boolean
</td><td>
是否反相
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_rotation
# IPCB\_PrimitiveAttribute.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_value
# IPCB\_PrimitiveAttribute.setState\_Value() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:Value
## Signature
```typescript
setState_Value(value: string): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
value
</td><td>
string
</td><td>
Value
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_valuevisible
# IPCB\_PrimitiveAttribute.setState\_ValueVisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:Value 是否可见
## Signature
```typescript
setState_ValueVisible(valueVisible: boolean): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
valueVisible
</td><td>
boolean
</td><td>
Value 是否可见
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_x
# IPCB\_PrimitiveAttribute.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### setstate_y
# IPCB\_PrimitiveAttribute.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### toasync
# IPCB\_PrimitiveAttribute.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveAttribute;
```
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
### tosync
# IPCB\_PrimitiveAttribute.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveAttribute;
```
## Returns
[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)
属性图元对象
FILE:references/classes/IPCB_PrimitiveComponent.md
# IPCB\_PrimitiveComponent class
器件图元
## Signature
```typescript
declare class IPCB_PrimitiveComponent implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getAllPins()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件关联的所有焊盘
</td></tr>
<tr><td>
[getState\_AddIntoBom()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:是否加入 BOM
</td></tr>
<tr><td>
[getState\_Component()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库器件
</td></tr>
<tr><td>
[getState\_Designator()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:位号
</td></tr>
<tr><td>
[getState\_Footprint()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库封装
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_Manufacturer()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:制造商
</td></tr>
<tr><td>
[getState\_ManufacturerId()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:制造商编号
</td></tr>
<tr><td>
[getState\_Model3D()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库 3D 模型
</td></tr>
<tr><td>
[getState\_Name()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:名称
</td></tr>
<tr><td>
[getState\_OtherProperty()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:其它参数
</td></tr>
<tr><td>
[getState\_Pads()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:焊盘
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_Supplier()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:供应商
</td></tr>
<tr><td>
[getState\_SupplierId()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:供应商编号
</td></tr>
<tr><td>
[getState\_UniqueId()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:唯一 ID
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_AddIntoBom(addIntoBom)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加入 BOM
</td></tr>
<tr><td>
[setState\_Designator(designator)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:位号
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_Manufacturer(manufacturer)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:制造商
</td></tr>
<tr><td>
[setState\_ManufacturerId(manufacturerId)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:制造商编号
</td></tr>
<tr><td>
[setState\_Name(name)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:名称
</td></tr>
<tr><td>
[setState\_OtherProperty(otherProperty)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:其它参数
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_Supplier(supplier)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:供应商
</td></tr>
<tr><td>
[setState\_SupplierId(supplierId)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:供应商编号
</td></tr>
<tr><td>
[setState\_UniqueId(uniqueId)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:唯一 ID
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveComponent.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveComponent.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveComponent>;
```
## Returns
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
器件图元对象
### getallpins
# IPCB\_PrimitiveComponent.getAllPins() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件关联的所有焊盘
## Signature
```typescript
getAllPins(): Promise<Array<IPCB_PrimitiveComponentPad>>;
```
## Returns
Promise<Array<[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)<!-- -->>>
器件焊盘图元数组
### getstate_addintobom
# IPCB\_PrimitiveComponent.getState\_AddIntoBom() method
获取属性状态:是否加入 BOM
## Signature
```typescript
getState_AddIntoBom(): boolean;
```
## Returns
boolean
是否加入 BOM
### getstate_component
# IPCB\_PrimitiveComponent.getState\_Component() method
获取属性状态:关联库器件
## Signature
```typescript
getState_Component(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库器件
### getstate_designator
# IPCB\_PrimitiveComponent.getState\_Designator() method
获取属性状态:位号
## Signature
```typescript
getState_Designator(): string | undefined;
```
## Returns
string \| undefined
位号
### getstate_footprint
# IPCB\_PrimitiveComponent.getState\_Footprint() method
获取属性状态:关联库封装
## Signature
```typescript
getState_Footprint(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库封装
### getstate_layer
# IPCB\_PrimitiveComponent.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfComponent;
```
## Returns
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
层
### getstate_manufacturer
# IPCB\_PrimitiveComponent.getState\_Manufacturer() method
获取属性状态:制造商
## Signature
```typescript
getState_Manufacturer(): string | undefined;
```
## Returns
string \| undefined
制造商
### getstate_manufacturerid
# IPCB\_PrimitiveComponent.getState\_ManufacturerId() method
获取属性状态:制造商编号
## Signature
```typescript
getState_ManufacturerId(): string | undefined;
```
## Returns
string \| undefined
制造商编号
### getstate_model3d
# IPCB\_PrimitiveComponent.getState\_Model3D() method
获取属性状态:关联库 3D 模型
## Signature
```typescript
getState_Model3D(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库 3D 模型
### getstate_name
# IPCB\_PrimitiveComponent.getState\_Name() method
获取属性状态:名称
## Signature
```typescript
getState_Name(): string | undefined;
```
## Returns
string \| undefined
名称
### getstate_otherproperty
# IPCB\_PrimitiveComponent.getState\_OtherProperty() method
获取属性状态:其它参数
## Signature
```typescript
getState_OtherProperty(): {
[key: string]: string | number | boolean;
} | undefined;
```
## Returns
{ \[key: string\]: string \| number \| boolean; } \| undefined
其它参数
### getstate_pads
# IPCB\_PrimitiveComponent.getState\_Pads() method
获取属性状态:焊盘
## Signature
```typescript
getState_Pads(): Array<{
primitiveId: string;
net: string;
padNumber: string;
}> | undefined;
```
## Returns
Array<{ primitiveId: string; net: string; padNumber: string; }> \| undefined
焊盘
### getstate_primitiveid
# IPCB\_PrimitiveComponent.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveComponent.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveComponent.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_rotation
# IPCB\_PrimitiveComponent.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_supplier
# IPCB\_PrimitiveComponent.getState\_Supplier() method
获取属性状态:供应商
## Signature
```typescript
getState_Supplier(): string | undefined;
```
## Returns
string \| undefined
供应商
### getstate_supplierid
# IPCB\_PrimitiveComponent.getState\_SupplierId() method
获取属性状态:供应商编号
## Signature
```typescript
getState_SupplierId(): string | undefined;
```
## Returns
string \| undefined
供应商编号
### getstate_uniqueid
# IPCB\_PrimitiveComponent.getState\_UniqueId() method
获取属性状态:唯一 ID
## Signature
```typescript
getState_UniqueId(): string | undefined;
```
## Returns
string \| undefined
唯一 ID
### getstate_x
# IPCB\_PrimitiveComponent.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# IPCB\_PrimitiveComponent.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# IPCB\_PrimitiveComponent.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveComponent.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveComponent>;
```
## Returns
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
器件图元对象
### setstate_addintobom
# IPCB\_PrimitiveComponent.setState\_AddIntoBom() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加入 BOM
## Signature
```typescript
setState_AddIntoBom(addIntoBom: boolean): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
addIntoBom
</td><td>
boolean
</td><td>
是否加入 BOM
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_designator
# IPCB\_PrimitiveComponent.setState\_Designator() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:位号
## Signature
```typescript
setState_Designator(designator: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
designator
</td><td>
string \| undefined
</td><td>
位号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_layer
# IPCB\_PrimitiveComponent.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfComponent): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_manufacturer
# IPCB\_PrimitiveComponent.setState\_Manufacturer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:制造商
## Signature
```typescript
setState_Manufacturer(manufacturer: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
manufacturer
</td><td>
string \| undefined
</td><td>
制造商
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_manufacturerid
# IPCB\_PrimitiveComponent.setState\_ManufacturerId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:制造商编号
## Signature
```typescript
setState_ManufacturerId(manufacturerId: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
manufacturerId
</td><td>
string \| undefined
</td><td>
制造商编号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_name
# IPCB\_PrimitiveComponent.setState\_Name() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:名称
## Signature
```typescript
setState_Name(name: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
name
</td><td>
string \| undefined
</td><td>
名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_otherproperty
# IPCB\_PrimitiveComponent.setState\_OtherProperty() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:其它参数
## Signature
```typescript
setState_OtherProperty(otherProperty: {
[key: string]: string | number | boolean;
}): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
otherProperty
</td><td>
\{ \[key: string\]: string \| number \| boolean; \}
</td><td>
其它参数
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_primitivelock
# IPCB\_PrimitiveComponent.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_rotation
# IPCB\_PrimitiveComponent.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_supplier
# IPCB\_PrimitiveComponent.setState\_Supplier() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:供应商
## Signature
```typescript
setState_Supplier(supplier: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
supplier
</td><td>
string \| undefined
</td><td>
供应商
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_supplierid
# IPCB\_PrimitiveComponent.setState\_SupplierId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:供应商编号
## Signature
```typescript
setState_SupplierId(supplierId: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
supplierId
</td><td>
string \| undefined
</td><td>
供应商编号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_uniqueid
# IPCB\_PrimitiveComponent.setState\_UniqueId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:唯一 ID
## Signature
```typescript
setState_UniqueId(uniqueId: string | undefined): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uniqueId
</td><td>
string \| undefined
</td><td>
唯一 ID
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_x
# IPCB\_PrimitiveComponent.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### setstate_y
# IPCB\_PrimitiveComponent.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### toasync
# IPCB\_PrimitiveComponent.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveComponent;
```
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
### tosync
# IPCB\_PrimitiveComponent.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveComponent;
```
## Returns
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
器件图元对象
FILE:references/classes/IPCB_PrimitiveComponentPad.md
# IPCB\_PrimitiveComponentPad class
器件焊盘图元
## Signature
```typescript
declare class IPCB_PrimitiveComponentPad extends IPCB_PrimitivePad
```
**Extends:** [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
## Remarks
器件焊盘图元是一个特殊的图元,它指的是在 PCB 画布上关联到封装的焊盘
你只能通过 [器件类的 getAllPinsByPrimitiveId 方法](./PCB_PrimitiveComponent.md) 或 [器件图元的 getAllPads 方法](./IPCB_PrimitiveComponent.md) 获取到器件焊盘图元
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[primitiveType](./IPCB_PrimitiveComponentPad.md)
</td><td>
`protected`
`readonly`
</td><td>
[EPCB\_PrimitiveType.COMPONENT\_PAD](../enums/EPCB_PrimitiveType.md)
</td><td>
图元类型
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveComponentPad.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getConnectedPrimitives(onlyCentreConnection)](./IPCB_PrimitiveComponentPad.md)
</td><td>
</td><td>
**_(BETA)_** 获取连接的图元
</td></tr>
<tr><td>
[getConnectedPrimitives(onlyCentreConnection)](./IPCB_PrimitiveComponentPad.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[getState\_ParentComponentPrimitiveId()](./IPCB_PrimitiveComponentPad.md)
</td><td>
</td><td>
获取属性状态:父器件图元 ID
</td></tr>
<tr><td>
[setState\_ParentComponentPrimitiveId()](./IPCB_PrimitiveComponentPad.md)
</td><td>
</td><td>
设置属性状态:父器件图元 ID
</td></tr>
</tbody></table>
---
## 属性详情
### primitivetype
# IPCB\_PrimitiveComponentPad.primitiveType property
图元类型
## Signature
```typescript
protected readonly primitiveType: EPCB_PrimitiveType.COMPONENT_PAD;
```
---
## 方法详情
### done
# IPCB\_PrimitiveComponentPad.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveComponentPad>;
```
## Returns
Promise<[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)<!-- -->>
器件焊盘图元对象
### getconnectedprimitives
# IPCB\_PrimitiveComponentPad.getConnectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取连接的图元
## Signature
```typescript
getConnectedPrimitives(onlyCentreConnection: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
onlyCentreConnection
</td><td>
true
</td><td>
是否仅中心连接,如若为 `true` 则仅获取中心连接的图元(直线、圆弧线、过孔),如若为 `false` 则获取所有接触的图元
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>>
## Remarks
本接口可以获取到与焊盘直接接触的图元
### getconnectedprimitives_1
# IPCB\_PrimitiveComponentPad.getConnectedPrimitives() method
## Signature
```typescript
getConnectedPrimitives(onlyCentreConnection: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia | IPCB_PrimitivePolyline | IPCB_PrimitiveFill>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
onlyCentreConnection
</td><td>
false
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| [IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md) \| [IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>>
### getstate_parentcomponentprimitiveid
# IPCB\_PrimitiveComponentPad.getState\_ParentComponentPrimitiveId() method
获取属性状态:父器件图元 ID
## Signature
```typescript
getState_ParentComponentPrimitiveId(): string;
```
## Returns
string
父器件图元 ID
### setstate_parentcomponentprimitiveid
# IPCB\_PrimitiveComponentPad.setState\_ParentComponentPrimitiveId() method
设置属性状态:父器件图元 ID
## Signature
```typescript
setState_ParentComponentPrimitiveId(): IPCB_PrimitiveComponentPad;
```
## Returns
[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)
器件焊盘图元对象
## Remarks
本器件焊盘图元属性不支持修改,本接口调用将不会有任何效果
FILE:references/classes/IPCB_PrimitiveDimension.md
# IPCB\_PrimitiveDimension class
尺寸标注图元
## Signature
```typescript
declare class IPCB_PrimitiveDimension implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_CoordinateSet()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:坐标集
</td></tr>
<tr><td>
[getState\_DimensionType()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:尺寸标注类型
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Precision()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:精度
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_TextFollow()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:文字跟随
</td></tr>
<tr><td>
[getState\_Unit()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
获取属性状态:单位
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_CoordinateSet(coordinateSet)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标集
</td></tr>
<tr><td>
[setState\_DimensionType(dimensionType)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:尺寸标注类型
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Precision(precision)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:精度
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Unit(unit)](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:单位
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveDimension.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveDimension.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveDimension>;
```
## Returns
Promise<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)<!-- -->>
尺寸标注图元对象
### getstate_coordinateset
# IPCB\_PrimitiveDimension.getState\_CoordinateSet() method
获取属性状态:坐标集
## Signature
```typescript
getState_CoordinateSet(): TPCB_PrimitiveDimensionCoordinateSet;
```
## Returns
[TPCB\_PrimitiveDimensionCoordinateSet](../types/TPCB_PrimitiveDimensionCoordinateSet.md)
坐标集
### getstate_dimensiontype
# IPCB\_PrimitiveDimension.getState\_DimensionType() method
获取属性状态:尺寸标注类型
## Signature
```typescript
getState_DimensionType(): EPCB_PrimitiveDimensionType;
```
## Returns
[EPCB\_PrimitiveDimensionType](../enums/EPCB_PrimitiveDimensionType.md)
尺寸标注类型
### getstate_layer
# IPCB\_PrimitiveDimension.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfDimension;
```
## Returns
[TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)
层
### getstate_linewidth
# IPCB\_PrimitiveDimension.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_precision
# IPCB\_PrimitiveDimension.getState\_Precision() method
获取属性状态:精度
## Signature
```typescript
getState_Precision(): number;
```
## Returns
number
精度
### getstate_primitiveid
# IPCB\_PrimitiveDimension.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveDimension.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveDimension.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_textfollow
# IPCB\_PrimitiveDimension.getState\_TextFollow() method
获取属性状态:文字跟随
## Signature
```typescript
getState_TextFollow(): 0 | 1;
```
## Returns
0 \| 1
文字跟随
### getstate_unit
# IPCB\_PrimitiveDimension.getState\_Unit() method
获取属性状态:单位
## Signature
```typescript
getState_Unit(): ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL;
```
## Returns
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.CENTIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md)
单位
### isasync
# IPCB\_PrimitiveDimension.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveDimension.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveDimension>;
```
## Returns
Promise<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)<!-- -->>
尺寸标注图元对象
### setstate_coordinateset
# IPCB\_PrimitiveDimension.setState\_CoordinateSet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标集
## Signature
```typescript
setState_CoordinateSet(coordinateSet: TPCB_PrimitiveDimensionCoordinateSet): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
coordinateSet
</td><td>
[TPCB\_PrimitiveDimensionCoordinateSet](../types/TPCB_PrimitiveDimensionCoordinateSet.md)
</td><td>
坐标集
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_dimensiontype
# IPCB\_PrimitiveDimension.setState\_DimensionType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:尺寸标注类型
## Signature
```typescript
setState_DimensionType(dimensionType: EPCB_PrimitiveDimensionType): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
dimensionType
</td><td>
[EPCB\_PrimitiveDimensionType](../enums/EPCB_PrimitiveDimensionType.md)
</td><td>
尺寸标注类型
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_layer
# IPCB\_PrimitiveDimension.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfDimension): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_linewidth
# IPCB\_PrimitiveDimension.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_precision
# IPCB\_PrimitiveDimension.setState\_Precision() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:精度
## Signature
```typescript
setState_Precision(precision: number): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
precision
</td><td>
number
</td><td>
精度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_primitivelock
# IPCB\_PrimitiveDimension.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### setstate_unit
# IPCB\_PrimitiveDimension.setState\_Unit() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:单位
## Signature
```typescript
setState_Unit(unit: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL): IPCB_PrimitiveDimension;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
unit
</td><td>
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.CENTIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md)
</td><td>
单位
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### toasync
# IPCB\_PrimitiveDimension.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveDimension;
```
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
### tosync
# IPCB\_PrimitiveDimension.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveDimension;
```
## Returns
[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
尺寸标注图元对象
FILE:references/classes/IPCB_PrimitiveFill.md
# IPCB\_PrimitiveFill class
填充图元
## Signature
```typescript
declare class IPCB_PrimitiveFill implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertToPolyline()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:折线图元
</td></tr>
<tr><td>
[convertToPour()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:覆铜边框图元
</td></tr>
<tr><td>
[convertToRegion()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:区域图元(默认是禁止区域)
</td></tr>
<tr><td>
[done()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_ComplexPolygon()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:复杂多边形
</td></tr>
<tr><td>
[getState\_FillMode()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:填充模式
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_ComplexPolygon(complexPolygon)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:复杂多边形
</td></tr>
<tr><td>
[setState\_FillMode(fillMode)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充模式
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveFill.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### converttopolyline
# IPCB\_PrimitiveFill.convertToPolyline() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:折线图元
## Signature
```typescript
convertToPolyline(): Promise<IPCB_PrimitivePolyline>;
```
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
折线图元对象
### converttopour
# IPCB\_PrimitiveFill.convertToPour() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:覆铜边框图元
## Signature
```typescript
convertToPour(): Promise<IPCB_PrimitivePour>;
```
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
覆铜边框图元对象
### converttoregion
# IPCB\_PrimitiveFill.convertToRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:区域图元(默认是禁止区域)
## Signature
```typescript
convertToRegion(): Promise<IPCB_PrimitiveRegion>;
```
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
区域图元对象
### done
# IPCB\_PrimitiveFill.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveFill>;
```
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
填充图元对象
### getstate_complexpolygon
# IPCB\_PrimitiveFill.getState\_ComplexPolygon() method
获取属性状态:复杂多边形
## Signature
```typescript
getState_ComplexPolygon(): IPCB_Polygon;
```
## Returns
[IPCB\_Polygon](./IPCB_Polygon.md)
复杂多边形
### getstate_fillmode
# IPCB\_PrimitiveFill.getState\_FillMode() method
获取属性状态:填充模式
## Signature
```typescript
getState_FillMode(): EPCB_PrimitiveFillMode | undefined;
```
## Returns
[EPCB\_PrimitiveFillMode](../enums/EPCB_PrimitiveFillMode.md) \| undefined
填充模式
### getstate_layer
# IPCB\_PrimitiveFill.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfFill;
```
## Returns
[TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)
层
### getstate_linewidth
# IPCB\_PrimitiveFill.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_net
# IPCB\_PrimitiveFill.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string | undefined;
```
## Returns
string \| undefined
网络名称
### getstate_primitiveid
# IPCB\_PrimitiveFill.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveFill.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveFill.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### isasync
# IPCB\_PrimitiveFill.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveFill.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveFill>;
```
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
填充图元对象
### setstate_complexpolygon
# IPCB\_PrimitiveFill.setState\_ComplexPolygon() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:复杂多边形
## Signature
```typescript
setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### setstate_fillmode
# IPCB\_PrimitiveFill.setState\_FillMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充模式
## Signature
```typescript
setState_FillMode(fillMode: EPCB_PrimitiveFillMode): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillMode
</td><td>
[EPCB\_PrimitiveFillMode](../enums/EPCB_PrimitiveFillMode.md)
</td><td>
填充模式
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### setstate_layer
# IPCB\_PrimitiveFill.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfFill): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### setstate_linewidth
# IPCB\_PrimitiveFill.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### setstate_net
# IPCB\_PrimitiveFill.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### setstate_primitivelock
# IPCB\_PrimitiveFill.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveFill;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### toasync
# IPCB\_PrimitiveFill.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveFill;
```
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
### tosync
# IPCB\_PrimitiveFill.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveFill;
```
## Returns
[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
填充图元对象
FILE:references/classes/IPCB_PrimitiveImage.md
# IPCB\_PrimitiveImage class
图像图元
## Signature
```typescript
declare class IPCB_PrimitiveImage implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_ComplexPolygon()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:图像源数据(复杂多边形)
</td></tr>
<tr><td>
[getState\_Height()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:高
</td></tr>
<tr><td>
[getState\_HorizonMirror()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:是否水平镜像
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_Width()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:宽
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:BBox 左上点坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
获取属性状态:BBox 左上点坐标 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_Height(height)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:高
</td></tr>
<tr><td>
[setState\_HorizonMirror(horizonMirror)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否水平镜像
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_Width(width)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:宽
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:BBox 左上点坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:BBox 左上点坐标 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveImage.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveImage.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveImage>;
```
## Returns
Promise<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)<!-- -->>
图像图元对象
### getstate_complexpolygon
# IPCB\_PrimitiveImage.getState\_ComplexPolygon() method
获取属性状态:图像源数据(复杂多边形)
## Signature
```typescript
getState_ComplexPolygon(): TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>;
```
## Returns
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->>
图像源数据(复杂多边形)
### getstate_height
# IPCB\_PrimitiveImage.getState\_Height() method
获取属性状态:高
## Signature
```typescript
getState_Height(): number;
```
## Returns
number
高
### getstate_horizonmirror
# IPCB\_PrimitiveImage.getState\_HorizonMirror() method
获取属性状态:是否水平镜像
## Signature
```typescript
getState_HorizonMirror(): boolean;
```
## Returns
boolean
是否水平镜像
### getstate_layer
# IPCB\_PrimitiveImage.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfImage;
```
## Returns
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
层
### getstate_primitiveid
# IPCB\_PrimitiveImage.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveImage.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveImage.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_rotation
# IPCB\_PrimitiveImage.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_width
# IPCB\_PrimitiveImage.getState\_Width() method
获取属性状态:宽
## Signature
```typescript
getState_Width(): number;
```
## Returns
number
宽
### getstate_x
# IPCB\_PrimitiveImage.getState\_X() method
获取属性状态:BBox 左上点坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
BBox 左上点坐标 X
### getstate_y
# IPCB\_PrimitiveImage.getState\_Y() method
获取属性状态:BBox 左上点坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
BBox 左上点坐标 Y
### isasync
# IPCB\_PrimitiveImage.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveImage.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveImage>;
```
## Returns
Promise<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)<!-- -->>
图像图元对象
### setstate_height
# IPCB\_PrimitiveImage.setState\_Height() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:高
## Signature
```typescript
setState_Height(height: number): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
height
</td><td>
number
</td><td>
高
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_horizonmirror
# IPCB\_PrimitiveImage.setState\_HorizonMirror() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否水平镜像
## Signature
```typescript
setState_HorizonMirror(horizonMirror: boolean): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
horizonMirror
</td><td>
boolean
</td><td>
是否水平镜像
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_layer
# IPCB\_PrimitiveImage.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_primitivelock
# IPCB\_PrimitiveImage.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_rotation
# IPCB\_PrimitiveImage.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_width
# IPCB\_PrimitiveImage.setState\_Width() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:宽
## Signature
```typescript
setState_Width(width: number): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
width
</td><td>
number
</td><td>
宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_x
# IPCB\_PrimitiveImage.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:BBox 左上点坐标 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
BBox 左上点坐标 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### setstate_y
# IPCB\_PrimitiveImage.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:BBox 左上点坐标 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitiveImage;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
BBox 左上点坐标 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### toasync
# IPCB\_PrimitiveImage.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveImage;
```
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
### tosync
# IPCB\_PrimitiveImage.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveImage;
```
## Returns
[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
图像图元对象
FILE:references/classes/IPCB_PrimitiveLine.md
# IPCB\_PrimitiveLine class
直线图元
## Signature
```typescript
declare class IPCB_PrimitiveLine implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
直线和圆弧线均为导线,对应画布的线条走线和圆弧走线
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getAdjacentPrimitives()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取相邻的图元对象
</td></tr>
<tr><td>
[getEntireTrack(includeVias)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取整段导线
</td></tr>
<tr><td>
[getEntireTrack(includeVias)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取整段导线
</td></tr>
<tr><td>
[getState\_EndX()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:终止位置 X
</td></tr>
<tr><td>
[getState\_EndY()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:终止位置 Y
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_StartX()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:起始位置 X
</td></tr>
<tr><td>
[getState\_StartY()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
获取属性状态:起始位置 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_EndX(endX)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止位置 X
</td></tr>
<tr><td>
[setState\_EndY(endY)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止位置 Y
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_StartX(startX)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始位置 X
</td></tr>
<tr><td>
[setState\_StartY(startY)](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始位置 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveLine.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveLine.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveLine>;
```
## Returns
Promise<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)<!-- -->>
直线图元对象
### getadjacentprimitives
# IPCB\_PrimitiveLine.getAdjacentPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取相邻的图元对象
## Signature
```typescript
getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveVia | IPCB_PrimitiveArc>>;
```
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
相邻的直线、过孔、圆弧线图元对象
## Remarks
将会获取与直线两端直接相连的直线、过孔、圆弧线图元对象
### getentiretrack
# IPCB\_PrimitiveLine.getEntireTrack() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取整段导线
## Signature
```typescript
getEntireTrack(includeVias: false): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeVias
</td><td>
false
</td><td>
是否包含导线两端的过孔
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
整段导线内的所有直线和圆弧线
### getentiretrack_1
# IPCB\_PrimitiveLine.getEntireTrack() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取整段导线
## Signature
```typescript
getEntireTrack(includeVias: true): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc | IPCB_PrimitiveVia>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeVias
</td><td>
true
</td><td>
是否包含导线两端的过孔
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>>
整段导线内的所有直线、圆弧线,以及两端连接的过孔(如果有)
### getstate_endx
# IPCB\_PrimitiveLine.getState\_EndX() method
获取属性状态:终止位置 X
## Signature
```typescript
getState_EndX(): number;
```
## Returns
number
终止位置 X
### getstate_endy
# IPCB\_PrimitiveLine.getState\_EndY() method
获取属性状态:终止位置 Y
## Signature
```typescript
getState_EndY(): number;
```
## Returns
number
终止位置 Y
### getstate_layer
# IPCB\_PrimitiveLine.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfLine;
```
## Returns
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
层
### getstate_linewidth
# IPCB\_PrimitiveLine.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_net
# IPCB\_PrimitiveLine.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_primitiveid
# IPCB\_PrimitiveLine.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveLine.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveLine.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_startx
# IPCB\_PrimitiveLine.getState\_StartX() method
获取属性状态:起始位置 X
## Signature
```typescript
getState_StartX(): number;
```
## Returns
number
起始位置 X
### getstate_starty
# IPCB\_PrimitiveLine.getState\_StartY() method
获取属性状态:起始位置 Y
## Signature
```typescript
getState_StartY(): number;
```
## Returns
number
起始位置 Y
### isasync
# IPCB\_PrimitiveLine.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveLine.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveLine>;
```
## Returns
Promise<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)<!-- -->>
直线图元对象
### setstate_endx
# IPCB\_PrimitiveLine.setState\_EndX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止位置 X
## Signature
```typescript
setState_EndX(endX: number): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endX
</td><td>
number
</td><td>
终止位置 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_endy
# IPCB\_PrimitiveLine.setState\_EndY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止位置 Y
## Signature
```typescript
setState_EndY(endY: number): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endY
</td><td>
number
</td><td>
终止位置 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_layer
# IPCB\_PrimitiveLine.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_linewidth
# IPCB\_PrimitiveLine.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_net
# IPCB\_PrimitiveLine.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_primitivelock
# IPCB\_PrimitiveLine.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_startx
# IPCB\_PrimitiveLine.setState\_StartX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始位置 X
## Signature
```typescript
setState_StartX(startX: number): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startX
</td><td>
number
</td><td>
起始位置 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### setstate_starty
# IPCB\_PrimitiveLine.setState\_StartY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始位置 Y
## Signature
```typescript
setState_StartY(startY: number): IPCB_PrimitiveLine;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startY
</td><td>
number
</td><td>
起始位置 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### toasync
# IPCB\_PrimitiveLine.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveLine;
```
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
### tosync
# IPCB\_PrimitiveLine.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveLine;
```
## Returns
[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
直线图元对象
FILE:references/classes/IPCB_PrimitiveObject.md
# IPCB\_PrimitiveObject class
二进制内嵌对象图元
## Signature
```typescript
declare class IPCB_PrimitiveObject implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_BinaryData()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:二进制数据
</td></tr>
<tr><td>
[getState\_FileName()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:文件名
</td></tr>
<tr><td>
[getState\_Height()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:高
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_Mirror()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:是否水平镜像
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_TopLeftX()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:左上点 X
</td></tr>
<tr><td>
[getState\_TopLeftY()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:左上点 Y
</td></tr>
<tr><td>
[getState\_Width()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
获取属性状态:宽
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_BinaryData(binaryData)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:二进制数据
</td></tr>
<tr><td>
[setState\_FileName(fileName)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:文件名
</td></tr>
<tr><td>
[setState\_Height(height)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:高
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_Mirror(mirror)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:是否水平镜像
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_TopLeftX(topLeftX)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:左上点 X
</td></tr>
<tr><td>
[setState\_TopLeftY(topLeftY)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:左上点 Y
</td></tr>
<tr><td>
[setState\_Width(width)](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
设置属性状态:宽
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveObject.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveObject.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveObject>;
```
## Returns
Promise<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)<!-- -->>
二进制内嵌对象图元对象
### getstate_binarydata
# IPCB\_PrimitiveObject.getState\_BinaryData() method
获取属性状态:二进制数据
## Signature
```typescript
getState_BinaryData(): string;
```
## Returns
string
二进制数据
### getstate_filename
# IPCB\_PrimitiveObject.getState\_FileName() method
获取属性状态:文件名
## Signature
```typescript
getState_FileName(): string;
```
## Returns
string
文件名
### getstate_height
# IPCB\_PrimitiveObject.getState\_Height() method
获取属性状态:高
## Signature
```typescript
getState_Height(): number;
```
## Returns
number
高
### getstate_layer
# IPCB\_PrimitiveObject.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfObject | undefined;
```
## Returns
[TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md) \| undefined
层
### getstate_mirror
# IPCB\_PrimitiveObject.getState\_Mirror() method
获取属性状态:是否水平镜像
## Signature
```typescript
getState_Mirror(): boolean;
```
## Returns
boolean
是否水平镜像
### getstate_primitiveid
# IPCB\_PrimitiveObject.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveObject.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveObject.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_rotation
# IPCB\_PrimitiveObject.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_topleftx
# IPCB\_PrimitiveObject.getState\_TopLeftX() method
获取属性状态:左上点 X
## Signature
```typescript
getState_TopLeftX(): number | undefined;
```
## Returns
number \| undefined
左上点 X
### getstate_toplefty
# IPCB\_PrimitiveObject.getState\_TopLeftY() method
获取属性状态:左上点 Y
## Signature
```typescript
getState_TopLeftY(): number | undefined;
```
## Returns
number \| undefined
左上点 Y
### getstate_width
# IPCB\_PrimitiveObject.getState\_Width() method
获取属性状态:宽
## Signature
```typescript
getState_Width(): number;
```
## Returns
number
宽
### isasync
# IPCB\_PrimitiveObject.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveObject.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveObject>;
```
## Returns
Promise<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)<!-- -->>
二进制内嵌对象图元对象
### setstate_binarydata
# IPCB\_PrimitiveObject.setState\_BinaryData() method
设置属性状态:二进制数据
## Signature
```typescript
setState_BinaryData(binaryData: string): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
binaryData
</td><td>
string
</td><td>
二进制数据
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_filename
# IPCB\_PrimitiveObject.setState\_FileName() method
设置属性状态:文件名
## Signature
```typescript
setState_FileName(fileName: string): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
文件名
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_height
# IPCB\_PrimitiveObject.setState\_Height() method
设置属性状态:高
## Signature
```typescript
setState_Height(height: number): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
height
</td><td>
number
</td><td>
高
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_layer
# IPCB\_PrimitiveObject.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfObject): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_mirror
# IPCB\_PrimitiveObject.setState\_Mirror() method
设置属性状态:是否水平镜像
## Signature
```typescript
setState_Mirror(mirror: boolean): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mirror
</td><td>
boolean
</td><td>
是否水平镜像
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_primitivelock
# IPCB\_PrimitiveObject.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_rotation
# IPCB\_PrimitiveObject.setState\_Rotation() method
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_topleftx
# IPCB\_PrimitiveObject.setState\_TopLeftX() method
设置属性状态:左上点 X
## Signature
```typescript
setState_TopLeftX(topLeftX: number): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topLeftX
</td><td>
number
</td><td>
左上点 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_toplefty
# IPCB\_PrimitiveObject.setState\_TopLeftY() method
设置属性状态:左上点 Y
## Signature
```typescript
setState_TopLeftY(topLeftY: number): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topLeftY
</td><td>
number
</td><td>
左上点 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### setstate_width
# IPCB\_PrimitiveObject.setState\_Width() method
设置属性状态:宽
## Signature
```typescript
setState_Width(width: number): IPCB_PrimitiveObject;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
width
</td><td>
number
</td><td>
宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### toasync
# IPCB\_PrimitiveObject.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveObject;
```
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
### tosync
# IPCB\_PrimitiveObject.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveObject;
```
## Returns
[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
二进制内嵌对象图元对象
FILE:references/classes/IPCB_PrimitivePad.md
# IPCB\_PrimitivePad class
焊盘图元
## Signature
```typescript
declare class IPCB_PrimitivePad implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[async](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
异步
</td></tr>
<tr><td>
[heatWelding](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
IPCB\_PrimitivePadHeatWelding \| null
</td><td>
热焊优化参数
</td></tr>
<tr><td>
[hole](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null
</td><td>
孔
</td></tr>
<tr><td>
[holeOffsetX](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
孔偏移 X
</td></tr>
<tr><td>
[holeOffsetY](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
孔偏移 Y
</td></tr>
<tr><td>
[holeRotation](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
孔相对于焊盘的旋转角度
</td></tr>
<tr><td>
[layer](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
</td><td>
层
</td></tr>
<tr><td>
[metallization](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
是否金属化孔壁
</td></tr>
<tr><td>
[net?](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
[pad?](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)
</td><td>
_(Optional)_ 焊盘外形
</td></tr>
<tr><td>
[padNumber](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
string
</td><td>
焊盘编号
</td></tr>
<tr><td>
[padType](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
</td><td>
焊盘类型
</td></tr>
<tr><td>
[primitiveId?](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ 图元 ID
</td></tr>
<tr><td>
[primitiveLock](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
<tr><td>
[primitiveType](./IPCB_PrimitivePad.md)
</td><td>
`protected`
`readonly`
</td><td>
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
</td><td>
图元类型
</td></tr>
<tr><td>
[rotation](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
旋转角度
</td></tr>
<tr><td>
[solderMaskAndPasteMaskExpansion](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
</td><td>
阻焊/助焊扩展
</td></tr>
<tr><td>
[specialPad?](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
[TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)
</td><td>
_(Optional)_ 特殊焊盘外形
</td></tr>
<tr><td>
[x](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
位置 X
</td></tr>
<tr><td>
[y](./IPCB_PrimitivePad.md)
</td><td>
`protected`
</td><td>
number
</td><td>
位置 Y
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 在 PCB 画布中创建图元
</td></tr>
<tr><td>
[done()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_HeatWelding()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:热焊优化参数
</td></tr>
<tr><td>
[getState\_Hole()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:孔
</td></tr>
<tr><td>
[getState\_HoleOffsetX()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:孔偏移 X
</td></tr>
<tr><td>
[getState\_HoleOffsetY()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:孔偏移 Y
</td></tr>
<tr><td>
[getState\_HoleRotation()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:孔相对于焊盘的旋转角度
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_Metallization()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:是否金属化孔壁
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_Pad()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:焊盘外形
</td></tr>
<tr><td>
[getState\_PadNumber()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:焊盘编号
</td></tr>
<tr><td>
[getState\_PadType()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:焊盘类型
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_SolderMaskAndPasteMaskExpansion()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:阻焊/助焊扩展
</td></tr>
<tr><td>
[getState\_SpecialPad()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:特殊焊盘外形
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:位置 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
获取属性状态:位置 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_HeatWelding(heatWelding)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:热焊优化参数
</td></tr>
<tr><td>
[setState\_Hole(hole)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:孔
</td></tr>
<tr><td>
[setState\_HoleOffsetX(holeOffsetX)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:孔偏移 X
</td></tr>
<tr><td>
[setState\_HoleOffsetY(holeOffsetY)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:孔偏移 Y
</td></tr>
<tr><td>
[setState\_HoleRotation(holeRotation)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:孔相对于焊盘的旋转角度
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_Metallization(metallization)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否金属化孔壁
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络
</td></tr>
<tr><td>
[setState\_Pad(pad)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:焊盘外形
</td></tr>
<tr><td>
[setState\_PadNumber(padNumber)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:焊盘编号
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_SolderMaskAndPasteMaskExpansion(solderMaskAndPasteMaskExpansion)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:阻焊/助焊扩展
</td></tr>
<tr><td>
[setState\_SpecialPad(specialPad)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:特殊焊盘外形
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:位置 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:位置 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitivePad.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 属性详情
### async
# IPCB\_PrimitivePad.async property
异步
## Signature
```typescript
protected async: boolean;
```
### heatwelding
# IPCB\_PrimitivePad.heatWelding property
热焊优化参数
## Signature
```typescript
protected heatWelding: IPCB_PrimitivePadHeatWelding | null;
```
### hole
# IPCB\_PrimitivePad.hole property
孔
## Signature
```typescript
protected hole: TPCB_PrimitivePadHole | null;
```
### holeoffsetx
# IPCB\_PrimitivePad.holeOffsetX property
孔偏移 X
## Signature
```typescript
protected holeOffsetX: number;
```
### holeoffsety
# IPCB\_PrimitivePad.holeOffsetY property
孔偏移 Y
## Signature
```typescript
protected holeOffsetY: number;
```
### holerotation
# IPCB\_PrimitivePad.holeRotation property
孔相对于焊盘的旋转角度
## Signature
```typescript
protected holeRotation: number;
```
### layer
# IPCB\_PrimitivePad.layer property
层
## Signature
```typescript
protected layer: TPCB_LayersOfPad;
```
### metallization
# IPCB\_PrimitivePad.metallization property
是否金属化孔壁
## Signature
```typescript
protected metallization: boolean;
```
### net
# IPCB\_PrimitivePad.net property
网络名称
## Signature
```typescript
protected net?: string;
```
### pad
# IPCB\_PrimitivePad.pad property
焊盘外形
## Signature
```typescript
protected pad?: TPCB_PrimitivePadShape;
```
### padnumber
# IPCB\_PrimitivePad.padNumber property
焊盘编号
## Signature
```typescript
protected padNumber: string;
```
### padtype
# IPCB\_PrimitivePad.padType property
焊盘类型
## Signature
```typescript
protected padType: EPCB_PrimitivePadType;
```
### primitiveid
# IPCB\_PrimitivePad.primitiveId property
图元 ID
## Signature
```typescript
protected primitiveId?: string;
```
### primitivelock
# IPCB\_PrimitivePad.primitiveLock property
是否锁定
## Signature
```typescript
protected primitiveLock: boolean;
```
### primitivetype
# IPCB\_PrimitivePad.primitiveType property
图元类型
## Signature
```typescript
protected readonly primitiveType: EPCB_PrimitiveType;
```
### rotation
# IPCB\_PrimitivePad.rotation property
旋转角度
## Signature
```typescript
protected rotation: number;
```
### soldermaskandpastemaskexpansion
# IPCB\_PrimitivePad.solderMaskAndPasteMaskExpansion property
阻焊/助焊扩展
## Signature
```typescript
protected solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
```
### specialpad
# IPCB\_PrimitivePad.specialPad property
特殊焊盘外形
## Signature
```typescript
protected specialPad?: TPCB_PrimitiveSpecialPadShape;
```
### x
# IPCB\_PrimitivePad.x property
位置 X
## Signature
```typescript
protected x: number;
```
### y
# IPCB\_PrimitivePad.y property
位置 Y
## Signature
```typescript
protected y: number;
```
---
## 方法详情
### create
# IPCB\_PrimitivePad.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在 PCB 画布中创建图元
## Signature
```typescript
create(): Promise<IPCB_PrimitivePad>;
```
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>
焊盘图元对象
### done
# IPCB\_PrimitivePad.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitivePad>;
```
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>
尺寸标注图元对象
### getstate_heatwelding
# IPCB\_PrimitivePad.getState\_HeatWelding() method
获取属性状态:热焊优化参数
## Signature
```typescript
getState_HeatWelding(): IPCB_PrimitivePadHeatWelding | null;
```
## Returns
IPCB\_PrimitivePadHeatWelding \| null
热焊优化参数
### getstate_hole
# IPCB\_PrimitivePad.getState\_Hole() method
获取属性状态:孔
## Signature
```typescript
getState_Hole(): TPCB_PrimitivePadHole | null;
```
## Returns
[TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null
孔
### getstate_holeoffsetx
# IPCB\_PrimitivePad.getState\_HoleOffsetX() method
获取属性状态:孔偏移 X
## Signature
```typescript
getState_HoleOffsetX(): number;
```
## Returns
number
孔偏移 X
### getstate_holeoffsety
# IPCB\_PrimitivePad.getState\_HoleOffsetY() method
获取属性状态:孔偏移 Y
## Signature
```typescript
getState_HoleOffsetY(): number;
```
## Returns
number
孔偏移 Y
### getstate_holerotation
# IPCB\_PrimitivePad.getState\_HoleRotation() method
获取属性状态:孔相对于焊盘的旋转角度
## Signature
```typescript
getState_HoleRotation(): number;
```
## Returns
number
孔相对于焊盘的旋转角度
### getstate_layer
# IPCB\_PrimitivePad.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfPad;
```
## Returns
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
层
### getstate_metallization
# IPCB\_PrimitivePad.getState\_Metallization() method
获取属性状态:是否金属化孔壁
## Signature
```typescript
getState_Metallization(): boolean;
```
## Returns
boolean
是否金属化孔壁
### getstate_net
# IPCB\_PrimitivePad.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string | undefined;
```
## Returns
string \| undefined
网络名称
### getstate_pad
# IPCB\_PrimitivePad.getState\_Pad() method
获取属性状态:焊盘外形
## Signature
```typescript
getState_Pad(): TPCB_PrimitivePadShape | undefined;
```
## Returns
[TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md) \| undefined
焊盘外形
### getstate_padnumber
# IPCB\_PrimitivePad.getState\_PadNumber() method
获取属性状态:焊盘编号
## Signature
```typescript
getState_PadNumber(): string;
```
## Returns
string
焊盘编号
### getstate_padtype
# IPCB\_PrimitivePad.getState\_PadType() method
获取属性状态:焊盘类型
## Signature
```typescript
getState_PadType(): EPCB_PrimitivePadType;
```
## Returns
[EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
焊盘类型
### getstate_primitiveid
# IPCB\_PrimitivePad.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitivePad.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitivePad.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_rotation
# IPCB\_PrimitivePad.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_soldermaskandpastemaskexpansion
# IPCB\_PrimitivePad.getState\_SolderMaskAndPasteMaskExpansion() method
获取属性状态:阻焊/助焊扩展
## Signature
```typescript
getState_SolderMaskAndPasteMaskExpansion(): IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
```
## Returns
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
阻焊/助焊扩展
### getstate_specialpad
# IPCB\_PrimitivePad.getState\_SpecialPad() method
获取属性状态:特殊焊盘外形
## Signature
```typescript
getState_SpecialPad(): TPCB_PrimitiveSpecialPadShape | undefined;
```
## Returns
[TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md) \| undefined
特殊焊盘外形
### getstate_x
# IPCB\_PrimitivePad.getState\_X() method
获取属性状态:位置 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
位置 X
### getstate_y
# IPCB\_PrimitivePad.getState\_Y() method
获取属性状态:位置 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
位置 Y
### isasync
# IPCB\_PrimitivePad.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitivePad.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitivePad>;
```
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>
焊盘图元对象
### setstate_heatwelding
# IPCB\_PrimitivePad.setState\_HeatWelding() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:热焊优化参数
## Signature
```typescript
setState_HeatWelding(heatWelding: IPCB_PrimitivePadHeatWelding | null): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
heatWelding
</td><td>
IPCB\_PrimitivePadHeatWelding \| null
</td><td>
热焊优化参数
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_hole
# IPCB\_PrimitivePad.setState\_Hole() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:孔
## Signature
```typescript
setState_Hole(hole: TPCB_PrimitivePadHole): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
hole
</td><td>
[TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md)
</td><td>
焊盘钻孔
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
设置孔时将会联动设置部分其它属性状态:
1. 层将会强制切换到多层
本接口无法将孔设置为 `null`<!-- -->,如果想要移除孔属性,请使用 [setState\_Layer](./IPCB_PrimitivePad.md) 方法切换层为顶层或底层
### setstate_holeoffsetx
# IPCB\_PrimitivePad.setState\_HoleOffsetX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:孔偏移 X
## Signature
```typescript
setState_HoleOffsetX(holeOffsetX: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
holeOffsetX
</td><td>
number
</td><td>
孔偏移 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
如若孔不存在,则属性将不会被修改
### setstate_holeoffsety
# IPCB\_PrimitivePad.setState\_HoleOffsetY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:孔偏移 Y
## Signature
```typescript
setState_HoleOffsetY(holeOffsetY: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
holeOffsetY
</td><td>
number
</td><td>
孔偏移 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
如若孔不存在,则属性将不会被修改
### setstate_holerotation
# IPCB\_PrimitivePad.setState\_HoleRotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:孔相对于焊盘的旋转角度
## Signature
```typescript
setState_HoleRotation(holeRotation: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
holeRotation
</td><td>
number
</td><td>
孔相对于焊盘的旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
如若孔不存在,则属性将不会被修改
### setstate_layer
# IPCB\_PrimitivePad.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfPad): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
设置层时将会联动设置部分其它属性状态:
1. 顶层与底层切换时:阻焊/助焊扩展属性将会跟随切换,数据值不变
2. 多层切换到单层时:判断切换到顶层还是底层,阻焊/助焊扩展属性将只保留指定层对应的数据;如若存在特殊焊盘,将转换为普通焊盘属性,并且只保留指定层对应的数据;与孔有关的属性将被重置到默认值
3. 单层切换到多层时:阻焊/助焊扩展属性将只保留阻焊扩展,并复制原数据应用于顶层和底层;焊盘钻孔属性将被赋指定值,长宽均为焊盘直径(焊盘为长圆形或正多边形)、宽(焊盘为矩形)的 60% 的长圆形(数据层面上是长圆形,实则是正圆形),如若焊盘为折线复杂多边形,则通过专用算法计算得出数据(通常比较抽象,建议后期修改)
### setstate_metallization
# IPCB\_PrimitivePad.setState\_Metallization() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否金属化孔壁
## Signature
```typescript
setState_Metallization(metallization: boolean): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
metallization
</td><td>
boolean
</td><td>
是否金属化孔壁
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
如若孔不存在,则属性将不会被修改
### setstate_net
# IPCB\_PrimitivePad.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络
## Signature
```typescript
setState_Net(net?: string): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
本接口仅在 PCB 编辑器可用,空字符串与 `undefined` 均被视为空网络
### setstate_pad
# IPCB\_PrimitivePad.setState\_Pad() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:焊盘外形
## Signature
```typescript
setState_Pad(pad: TPCB_PrimitivePadShape): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pad
</td><td>
[TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)
</td><td>
焊盘外形
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
设置焊盘外形时将会联动设置部分其它属性状态:
1. 特殊焊盘外形属性将被清空
### setstate_padnumber
# IPCB\_PrimitivePad.setState\_PadNumber() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:焊盘编号
## Signature
```typescript
setState_PadNumber(padNumber: string): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padNumber
</td><td>
string
</td><td>
焊盘编号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_primitivelock
# IPCB\_PrimitivePad.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_rotation
# IPCB\_PrimitivePad.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_soldermaskandpastemaskexpansion
# IPCB\_PrimitivePad.setState\_SolderMaskAndPasteMaskExpansion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:阻焊/助焊扩展
## Signature
```typescript
setState_SolderMaskAndPasteMaskExpansion(solderMaskAndPasteMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
solderMaskAndPasteMaskExpansion
</td><td>
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
</td><td>
阻焊/助焊扩展
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_specialpad
# IPCB\_PrimitivePad.setState\_SpecialPad() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:特殊焊盘外形
## Signature
```typescript
setState_SpecialPad(specialPad: TPCB_PrimitiveSpecialPadShape): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
specialPad
</td><td>
[TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)
</td><td>
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
## Remarks
设置特殊焊盘外形时将会联动设置部分其它属性状态:
1. 焊盘外形属性将被清空
### setstate_x
# IPCB\_PrimitivePad.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:位置 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
位置 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### setstate_y
# IPCB\_PrimitivePad.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:位置 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitivePad;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
位置 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### toasync
# IPCB\_PrimitivePad.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitivePad;
```
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
### tosync
# IPCB\_PrimitivePad.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitivePad;
```
## Returns
[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
焊盘图元对象
FILE:references/classes/IPCB_PrimitivePolyline.md
# IPCB\_PrimitivePolyline class
折线图元
## Signature
```typescript
declare class IPCB_PrimitivePolyline implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertToFill()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:填充图元
</td></tr>
<tr><td>
[convertToPour()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:覆铜边框图元
</td></tr>
<tr><td>
[convertToRegion()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:区域图元
</td></tr>
<tr><td>
[done()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_Polygon()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:单多边形
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_Polygon(polygon)](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:单多边形
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitivePolyline.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### converttofill
# IPCB\_PrimitivePolyline.convertToFill() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:填充图元
## Signature
```typescript
convertToFill(): Promise<IPCB_PrimitiveFill>;
```
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
填充图元对象
### converttopour
# IPCB\_PrimitivePolyline.convertToPour() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:覆铜边框图元
## Signature
```typescript
convertToPour(): Promise<IPCB_PrimitivePour>;
```
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
覆铜边框图元对象
### converttoregion
# IPCB\_PrimitivePolyline.convertToRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:区域图元
## Signature
```typescript
convertToRegion(): Promise<IPCB_PrimitiveRegion>;
```
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
区域图元对象
### done
# IPCB\_PrimitivePolyline.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitivePolyline>;
```
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
折线图元对象
### getstate_layer
# IPCB\_PrimitivePolyline.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfLine;
```
## Returns
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
层
### getstate_linewidth
# IPCB\_PrimitivePolyline.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_net
# IPCB\_PrimitivePolyline.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_polygon
# IPCB\_PrimitivePolyline.getState\_Polygon() method
获取属性状态:单多边形
## Signature
```typescript
getState_Polygon(): IPCB_Polygon;
```
## Returns
[IPCB\_Polygon](./IPCB_Polygon.md)
单多边形
### getstate_primitiveid
# IPCB\_PrimitivePolyline.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitivePolyline.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitivePolyline.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### isasync
# IPCB\_PrimitivePolyline.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitivePolyline.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitivePolyline>;
```
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
折线图元对象
### setstate_layer
# IPCB\_PrimitivePolyline.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfLine): IPCB_PrimitivePolyline;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### setstate_linewidth
# IPCB\_PrimitivePolyline.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitivePolyline;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### setstate_net
# IPCB\_PrimitivePolyline.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitivePolyline;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### setstate_polygon
# IPCB\_PrimitivePolyline.setState\_Polygon() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:单多边形
## Signature
```typescript
setState_Polygon(polygon: IPCB_Polygon): IPCB_PrimitivePolyline;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
polygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
单多边形
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### setstate_primitivelock
# IPCB\_PrimitivePolyline.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePolyline;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### toasync
# IPCB\_PrimitivePolyline.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitivePolyline;
```
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
### tosync
# IPCB\_PrimitivePolyline.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitivePolyline;
```
## Returns
[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
折线图元对象
FILE:references/classes/IPCB_PrimitivePour.md
# IPCB\_PrimitivePour class
覆铜边框图元
## Signature
```typescript
declare class IPCB_PrimitivePour implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertToFill()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:填充图元(默认是填充区域)
</td></tr>
<tr><td>
[convertToPolyline()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:折线图元(默认是线条)
</td></tr>
<tr><td>
[convertToRegion()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:区域图元(默认是禁止区域)
</td></tr>
<tr><td>
[done()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_ComplexPolygon()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:复杂多边形
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PourFillMethod()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:覆铜填充方法
</td></tr>
<tr><td>
[getState\_PourName()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:覆铜边框名称
</td></tr>
<tr><td>
[getState\_PourPriority()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:覆铜优先级
</td></tr>
<tr><td>
[getState\_PreserveSilos()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:是否保留孤岛
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_ComplexPolygon(complexPolygon)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:复杂多边形
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_PourFillMethod(pourFillMethod)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:覆铜填充方法
</td></tr>
<tr><td>
[setState\_PourName(pourName)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:覆铜边框名称
</td></tr>
<tr><td>
[setState\_PourPriority(pourPriority)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:覆铜优先级
</td></tr>
<tr><td>
[setState\_PreserveSilos(preserveSilos)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否保留孤岛
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitivePour.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### converttofill
# IPCB\_PrimitivePour.convertToFill() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:填充图元(默认是填充区域)
## Signature
```typescript
convertToFill(): Promise<IPCB_PrimitiveFill>;
```
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
填充图元对象
### converttopolyline
# IPCB\_PrimitivePour.convertToPolyline() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:折线图元(默认是线条)
## Signature
```typescript
convertToPolyline(): Promise<IPCB_PrimitivePolyline>;
```
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
折线图元对象
### converttoregion
# IPCB\_PrimitivePour.convertToRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:区域图元(默认是禁止区域)
## Signature
```typescript
convertToRegion(): Promise<IPCB_PrimitiveRegion>;
```
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
区域图元对象
### done
# IPCB\_PrimitivePour.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitivePour>;
```
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
覆铜边框图元对象
### getstate_complexpolygon
# IPCB\_PrimitivePour.getState\_ComplexPolygon() method
获取属性状态:复杂多边形
## Signature
```typescript
getState_ComplexPolygon(): IPCB_Polygon;
```
## Returns
[IPCB\_Polygon](./IPCB_Polygon.md)
复杂多边形
### getstate_layer
# IPCB\_PrimitivePour.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfCopper;
```
## Returns
[TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)
层
### getstate_linewidth
# IPCB\_PrimitivePour.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_net
# IPCB\_PrimitivePour.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_pourfillmethod
# IPCB\_PrimitivePour.getState\_PourFillMethod() method
获取属性状态:覆铜填充方法
## Signature
```typescript
getState_PourFillMethod(): any;
```
## Returns
any
覆铜填充方法
### getstate_pourname
# IPCB\_PrimitivePour.getState\_PourName() method
获取属性状态:覆铜边框名称
## Signature
```typescript
getState_PourName(): string;
```
## Returns
string
覆铜边框名称
### getstate_pourpriority
# IPCB\_PrimitivePour.getState\_PourPriority() method
获取属性状态:覆铜优先级
## Signature
```typescript
getState_PourPriority(): number;
```
## Returns
number
覆铜优先级
### getstate_preservesilos
# IPCB\_PrimitivePour.getState\_PreserveSilos() method
获取属性状态:是否保留孤岛
## Signature
```typescript
getState_PreserveSilos(): boolean;
```
## Returns
boolean
是否保留孤岛
### getstate_primitiveid
# IPCB\_PrimitivePour.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitivePour.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitivePour.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### isasync
# IPCB\_PrimitivePour.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitivePour.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitivePour>;
```
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
覆铜边框图元对象
### setstate_complexpolygon
# IPCB\_PrimitivePour.setState\_ComplexPolygon() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:复杂多边形
## Signature
```typescript
setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_layer
# IPCB\_PrimitivePour.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfCopper): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_linewidth
# IPCB\_PrimitivePour.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_net
# IPCB\_PrimitivePour.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_pourfillmethod
# IPCB\_PrimitivePour.setState\_PourFillMethod() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:覆铜填充方法
## Signature
```typescript
setState_PourFillMethod(pourFillMethod: EPCB_PrimitivePourFillMethod): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourFillMethod
</td><td>
[EPCB\_PrimitivePourFillMethod](../enums/EPCB_PrimitivePourFillMethod.md)
</td><td>
覆铜填充方法
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_pourname
# IPCB\_PrimitivePour.setState\_PourName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:覆铜边框名称
## Signature
```typescript
setState_PourName(pourName: string): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourName
</td><td>
string
</td><td>
覆铜边框名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_pourpriority
# IPCB\_PrimitivePour.setState\_PourPriority() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:覆铜优先级
## Signature
```typescript
setState_PourPriority(pourPriority: number): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourPriority
</td><td>
number
</td><td>
覆铜优先级
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_preservesilos
# IPCB\_PrimitivePour.setState\_PreserveSilos() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否保留孤岛
## Signature
```typescript
setState_PreserveSilos(preserveSilos: boolean): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
preserveSilos
</td><td>
boolean
</td><td>
是否保留孤岛
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### setstate_primitivelock
# IPCB\_PrimitivePour.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitivePour;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### toasync
# IPCB\_PrimitivePour.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitivePour;
```
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
### tosync
# IPCB\_PrimitivePour.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitivePour;
```
## Returns
[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
覆铜边框图元对象
FILE:references/classes/IPCB_PrimitivePoured.md
# IPCB\_PrimitivePoured class
覆铜填充图元
## Signature
```typescript
declare class IPCB_PrimitivePoured implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addSolderMaskFill(pourFillId)](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 添加:阻焊区域
</td></tr>
<tr><td>
[convertToFill(pourFillId)](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:填充图元
</td></tr>
<tr><td>
[deletePourFills(pourFillIds)](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 删除覆铜填充区域
</td></tr>
<tr><td>
[getState\_PourFills()](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
获取属性状态:覆铜填充区域
</td></tr>
<tr><td>
[getState\_PourPrimitiveId()](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
获取属性状态:覆铜边框图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitivePoured.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
</tbody></table>
---
## 方法详情
### addsoldermaskfill
# IPCB\_PrimitivePoured.addSolderMaskFill() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
添加:阻焊区域
## Signature
```typescript
addSolderMaskFill(pourFillId: IPCB_PrimitivePouredPourFill['id']): Promise<IPCB_PrimitiveFill | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourFillId
</td><td>
[IPCB\_PrimitivePouredPourFill](../interfaces/IPCB_PrimitivePouredPourFill.md)<!-- -->\['id'\]
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| undefined>
阻焊区域填充图元对象,无法转换或 ID 错误将返回 `undefined`
### converttofill
# IPCB\_PrimitivePoured.convertToFill() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:填充图元
## Signature
```typescript
convertToFill(pourFillId: IPCB_PrimitivePouredPourFill['id']): Promise<IPCB_PrimitiveFill | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourFillId
</td><td>
[IPCB\_PrimitivePouredPourFill](../interfaces/IPCB_PrimitivePouredPourFill.md)<!-- -->\['id'\]
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| undefined>
填充图元对象,无法转换或 ID 错误将返回 `undefined`
### deletepourfills
# IPCB\_PrimitivePoured.deletePourFills() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除覆铜填充区域
## Signature
```typescript
deletePourFills(pourFillIds: IPCB_PrimitivePouredPourFill['id'] | Array<IPCB_PrimitivePouredPourFill['id']>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pourFillIds
</td><td>
[IPCB\_PrimitivePouredPourFill](../interfaces/IPCB_PrimitivePouredPourFill.md)<!-- -->\['id'\] \| Array<[IPCB\_PrimitivePouredPourFill](../interfaces/IPCB_PrimitivePouredPourFill.md)<!-- -->\['id'\]>
</td><td>
覆铜填充区域 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### getstate_pourfills
# IPCB\_PrimitivePoured.getState\_PourFills() method
获取属性状态:覆铜填充区域
## Signature
```typescript
getState_PourFills(): Array<IPCB_PrimitivePouredPourFill>;
```
## Returns
Array<[IPCB\_PrimitivePouredPourFill](../interfaces/IPCB_PrimitivePouredPourFill.md)<!-- -->>
覆铜填充区域
### getstate_pourprimitiveid
# IPCB\_PrimitivePoured.getState\_PourPrimitiveId() method
获取属性状态:覆铜边框图元 ID
## Signature
```typescript
getState_PourPrimitiveId(): string;
```
## Returns
string
覆铜边框图元 ID
### getstate_primitiveid
# IPCB\_PrimitivePoured.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# IPCB\_PrimitivePoured.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
FILE:references/classes/IPCB_PrimitiveRegion.md
# IPCB\_PrimitiveRegion class
区域图元
## Signature
```typescript
declare class IPCB_PrimitiveRegion implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertToFill()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:填充图元
</td></tr>
<tr><td>
[convertToPolyline()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:折线图元
</td></tr>
<tr><td>
[convertToPour()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 转换到:覆铜边框图元
</td></tr>
<tr><td>
[done()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_ComplexPolygon()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:复杂多边形
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_RegionName()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:区域名称
</td></tr>
<tr><td>
[getState\_RuleType()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
获取属性状态:区域规则类型
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_ComplexPolygon(complexPolygon)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:复杂多边形
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_RegionName(regionName)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:区域名称
</td></tr>
<tr><td>
[setState\_RuleType(ruleType)](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:区域规则类型
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveRegion.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### converttofill
# IPCB\_PrimitiveRegion.convertToFill() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:填充图元
## Signature
```typescript
convertToFill(): Promise<IPCB_PrimitiveFill>;
```
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
填充图元对象
### converttopolyline
# IPCB\_PrimitiveRegion.convertToPolyline() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:折线图元
## Signature
```typescript
convertToPolyline(): Promise<IPCB_PrimitivePolyline>;
```
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
折线图元对象
### converttopour
# IPCB\_PrimitiveRegion.convertToPour() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换到:覆铜边框图元
## Signature
```typescript
convertToPour(): Promise<IPCB_PrimitivePour>;
```
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
覆铜边框图元对象
### done
# IPCB\_PrimitiveRegion.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveRegion>;
```
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
区域图元对象
### getstate_complexpolygon
# IPCB\_PrimitiveRegion.getState\_ComplexPolygon() method
获取属性状态:复杂多边形
## Signature
```typescript
getState_ComplexPolygon(): IPCB_Polygon;
```
## Returns
[IPCB\_Polygon](./IPCB_Polygon.md)
复杂多边形
### getstate_layer
# IPCB\_PrimitiveRegion.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfRegion;
```
## Returns
[TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)
层
### getstate_linewidth
# IPCB\_PrimitiveRegion.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_primitiveid
# IPCB\_PrimitiveRegion.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveRegion.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveRegion.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_regionname
# IPCB\_PrimitiveRegion.getState\_RegionName() method
获取属性状态:区域名称
## Signature
```typescript
getState_RegionName(): string | undefined;
```
## Returns
string \| undefined
区域名称
### getstate_ruletype
# IPCB\_PrimitiveRegion.getState\_RuleType() method
获取属性状态:区域规则类型
## Signature
```typescript
getState_RuleType(): Array<EPCB_PrimitiveRegionRuleType>;
```
## Returns
Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>
区域规则类型
### isasync
# IPCB\_PrimitiveRegion.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveRegion.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveRegion>;
```
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
区域图元对象
### setstate_complexpolygon
# IPCB\_PrimitiveRegion.setState\_ComplexPolygon() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:复杂多边形
## Signature
```typescript
setState_ComplexPolygon(complexPolygon: IPCB_Polygon): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### setstate_layer
# IPCB\_PrimitiveRegion.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfRegion): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### setstate_linewidth
# IPCB\_PrimitiveRegion.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### setstate_primitivelock
# IPCB\_PrimitiveRegion.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### setstate_regionname
# IPCB\_PrimitiveRegion.setState\_RegionName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:区域名称
## Signature
```typescript
setState_RegionName(regionName?: string): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
regionName
</td><td>
string
</td><td>
_(Optional)_ 区域名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
## Remarks
仅当 `ruleType` 为 [EPCB\_PrimitiveRegionRuleType.FOLLOW\_REGION\_RULE](../enums/EPCB_PrimitiveRegionRuleType.md) 时有效,用于匹配区域 DRC 规则
如若 `ruleType` 为 [EPCB\_PrimitiveRegionRuleType.FOLLOW\_REGION\_RULE](../enums/EPCB_PrimitiveRegionRuleType.md) 但 `regionName` 为空,则系统将会自动分配名称
### setstate_ruletype
# IPCB\_PrimitiveRegion.setState\_RuleType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:区域规则类型
## Signature
```typescript
setState_RuleType(ruleType: Array<EPCB_PrimitiveRegionRuleType>): IPCB_PrimitiveRegion;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ruleType
</td><td>
Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>
</td><td>
区域规则类型
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### toasync
# IPCB\_PrimitiveRegion.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveRegion;
```
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
### tosync
# IPCB\_PrimitiveRegion.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveRegion;
```
## Returns
[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
区域图元对象
FILE:references/classes/IPCB_PrimitiveString.md
# IPCB\_PrimitiveString class
文本图元
## Signature
```typescript
declare class IPCB_PrimitiveString implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[(constructor)(layer, x, y, text, fontFamily, fontSize, lineWidth, alignMode, rotation, reverse, expansion, mirror, primitiveLock, primitiveId)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
Constructs a new instance of the `IPCB_PrimitiveString` class
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getState\_AlignMode()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:对齐模式
</td></tr>
<tr><td>
[getState\_Expansion()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:反相扩展
</td></tr>
<tr><td>
[getState\_FontFamily()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:字体
</td></tr>
<tr><td>
[getState\_FontSize()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:字号
</td></tr>
<tr><td>
[getState\_Layer()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:层
</td></tr>
<tr><td>
[getState\_LineWidth()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Mirror()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:是否镜像
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Reverse()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:是否反相
</td></tr>
<tr><td>
[getState\_Rotation()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_Text()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:文本内容
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[setState\_AlignMode(alignMode)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:对齐模式
</td></tr>
<tr><td>
[setState\_Expansion(expansion)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:反相扩展
</td></tr>
<tr><td>
[setState\_FontFamily(fontFamily)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体
</td></tr>
<tr><td>
[setState\_FontSize(fontSize)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字号
</td></tr>
<tr><td>
[setState\_Layer(layer)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:层
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Mirror(mirror)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否镜像
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_Reverse(reverse)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否反相
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_Text(text)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:文本内容
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveString.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 构造函数详情
### _constructor_
# IPCB\_PrimitiveString.(constructor)
Constructs a new instance of the `IPCB_PrimitiveString` class
## Signature
```typescript
constructor(layer: TPCB_LayersOfImage, x: number, y: number, text: string, fontFamily?: string, fontSize?: number, lineWidth?: number, alignMode?: EPCB_PrimitiveStringAlignMode, rotation?: number, reverse?: boolean, expansion?: number, mirror?: boolean, primitiveLock?: boolean, primitiveId?: string);
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
</td></tr>
<tr><td>
text
</td><td>
string
</td><td>
</td></tr>
<tr><td>
fontFamily
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
<tr><td>
fontSize
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
alignMode
</td><td>
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
</td><td>
_(Optional)_
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
reverse
</td><td>
boolean
</td><td>
_(Optional)_
</td></tr>
<tr><td>
expansion
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_
</td></tr>
<tr><td>
primitiveId
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
---
## 方法详情
### getstate_alignmode
# IPCB\_PrimitiveString.getState\_AlignMode() method
获取属性状态:对齐模式
## Signature
```typescript
getState_AlignMode(): EPCB_PrimitiveStringAlignMode;
```
## Returns
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
对齐模式
### getstate_expansion
# IPCB\_PrimitiveString.getState\_Expansion() method
获取属性状态:反相扩展
## Signature
```typescript
getState_Expansion(): number;
```
## Returns
number
反相扩展
### getstate_fontfamily
# IPCB\_PrimitiveString.getState\_FontFamily() method
获取属性状态:字体
## Signature
```typescript
getState_FontFamily(): string;
```
## Returns
string
字体
### getstate_fontsize
# IPCB\_PrimitiveString.getState\_FontSize() method
获取属性状态:字号
## Signature
```typescript
getState_FontSize(): number;
```
## Returns
number
字号
### getstate_layer
# IPCB\_PrimitiveString.getState\_Layer() method
获取属性状态:层
## Signature
```typescript
getState_Layer(): TPCB_LayersOfImage;
```
## Returns
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
层
### getstate_linewidth
# IPCB\_PrimitiveString.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number;
```
## Returns
number
线宽
### getstate_mirror
# IPCB\_PrimitiveString.getState\_Mirror() method
获取属性状态:是否镜像
## Signature
```typescript
getState_Mirror(): boolean;
```
## Returns
boolean
是否镜像
### getstate_primitiveid
# IPCB\_PrimitiveString.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveString.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveString.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_reverse
# IPCB\_PrimitiveString.getState\_Reverse() method
获取属性状态:是否反相
## Signature
```typescript
getState_Reverse(): boolean;
```
## Returns
boolean
是否反相
### getstate_rotation
# IPCB\_PrimitiveString.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_text
# IPCB\_PrimitiveString.getState\_Text() method
获取属性状态:文本内容
## Signature
```typescript
getState_Text(): string;
```
## Returns
string
文本内容
### getstate_x
# IPCB\_PrimitiveString.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# IPCB\_PrimitiveString.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# IPCB\_PrimitiveString.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### setstate_alignmode
# IPCB\_PrimitiveString.setState\_AlignMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:对齐模式
## Signature
```typescript
setState_AlignMode(alignMode: EPCB_PrimitiveStringAlignMode): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
alignMode
</td><td>
[EPCB\_PrimitiveStringAlignMode](../enums/EPCB_PrimitiveStringAlignMode.md)
</td><td>
对齐模式
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_expansion
# IPCB\_PrimitiveString.setState\_Expansion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:反相扩展
## Signature
```typescript
setState_Expansion(expansion: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
expansion
</td><td>
number
</td><td>
反相扩展
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_fontfamily
# IPCB\_PrimitiveString.setState\_FontFamily() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体
## Signature
```typescript
setState_FontFamily(fontFamily: string): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontFamily
</td><td>
string
</td><td>
字体
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_fontsize
# IPCB\_PrimitiveString.setState\_FontSize() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字号
## Signature
```typescript
setState_FontSize(fontSize: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontSize
</td><td>
number
</td><td>
字号
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_layer
# IPCB\_PrimitiveString.setState\_Layer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:层
## Signature
```typescript
setState_Layer(layer: TPCB_LayersOfImage): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_linewidth
# IPCB\_PrimitiveString.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_mirror
# IPCB\_PrimitiveString.setState\_Mirror() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否镜像
## Signature
```typescript
setState_Mirror(mirror: boolean): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mirror
</td><td>
boolean
</td><td>
是否镜像
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_primitivelock
# IPCB\_PrimitiveString.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_reverse
# IPCB\_PrimitiveString.setState\_Reverse() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否反相
## Signature
```typescript
setState_Reverse(reverse: boolean): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
reverse
</td><td>
boolean
</td><td>
是否反相
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_rotation
# IPCB\_PrimitiveString.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_text
# IPCB\_PrimitiveString.setState\_Text() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:文本内容
## Signature
```typescript
setState_Text(text: string): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
text
</td><td>
string
</td><td>
文本内容
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_x
# IPCB\_PrimitiveString.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### setstate_y
# IPCB\_PrimitiveString.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitiveString;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### toasync
# IPCB\_PrimitiveString.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveString;
```
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
### tosync
# IPCB\_PrimitiveString.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveString;
```
## Returns
[IPCB\_PrimitiveString](./IPCB_PrimitiveString.md)
文本图元对象
FILE:references/classes/IPCB_PrimitiveVia.md
# IPCB\_PrimitiveVia class
过孔图元
## Signature
```typescript
declare class IPCB_PrimitiveVia implements IPCB_Primitive
```
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getAdjacentPrimitives()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 获取相邻的图元对象
</td></tr>
<tr><td>
[getState\_DesignRuleBlindViaName()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:盲埋孔设计规则项名称
</td></tr>
<tr><td>
[getState\_Diameter()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:外径
</td></tr>
<tr><td>
[getState\_HoleDiameter()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:孔径
</td></tr>
<tr><td>
[getState\_Net()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveLock()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:是否锁定
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_SolderMaskExpansion()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:阻焊/助焊扩展
</td></tr>
<tr><td>
[getState\_ViaType()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:过孔类型
</td></tr>
<tr><td>
[getState\_X()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_DesignRuleBlindViaName(designRuleBlindViaName)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:盲埋孔设计规则项名称
</td></tr>
<tr><td>
[setState\_Diameter(diameter)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:外径
</td></tr>
<tr><td>
[setState\_HoleDiameter(holeDiameter)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:孔径
</td></tr>
<tr><td>
[setState\_Net(net)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否锁定
</td></tr>
<tr><td>
[setState\_SolderMaskExpansion(solderMaskExpansion)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:阻焊/助焊扩展
</td></tr>
<tr><td>
[setState\_ViaType(viaType)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:过孔类型
</td></tr>
<tr><td>
[setState\_X(x)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./IPCB_PrimitiveVia.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# IPCB\_PrimitiveVia.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<IPCB_PrimitiveVia>;
```
## Returns
Promise<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>
过孔图元对象
### getadjacentprimitives
# IPCB\_PrimitiveVia.getAdjacentPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取相邻的图元对象
## Signature
```typescript
getAdjacentPrimitives(): Promise<Array<IPCB_PrimitiveLine | IPCB_PrimitiveArc>>;
```
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
相邻的导线、圆弧线图元对象
## Remarks
将会获取与过孔直接相连的导线、圆弧线图元对象
### getstate_designruleblindvianame
# IPCB\_PrimitiveVia.getState\_DesignRuleBlindViaName() method
获取属性状态:盲埋孔设计规则项名称
## Signature
```typescript
getState_DesignRuleBlindViaName(): string | null;
```
## Returns
string \| null
盲埋孔设计规则项名称
### getstate_diameter
# IPCB\_PrimitiveVia.getState\_Diameter() method
获取属性状态:外径
## Signature
```typescript
getState_Diameter(): number;
```
## Returns
number
外径
### getstate_holediameter
# IPCB\_PrimitiveVia.getState\_HoleDiameter() method
获取属性状态:孔径
## Signature
```typescript
getState_HoleDiameter(): number;
```
## Returns
number
孔径
### getstate_net
# IPCB\_PrimitiveVia.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_primitiveid
# IPCB\_PrimitiveVia.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivelock
# IPCB\_PrimitiveVia.getState\_PrimitiveLock() method
获取属性状态:是否锁定
## Signature
```typescript
getState_PrimitiveLock(): boolean;
```
## Returns
boolean
是否锁定
### getstate_primitivetype
# IPCB\_PrimitiveVia.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): EPCB_PrimitiveType;
```
## Returns
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
图元类型
### getstate_soldermaskexpansion
# IPCB\_PrimitiveVia.getState\_SolderMaskExpansion() method
获取属性状态:阻焊/助焊扩展
## Signature
```typescript
getState_SolderMaskExpansion(): IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
```
## Returns
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
阻焊/助焊扩展
### getstate_viatype
# IPCB\_PrimitiveVia.getState\_ViaType() method
获取属性状态:过孔类型
## Signature
```typescript
getState_ViaType(): EPCB_PrimitiveViaType;
```
## Returns
[EPCB\_PrimitiveViaType](../enums/EPCB_PrimitiveViaType.md)
过孔类型
### getstate_x
# IPCB\_PrimitiveVia.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# IPCB\_PrimitiveVia.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# IPCB\_PrimitiveVia.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# IPCB\_PrimitiveVia.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<IPCB_PrimitiveVia>;
```
## Returns
Promise<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>
过孔图元对象
### setstate_designruleblindvianame
# IPCB\_PrimitiveVia.setState\_DesignRuleBlindViaName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:盲埋孔设计规则项名称
## Signature
```typescript
setState_DesignRuleBlindViaName(designRuleBlindViaName: string | null): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
designRuleBlindViaName
</td><td>
string \| null
</td><td>
盲埋孔设计规则项名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_diameter
# IPCB\_PrimitiveVia.setState\_Diameter() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:外径
## Signature
```typescript
setState_Diameter(diameter: number): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
diameter
</td><td>
number
</td><td>
外径
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_holediameter
# IPCB\_PrimitiveVia.setState\_HoleDiameter() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:孔径
## Signature
```typescript
setState_HoleDiameter(holeDiameter: number): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
holeDiameter
</td><td>
number
</td><td>
孔径
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_net
# IPCB\_PrimitiveVia.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_primitivelock
# IPCB\_PrimitiveVia.setState\_PrimitiveLock() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否锁定
## Signature
```typescript
setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveLock
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_soldermaskexpansion
# IPCB\_PrimitiveVia.setState\_SolderMaskExpansion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:阻焊/助焊扩展
## Signature
```typescript
setState_SolderMaskExpansion(solderMaskExpansion: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
solderMaskExpansion
</td><td>
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
</td><td>
阻焊/助焊扩展
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_viatype
# IPCB\_PrimitiveVia.setState\_ViaType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:过孔类型
## Signature
```typescript
setState_ViaType(viaType: EPCB_PrimitiveViaType): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
viaType
</td><td>
[EPCB\_PrimitiveViaType](../enums/EPCB_PrimitiveViaType.md)
</td><td>
过孔类型
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_x
# IPCB\_PrimitiveVia.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### setstate_y
# IPCB\_PrimitiveVia.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): IPCB_PrimitiveVia;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### toasync
# IPCB\_PrimitiveVia.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): IPCB_PrimitiveVia;
```
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
### tosync
# IPCB\_PrimitiveVia.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): IPCB_PrimitiveVia;
```
## Returns
[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
过孔图元对象
FILE:references/classes/ISCH_PrimitiveArc.md
# ISCH\_PrimitiveArc class
圆弧图元
## Signature
```typescript
declare class ISCH_PrimitiveArc implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:颜色
</td></tr>
<tr><td>
[getState\_EndX()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:终止点 X
</td></tr>
<tr><td>
[getState\_EndY()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:终止点 Y
</td></tr>
<tr><td>
[getState\_FillColor()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:填充颜色
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_ReferenceX()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:参考点 X
</td></tr>
<tr><td>
[getState\_ReferenceY()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:参考点 Y
</td></tr>
<tr><td>
[getState\_StartX()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:起始点 X
</td></tr>
<tr><td>
[getState\_StartY()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
获取属性状态:起始点 Y
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:颜色
</td></tr>
<tr><td>
[setState\_EndX(endX)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止点 X
</td></tr>
<tr><td>
[setState\_EndY(endY)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:终止点 Y
</td></tr>
<tr><td>
[setState\_FillColor(fillColor)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充颜色
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_ReferenceX(referenceX)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:参考点 X
</td></tr>
<tr><td>
[setState\_ReferenceY(referenceY)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:参考点 Y
</td></tr>
<tr><td>
[setState\_StartX(startX)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始点 X
</td></tr>
<tr><td>
[setState\_StartY(startY)](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:起始点 Y
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveArc.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveArc.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveArc>;
```
## Returns
Promise<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)<!-- -->>
圆弧图元对象
### getstate_color
# ISCH\_PrimitiveArc.getState\_Color() method
获取属性状态:颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
颜色
### getstate_endx
# ISCH\_PrimitiveArc.getState\_EndX() method
获取属性状态:终止点 X
## Signature
```typescript
getState_EndX(): number;
```
## Returns
number
终止点 X
### getstate_endy
# ISCH\_PrimitiveArc.getState\_EndY() method
获取属性状态:终止点 Y
## Signature
```typescript
getState_EndY(): number;
```
## Returns
number
终止点 Y
### getstate_fillcolor
# ISCH\_PrimitiveArc.getState\_FillColor() method
获取属性状态:填充颜色
## Signature
```typescript
getState_FillColor(): string | null;
```
## Returns
string \| null
填充颜色
### getstate_linetype
# ISCH\_PrimitiveArc.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitiveArc.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_primitiveid
# ISCH\_PrimitiveArc.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveArc.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_referencex
# ISCH\_PrimitiveArc.getState\_ReferenceX() method
获取属性状态:参考点 X
## Signature
```typescript
getState_ReferenceX(): number;
```
## Returns
number
参考点 X
### getstate_referencey
# ISCH\_PrimitiveArc.getState\_ReferenceY() method
获取属性状态:参考点 Y
## Signature
```typescript
getState_ReferenceY(): number;
```
## Returns
number
参考点 Y
### getstate_startx
# ISCH\_PrimitiveArc.getState\_StartX() method
获取属性状态:起始点 X
## Signature
```typescript
getState_StartX(): number;
```
## Returns
number
起始点 X
### getstate_starty
# ISCH\_PrimitiveArc.getState\_StartY() method
获取属性状态:起始点 Y
## Signature
```typescript
getState_StartY(): number;
```
## Returns
number
起始点 Y
### isasync
# ISCH\_PrimitiveArc.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveArc.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveArc>;
```
## Returns
Promise<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)<!-- -->>
圆弧图元对象
### setstate_color
# ISCH\_PrimitiveArc.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_endx
# ISCH\_PrimitiveArc.setState\_EndX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止点 X
## Signature
```typescript
setState_EndX(endX: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endX
</td><td>
number
</td><td>
终止点 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_endy
# ISCH\_PrimitiveArc.setState\_EndY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:终止点 Y
## Signature
```typescript
setState_EndY(endY: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
endY
</td><td>
number
</td><td>
终止点 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_fillcolor
# ISCH\_PrimitiveArc.setState\_FillColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充颜色
## Signature
```typescript
setState_FillColor(fillColor: string | null): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillColor
</td><td>
string \| null
</td><td>
填充颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_linetype
# ISCH\_PrimitiveArc.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_linewidth
# ISCH\_PrimitiveArc.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_referencex
# ISCH\_PrimitiveArc.setState\_ReferenceX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:参考点 X
## Signature
```typescript
setState_ReferenceX(referenceX: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
referenceX
</td><td>
number
</td><td>
参考点 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_referencey
# ISCH\_PrimitiveArc.setState\_ReferenceY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:参考点 Y
## Signature
```typescript
setState_ReferenceY(referenceY: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
referenceY
</td><td>
number
</td><td>
参考点 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_startx
# ISCH\_PrimitiveArc.setState\_StartX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始点 X
## Signature
```typescript
setState_StartX(startX: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startX
</td><td>
number
</td><td>
起始点 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### setstate_starty
# ISCH\_PrimitiveArc.setState\_StartY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:起始点 Y
## Signature
```typescript
setState_StartY(startY: number): ISCH_PrimitiveArc;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startY
</td><td>
number
</td><td>
起始点 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### toasync
# ISCH\_PrimitiveArc.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveArc;
```
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
### tosync
# ISCH\_PrimitiveArc.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveArc;
```
## Returns
[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
圆弧图元对象
FILE:references/classes/ISCH_PrimitiveAttribute.md
# ISCH\_PrimitiveAttribute class
属性图元
## Signature
```typescript
declare class ISCH_PrimitiveAttribute implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_AlignMode()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:对齐模式
</td></tr>
<tr><td>
[getState\_Bold()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否加粗
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:文本颜色
</td></tr>
<tr><td>
[getState\_FillColor()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:填充颜色
</td></tr>
<tr><td>
[getState\_FontName()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:字体名称
</td></tr>
<tr><td>
[getState\_FontSize()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:字体大小
</td></tr>
<tr><td>
[getState\_Italic()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否斜体
</td></tr>
<tr><td>
[getState\_Key()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:键
</td></tr>
<tr><td>
[getState\_KeyVisible()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:键是否显示
</td></tr>
<tr><td>
[getState\_ParentPrimitiveId()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:父图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_UnderLine()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:是否加下划线
</td></tr>
<tr><td>
[getState\_Value()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:值
</td></tr>
<tr><td>
[getState\_ValueVisible()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:值是否显示
</td></tr>
<tr><td>
[getState\_X()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_AlignMode(alignMode)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:对齐模式
</td></tr>
<tr><td>
[setState\_Bold(bold)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加粗
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:文本颜色
</td></tr>
<tr><td>
[setState\_FillColor(fillColor)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充颜色
</td></tr>
<tr><td>
[setState\_FontName(fontName)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体名称
</td></tr>
<tr><td>
[setState\_FontSize(fontSize)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体大小
</td></tr>
<tr><td>
[setState\_Italic(italic)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否斜体
</td></tr>
<tr><td>
[setState\_Key(key)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:键
</td></tr>
<tr><td>
[setState\_KeyVisible(keyVisible)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:键是否显示
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_UnderLine(underLine)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加下划线
</td></tr>
<tr><td>
[setState\_Value(value)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:值
</td></tr>
<tr><td>
[setState\_ValueVisible(valueVisible)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:值是否显示
</td></tr>
<tr><td>
[setState\_X(x)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveAttribute.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveAttribute.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveAttribute>;
```
## Returns
Promise<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)<!-- -->>
属性图元对象
### getstate_alignmode
# ISCH\_PrimitiveAttribute.getState\_AlignMode() method
获取属性状态:对齐模式
## Signature
```typescript
getState_AlignMode(): ESCH_PrimitiveTextAlignMode | null;
```
## Returns
[ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md) \| null
对齐模式
### getstate_bold
# ISCH\_PrimitiveAttribute.getState\_Bold() method
获取属性状态:是否加粗
## Signature
```typescript
getState_Bold(): boolean | null;
```
## Returns
boolean \| null
是否加粗
### getstate_color
# ISCH\_PrimitiveAttribute.getState\_Color() method
获取属性状态:文本颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
文本颜色
### getstate_fillcolor
# ISCH\_PrimitiveAttribute.getState\_FillColor() method
获取属性状态:填充颜色
## Signature
```typescript
getState_FillColor(): string | null;
```
## Returns
string \| null
填充颜色
### getstate_fontname
# ISCH\_PrimitiveAttribute.getState\_FontName() method
获取属性状态:字体名称
## Signature
```typescript
getState_FontName(): string | null;
```
## Returns
string \| null
字体名称
### getstate_fontsize
# ISCH\_PrimitiveAttribute.getState\_FontSize() method
获取属性状态:字体大小
## Signature
```typescript
getState_FontSize(): number | null;
```
## Returns
number \| null
字体大小
### getstate_italic
# ISCH\_PrimitiveAttribute.getState\_Italic() method
获取属性状态:是否斜体
## Signature
```typescript
getState_Italic(): boolean | null;
```
## Returns
boolean \| null
是否斜体
### getstate_key
# ISCH\_PrimitiveAttribute.getState\_Key() method
获取属性状态:键
## Signature
```typescript
getState_Key(): string;
```
## Returns
string
键
### getstate_keyvisible
# ISCH\_PrimitiveAttribute.getState\_KeyVisible() method
获取属性状态:键是否显示
## Signature
```typescript
getState_KeyVisible(): boolean | null;
```
## Returns
boolean \| null
键是否显示
### getstate_parentprimitiveid
# ISCH\_PrimitiveAttribute.getState\_ParentPrimitiveId() method
获取属性状态:父图元 ID
## Signature
```typescript
getState_ParentPrimitiveId(): string;
```
## Returns
string
父图元 ID
### getstate_primitiveid
# ISCH\_PrimitiveAttribute.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveAttribute.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_rotation
# ISCH\_PrimitiveAttribute.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number | null;
```
## Returns
number \| null
旋转角度
### getstate_underline
# ISCH\_PrimitiveAttribute.getState\_UnderLine() method
获取属性状态:是否加下划线
## Signature
```typescript
getState_UnderLine(): boolean | null;
```
## Returns
boolean \| null
是否加下划线
### getstate_value
# ISCH\_PrimitiveAttribute.getState\_Value() method
获取属性状态:值
## Signature
```typescript
getState_Value(): string;
```
## Returns
string
值
### getstate_valuevisible
# ISCH\_PrimitiveAttribute.getState\_ValueVisible() method
获取属性状态:值是否显示
## Signature
```typescript
getState_ValueVisible(): boolean | null;
```
## Returns
boolean \| null
值是否显示
### getstate_x
# ISCH\_PrimitiveAttribute.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number | null;
```
## Returns
number \| null
坐标 X
### getstate_y
# ISCH\_PrimitiveAttribute.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number | null;
```
## Returns
number \| null
坐标 Y
### isasync
# ISCH\_PrimitiveAttribute.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveAttribute.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveAttribute>;
```
## Returns
Promise<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)<!-- -->>
属性图元对象
### setstate_alignmode
# ISCH\_PrimitiveAttribute.setState\_AlignMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:对齐模式
## Signature
```typescript
setState_AlignMode(alignMode: ESCH_PrimitiveTextAlignMode | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
alignMode
</td><td>
[ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md) \| null
</td><td>
对齐模式
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_bold
# ISCH\_PrimitiveAttribute.setState\_Bold() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加粗
## Signature
```typescript
setState_Bold(bold: boolean | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
bold
</td><td>
boolean \| null
</td><td>
是否加粗
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_color
# ISCH\_PrimitiveAttribute.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:文本颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_fillcolor
# ISCH\_PrimitiveAttribute.setState\_FillColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充颜色
## Signature
```typescript
setState_FillColor(fillColor: string | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillColor
</td><td>
string \| null
</td><td>
填充颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_fontname
# ISCH\_PrimitiveAttribute.setState\_FontName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体名称
## Signature
```typescript
setState_FontName(fontName: string | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontName
</td><td>
string \| null
</td><td>
字体名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_fontsize
# ISCH\_PrimitiveAttribute.setState\_FontSize() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体大小
## Signature
```typescript
setState_FontSize(fontSize: number | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontSize
</td><td>
number \| null
</td><td>
字体大小
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_italic
# ISCH\_PrimitiveAttribute.setState\_Italic() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否斜体
## Signature
```typescript
setState_Italic(italic: boolean | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
italic
</td><td>
boolean \| null
</td><td>
是否斜体
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_key
# ISCH\_PrimitiveAttribute.setState\_Key() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:键
## Signature
```typescript
setState_Key(key: string): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
键
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_keyvisible
# ISCH\_PrimitiveAttribute.setState\_KeyVisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:键是否显示
## Signature
```typescript
setState_KeyVisible(keyVisible: boolean | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
keyVisible
</td><td>
boolean \| null
</td><td>
键是否显示
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_rotation
# ISCH\_PrimitiveAttribute.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number \| null
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_underline
# ISCH\_PrimitiveAttribute.setState\_UnderLine() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加下划线
## Signature
```typescript
setState_UnderLine(underLine: boolean | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
underLine
</td><td>
boolean \| null
</td><td>
是否加下划线
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_value
# ISCH\_PrimitiveAttribute.setState\_Value() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:值
## Signature
```typescript
setState_Value(value: string): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
value
</td><td>
string
</td><td>
值
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_valuevisible
# ISCH\_PrimitiveAttribute.setState\_ValueVisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:值是否显示
## Signature
```typescript
setState_ValueVisible(valueVisible: boolean | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
valueVisible
</td><td>
boolean \| null
</td><td>
值是否显示
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_x
# ISCH\_PrimitiveAttribute.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number \| null
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### setstate_y
# ISCH\_PrimitiveAttribute.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number | null): ISCH_PrimitiveAttribute;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number \| null
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### toasync
# ISCH\_PrimitiveAttribute.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveAttribute;
```
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
### tosync
# ISCH\_PrimitiveAttribute.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveAttribute;
```
## Returns
[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
属性图元对象
FILE:references/classes/ISCH_PrimitiveBus.md
# ISCH\_PrimitiveBus class
总线图元
## Signature
```typescript
declare class ISCH_PrimitiveBus implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_BusName()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:总线名称
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:总线颜色
</td></tr>
<tr><td>
[getState\_Line()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:多段线坐标组
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[setState\_BusName(busName)](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:总线名称
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:总线颜色
</td></tr>
<tr><td>
[setState\_Line(line)](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:多段线坐标组
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveBus.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveBus.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveBus>;
```
## Returns
Promise<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)<!-- -->>
总线图元对象
### getstate_busname
# ISCH\_PrimitiveBus.getState\_BusName() method
获取属性状态:总线名称
## Signature
```typescript
getState_BusName(): string;
```
## Returns
string
总线名称
### getstate_color
# ISCH\_PrimitiveBus.getState\_Color() method
获取属性状态:总线颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
总线颜色
### getstate_line
# ISCH\_PrimitiveBus.getState\_Line() method
获取属性状态:多段线坐标组
## Signature
```typescript
getState_Line(): Array<number> | Array<Array<number>>;
```
## Returns
Array<number> \| Array<Array<number>>
多段线坐标组
### getstate_linetype
# ISCH\_PrimitiveBus.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitiveBus.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_primitiveid
# ISCH\_PrimitiveBus.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveBus.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### isasync
# ISCH\_PrimitiveBus.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### setstate_busname
# ISCH\_PrimitiveBus.setState\_BusName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:总线名称
## Signature
```typescript
setState_BusName(busName: string): ISCH_PrimitiveBus;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
busName
</td><td>
string
</td><td>
总线名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### setstate_color
# ISCH\_PrimitiveBus.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:总线颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveBus;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
总线颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### setstate_line
# ISCH\_PrimitiveBus.setState\_Line() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:多段线坐标组
## Signature
```typescript
setState_Line(line: Array<number> | Array<Array<number>>): ISCH_PrimitiveBus;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
line
</td><td>
Array<number> \| Array<Array<number>>
</td><td>
多段线坐标组
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### setstate_linetype
# ISCH\_PrimitiveBus.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveBus;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### setstate_linewidth
# ISCH\_PrimitiveBus.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveBus;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### toasync
# ISCH\_PrimitiveBus.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveBus;
```
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
### tosync
# ISCH\_PrimitiveBus.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveBus;
```
## Returns
[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
总线图元对象
FILE:references/classes/ISCH_PrimitiveCbbSymbolComponent.md
# ISCH\_PrimitiveCbbSymbolComponent class
复用模块符号图元
## Signature
```typescript
declare class ISCH_PrimitiveCbbSymbolComponent extends ISCH_PrimitiveComponent
```
**Extends:** [ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getState\_Cbb()](./ISCH_PrimitiveCbbSymbolComponent.md)
</td><td>
</td><td>
获取属性状态:关联复用模块
</td></tr>
<tr><td>
[getState\_CbbSymbol()](./ISCH_PrimitiveCbbSymbolComponent.md)
</td><td>
</td><td>
获取属性状态:关联复用模块符号
</td></tr>
</tbody></table>
---
## 方法详情
### getstate_cbb
# ISCH\_PrimitiveCbbSymbolComponent.getState\_Cbb() method
获取属性状态:关联复用模块
## Signature
```typescript
getState_Cbb(): {
libraryUuid: string;
uuid: string;
};
```
## Returns
\{ libraryUuid: string; uuid: string; \}
关联复用模块
### getstate_cbbsymbol
# ISCH\_PrimitiveCbbSymbolComponent.getState\_CbbSymbol() method
获取属性状态:关联复用模块符号
## Signature
```typescript
getState_CbbSymbol(): {
libraryUuid: string;
cbbUuid: string;
uuid?: string;
name?: string;
};
```
## Returns
\{ libraryUuid: string; cbbUuid: string; uuid?: string; name?: string; \}
关联复用模块符号
FILE:references/classes/ISCH_PrimitiveCircle.md
# ISCH\_PrimitiveCircle class
圆图元
## Signature
```typescript
declare class ISCH_PrimitiveCircle implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_CenterX()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:圆心 X
</td></tr>
<tr><td>
[getState\_CenterY()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:圆心 Y
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:颜色
</td></tr>
<tr><td>
[getState\_FillColor()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:填充颜色
</td></tr>
<tr><td>
[getState\_FillStyle()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:填充样式
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Radius()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
获取属性状态:半径
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_CenterX(centerX)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:圆心 X
</td></tr>
<tr><td>
[setState\_CenterY(centerY)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:圆心 Y
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:颜色
</td></tr>
<tr><td>
[setState\_FillColor(fillColor)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充颜色
</td></tr>
<tr><td>
[setState\_FillStyle(fillStyle)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充样式
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Radius(radius)](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:半径
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveCircle.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveCircle.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): ISCH_PrimitiveCircle;
```
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### getstate_centerx
# ISCH\_PrimitiveCircle.getState\_CenterX() method
获取属性状态:圆心 X
## Signature
```typescript
getState_CenterX(): number;
```
## Returns
number
圆心 X
### getstate_centery
# ISCH\_PrimitiveCircle.getState\_CenterY() method
获取属性状态:圆心 Y
## Signature
```typescript
getState_CenterY(): number;
```
## Returns
number
圆心 Y
### getstate_color
# ISCH\_PrimitiveCircle.getState\_Color() method
获取属性状态:颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
颜色
### getstate_fillcolor
# ISCH\_PrimitiveCircle.getState\_FillColor() method
获取属性状态:填充颜色
## Signature
```typescript
getState_FillColor(): string | null;
```
## Returns
string \| null
填充颜色
### getstate_fillstyle
# ISCH\_PrimitiveCircle.getState\_FillStyle() method
获取属性状态:填充样式
## Signature
```typescript
getState_FillStyle(): ESCH_PrimitiveFillStyle | null;
```
## Returns
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
填充样式
### getstate_linetype
# ISCH\_PrimitiveCircle.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitiveCircle.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_primitiveid
# ISCH\_PrimitiveCircle.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveCircle.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_radius
# ISCH\_PrimitiveCircle.getState\_Radius() method
获取属性状态:半径
## Signature
```typescript
getState_Radius(): number;
```
## Returns
number
半径
### isasync
# ISCH\_PrimitiveCircle.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveCircle.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveCircle>;
```
## Returns
Promise<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->>
圆图元对象
### setstate_centerx
# ISCH\_PrimitiveCircle.setState\_CenterX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:圆心 X
## Signature
```typescript
setState_CenterX(centerX: number): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
centerX
</td><td>
number
</td><td>
圆心 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_centery
# ISCH\_PrimitiveCircle.setState\_CenterY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:圆心 Y
## Signature
```typescript
setState_CenterY(centerY: number): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
centerY
</td><td>
number
</td><td>
圆心 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_color
# ISCH\_PrimitiveCircle.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_fillcolor
# ISCH\_PrimitiveCircle.setState\_FillColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充颜色
## Signature
```typescript
setState_FillColor(fillColor: string | null): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillColor
</td><td>
string \| null
</td><td>
填充颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_fillstyle
# ISCH\_PrimitiveCircle.setState\_FillStyle() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充样式
## Signature
```typescript
setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillStyle
</td><td>
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
</td><td>
填充样式
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_linetype
# ISCH\_PrimitiveCircle.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_linewidth
# ISCH\_PrimitiveCircle.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### setstate_radius
# ISCH\_PrimitiveCircle.setState\_Radius() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:半径
## Signature
```typescript
setState_Radius(radius: number): ISCH_PrimitiveCircle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
radius
</td><td>
number
</td><td>
半径
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### toasync
# ISCH\_PrimitiveCircle.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveCircle;
```
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
### tosync
# ISCH\_PrimitiveCircle.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveCircle;
```
## Returns
[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
圆图元对象
FILE:references/classes/ISCH_PrimitiveComponent.md
# ISCH\_PrimitiveComponent class
器件图元
## Signature
```typescript
declare class ISCH_PrimitiveComponent implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[async](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
异步
</td></tr>
<tr><td>
[designator?](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ Component 属性:位号
</td></tr>
<tr><td>
[mirror](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
是否镜像
</td></tr>
<tr><td>
[name?](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ Component 属性:名称
</td></tr>
<tr><td>
[otherProperty?](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
\{ \[key: string\]: string \| number \| boolean; \}
</td><td>
_(Optional)_ 其它参数
</td></tr>
<tr><td>
[primitiveId?](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ 图元 ID
</td></tr>
<tr><td>
[rotation](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
number
</td><td>
旋转角度
</td></tr>
<tr><td>
[x](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
[y](./ISCH_PrimitiveComponent.md)
</td><td>
`protected`
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_AddIntoBom()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:是否加入 BOM
</td></tr>
<tr><td>
[getState\_AddIntoPcb()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:是否转到 PCB
</td></tr>
<tr><td>
[getState\_Component()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库器件
</td></tr>
<tr><td>
[getState\_ComponentType()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:器件类型
</td></tr>
<tr><td>
[getState\_Designator()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:位号
</td></tr>
<tr><td>
[getState\_Footprint()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库封装
</td></tr>
<tr><td>
[getState\_Manufacturer()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:制造商
</td></tr>
<tr><td>
[getState\_ManufacturerId()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:制造商编号
</td></tr>
<tr><td>
[getState\_Mirror()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:是否镜像
</td></tr>
<tr><td>
[getState\_Name()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:名称
</td></tr>
<tr><td>
[getState\_Net()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_OtherProperty()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:其它参数
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_SubPartName()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:子部件名称
</td></tr>
<tr><td>
[getState\_Supplier()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:供应商
</td></tr>
<tr><td>
[getState\_SupplierId()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:供应商编号
</td></tr>
<tr><td>
[getState\_Symbol()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:关联库符号
</td></tr>
<tr><td>
[getState\_UniqueId()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:唯一 ID
</td></tr>
<tr><td>
[getState\_X()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_AddIntoBom(addIntoBom)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加入 BOM
</td></tr>
<tr><td>
[setState\_AddIntoPcb(addIntoPcb)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否转到 PCB
</td></tr>
<tr><td>
[setState\_Designator(designator)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:位号
</td></tr>
<tr><td>
[setState\_Manufacturer(manufacturer)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:制造商
</td></tr>
<tr><td>
[setState\_ManufacturerId(manufacturerId)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:制造商编号
</td></tr>
<tr><td>
[setState\_Mirror(mirror)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否镜像
</td></tr>
<tr><td>
[setState\_Name(name)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:名称
</td></tr>
<tr><td>
[setState\_Net(net)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[setState\_OtherProperty(otherProperty)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:其它参数
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_Supplier(supplier)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:供应商
</td></tr>
<tr><td>
[setState\_SupplierId(supplierId)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:供应商编号
</td></tr>
<tr><td>
[setState\_UniqueId(uniqueId)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:唯一 ID
</td></tr>
<tr><td>
[setState\_X(x)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveComponent.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 属性详情
### async
# ISCH\_PrimitiveComponent.async property
异步
## Signature
```typescript
protected async: boolean;
```
### designator
# ISCH\_PrimitiveComponent.designator property
Component 属性:位号
## Signature
```typescript
protected designator?: string;
```
### mirror
# ISCH\_PrimitiveComponent.mirror property
是否镜像
## Signature
```typescript
protected mirror: boolean;
```
### name
# ISCH\_PrimitiveComponent.name property
Component 属性:名称
## Signature
```typescript
protected name?: string;
```
### otherproperty
# ISCH\_PrimitiveComponent.otherProperty property
其它参数
## Signature
```typescript
protected otherProperty?: {
[key: string]: string | number | boolean;
};
```
### primitiveid
# ISCH\_PrimitiveComponent.primitiveId property
图元 ID
## Signature
```typescript
protected primitiveId?: string;
```
### rotation
# ISCH\_PrimitiveComponent.rotation property
旋转角度
## Signature
```typescript
protected rotation: number;
```
### x
# ISCH\_PrimitiveComponent.x property
坐标 X
## Signature
```typescript
protected x: number;
```
### y
# ISCH\_PrimitiveComponent.y property
坐标 Y
## Signature
```typescript
protected y: number;
```
---
## 方法详情
### done
# ISCH\_PrimitiveComponent.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveComponent>;
```
## Returns
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)<!-- -->>
器件图元对象
### getstate_addintobom
# ISCH\_PrimitiveComponent.getState\_AddIntoBom() method
获取属性状态:是否加入 BOM
## Signature
```typescript
getState_AddIntoBom(): boolean | undefined;
```
## Returns
boolean \| undefined
是否加入 BOM
### getstate_addintopcb
# ISCH\_PrimitiveComponent.getState\_AddIntoPcb() method
获取属性状态:是否转到 PCB
## Signature
```typescript
getState_AddIntoPcb(): boolean | undefined;
```
## Returns
boolean \| undefined
是否转到 PCB
### getstate_component
# ISCH\_PrimitiveComponent.getState\_Component() method
获取属性状态:关联库器件
## Signature
```typescript
getState_Component(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库器件
### getstate_componenttype
# ISCH\_PrimitiveComponent.getState\_ComponentType() method
获取属性状态:器件类型
## Signature
```typescript
getState_ComponentType(): ESCH_PrimitiveComponentType;
```
## Returns
ESCH\_PrimitiveComponentType
器件类型
### getstate_designator
# ISCH\_PrimitiveComponent.getState\_Designator() method
获取属性状态:位号
## Signature
```typescript
getState_Designator(): string | undefined;
```
## Returns
string \| undefined
位号
### getstate_footprint
# ISCH\_PrimitiveComponent.getState\_Footprint() method
获取属性状态:关联库封装
## Signature
```typescript
getState_Footprint(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库封装
### getstate_manufacturer
# ISCH\_PrimitiveComponent.getState\_Manufacturer() method
获取属性状态:制造商
## Signature
```typescript
getState_Manufacturer(): string | undefined;
```
## Returns
string \| undefined
制造商
### getstate_manufacturerid
# ISCH\_PrimitiveComponent.getState\_ManufacturerId() method
获取属性状态:制造商编号
## Signature
```typescript
getState_ManufacturerId(): string | undefined;
```
## Returns
string \| undefined
制造商编号
### getstate_mirror
# ISCH\_PrimitiveComponent.getState\_Mirror() method
获取属性状态:是否镜像
## Signature
```typescript
getState_Mirror(): boolean;
```
## Returns
boolean
是否镜像
### getstate_name
# ISCH\_PrimitiveComponent.getState\_Name() method
获取属性状态:名称
## Signature
```typescript
getState_Name(): string | undefined;
```
## Returns
string \| undefined
名称
### getstate_net
# ISCH\_PrimitiveComponent.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string | undefined;
```
## Returns
string \| undefined
网络名称
### getstate_otherproperty
# ISCH\_PrimitiveComponent.getState\_OtherProperty() method
获取属性状态:其它参数
## Signature
```typescript
getState_OtherProperty(): {
[key: string]: string | number | boolean;
} | undefined;
```
## Returns
{ \[key: string\]: string \| number \| boolean; } \| undefined
其它参数
### getstate_primitiveid
# ISCH\_PrimitiveComponent.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveComponent.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_rotation
# ISCH\_PrimitiveComponent.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_subpartname
# ISCH\_PrimitiveComponent.getState\_SubPartName() method
获取属性状态:子部件名称
## Signature
```typescript
getState_SubPartName(): string | undefined;
```
## Returns
string \| undefined
子部件名称
### getstate_supplier
# ISCH\_PrimitiveComponent.getState\_Supplier() method
获取属性状态:供应商
## Signature
```typescript
getState_Supplier(): string | undefined;
```
## Returns
string \| undefined
供应商
### getstate_supplierid
# ISCH\_PrimitiveComponent.getState\_SupplierId() method
获取属性状态:供应商编号
## Signature
```typescript
getState_SupplierId(): string | undefined;
```
## Returns
string \| undefined
供应商编号
### getstate_symbol
# ISCH\_PrimitiveComponent.getState\_Symbol() method
获取属性状态:关联库符号
## Signature
```typescript
getState_Symbol(): {
libraryUuid: string;
uuid: string;
name?: string;
} | undefined;
```
## Returns
{ libraryUuid: string; uuid: string; name?: string; } \| undefined
关联库符号
### getstate_uniqueid
# ISCH\_PrimitiveComponent.getState\_UniqueId() method
获取属性状态:唯一 ID
## Signature
```typescript
getState_UniqueId(): string | undefined;
```
## Returns
string \| undefined
唯一 ID
### getstate_x
# ISCH\_PrimitiveComponent.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# ISCH\_PrimitiveComponent.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# ISCH\_PrimitiveComponent.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveComponent.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveComponent>;
```
## Returns
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)<!-- -->>
器件图元对象
### setstate_addintobom
# ISCH\_PrimitiveComponent.setState\_AddIntoBom() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加入 BOM
## Signature
```typescript
setState_AddIntoBom(addIntoBom: boolean | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
addIntoBom
</td><td>
boolean \| undefined
</td><td>
是否加入 BOM
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_addintopcb
# ISCH\_PrimitiveComponent.setState\_AddIntoPcb() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否转到 PCB
## Signature
```typescript
setState_AddIntoPcb(addIntoPcb: boolean | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
addIntoPcb
</td><td>
boolean \| undefined
</td><td>
是否转到 PCB
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_designator
# ISCH\_PrimitiveComponent.setState\_Designator() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:位号
## Signature
```typescript
setState_Designator(designator: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
designator
</td><td>
string \| undefined
</td><td>
位号
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_manufacturer
# ISCH\_PrimitiveComponent.setState\_Manufacturer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:制造商
## Signature
```typescript
setState_Manufacturer(manufacturer: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
manufacturer
</td><td>
string \| undefined
</td><td>
制造商
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_manufacturerid
# ISCH\_PrimitiveComponent.setState\_ManufacturerId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:制造商编号
## Signature
```typescript
setState_ManufacturerId(manufacturerId: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
manufacturerId
</td><td>
string \| undefined
</td><td>
制造商编号
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_mirror
# ISCH\_PrimitiveComponent.setState\_Mirror() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否镜像
## Signature
```typescript
setState_Mirror(mirror: boolean): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mirror
</td><td>
boolean
</td><td>
是否镜像
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_name
# ISCH\_PrimitiveComponent.setState\_Name() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:名称
## Signature
```typescript
setState_Name(name: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
name
</td><td>
string \| undefined
</td><td>
名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_net
# ISCH\_PrimitiveComponent.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string \| undefined
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_otherproperty
# ISCH\_PrimitiveComponent.setState\_OtherProperty() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:其它参数
## Signature
```typescript
setState_OtherProperty(otherProperty: {
[key: string]: string | number | boolean;
}): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
otherProperty
</td><td>
\{ \[key: string\]: string \| number \| boolean; \}
</td><td>
其它参数
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_rotation
# ISCH\_PrimitiveComponent.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_supplier
# ISCH\_PrimitiveComponent.setState\_Supplier() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:供应商
## Signature
```typescript
setState_Supplier(supplier: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
supplier
</td><td>
string \| undefined
</td><td>
供应商
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_supplierid
# ISCH\_PrimitiveComponent.setState\_SupplierId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:供应商编号
## Signature
```typescript
setState_SupplierId(supplierId: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
supplierId
</td><td>
string \| undefined
</td><td>
供应商编号
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_uniqueid
# ISCH\_PrimitiveComponent.setState\_UniqueId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:唯一 ID
## Signature
```typescript
setState_UniqueId(uniqueId: string | undefined): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uniqueId
</td><td>
string \| undefined
</td><td>
唯一 ID
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_x
# ISCH\_PrimitiveComponent.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### setstate_y
# ISCH\_PrimitiveComponent.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): ISCH_PrimitiveComponent;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
器件图元对象
### toasync
# ISCH\_PrimitiveComponent.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveComponent;
```
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
圆弧线图元对象
### tosync
# ISCH\_PrimitiveComponent.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveComponent;
```
## Returns
[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
圆弧线图元对象
FILE:references/classes/ISCH_PrimitiveComponentPin.md
# ISCH\_PrimitiveComponentPin class
器件引脚图元
## Signature
```typescript
declare class ISCH_PrimitiveComponentPin extends ISCH_PrimitivePin
```
**Extends:** [ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
## Remarks
器件引脚图元是一个特殊的图元,它指的是在原理图画布上关联到符号的引脚
器件引脚图元仅可更改 `pinNumber`<!-- -->、`noConnected` 属性,其它所有属性均为只读, 并且你只能通过 [器件类的 getAllPinsByPrimitiveId 方法](./SCH_PrimitiveComponent.md) 或 获取到器件引脚图元
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[primitiveType](./ISCH_PrimitiveComponentPin.md)
</td><td>
`protected`
`readonly`
</td><td>
[ESCH\_PrimitiveType.COMPONENT\_PIN](../enums/ESCH_PrimitiveType.md)
</td><td>
图元类型
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getState\_NoConnected()](./ISCH_PrimitiveComponentPin.md)
</td><td>
</td><td>
获取属性状态:是否存在非连接标识
</td></tr>
<tr><td>
[setState\_NoConnected(noConnected)](./ISCH_PrimitiveComponentPin.md)
</td><td>
</td><td>
设置属性状态:是否存在非连接标识
</td></tr>
</tbody></table>
---
## 属性详情
### primitivetype
# ISCH\_PrimitiveComponentPin.primitiveType property
图元类型
## Signature
```typescript
protected readonly primitiveType: ESCH_PrimitiveType.COMPONENT_PIN;
```
---
## 方法详情
### getstate_noconnected
# ISCH\_PrimitiveComponentPin.getState\_NoConnected() method
获取属性状态:是否存在非连接标识
## Signature
```typescript
getState_NoConnected(): boolean;
```
## Returns
boolean
是否存在非连接标识
### setstate_noconnected
# ISCH\_PrimitiveComponentPin.setState\_NoConnected() method
设置属性状态:是否存在非连接标识
## Signature
```typescript
setState_NoConnected(noConnected: boolean): ISCH_PrimitiveComponentPin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
noConnected
</td><td>
boolean
</td><td>
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md)
器件引脚图元对象
FILE:references/classes/ISCH_PrimitivePin.md
# ISCH\_PrimitivePin class
引脚图元
## Signature
```typescript
declare class ISCH_PrimitivePin implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
引脚图元仅符号编辑器可用,在原理图图页内,关联到符号的引脚被称为 [器件引脚图元](./ISCH_PrimitiveComponentPin.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[async](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
boolean
</td><td>
异步
</td></tr>
<tr><td>
[pinColor](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
string \| null
</td><td>
引脚颜色
</td></tr>
<tr><td>
[pinLength](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
number
</td><td>
引脚长度
</td></tr>
<tr><td>
[pinName](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
string
</td><td>
引脚名称
</td></tr>
<tr><td>
[pinNumber](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
string
</td><td>
引脚编号
</td></tr>
<tr><td>
[pinShape](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
[ESCH\_PrimitivePinShape](../enums/ESCH_PrimitivePinShape.md)
</td><td>
引脚形状
</td></tr>
<tr><td>
[pinType](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
[ESCH\_PrimitivePinType](../enums/ESCH_PrimitivePinType.md)
</td><td>
引脚类型
</td></tr>
<tr><td>
[primitiveId?](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
string
</td><td>
_(Optional)_ 图元 ID
</td></tr>
<tr><td>
[primitiveType](./ISCH_PrimitivePin.md)
</td><td>
`protected`
`readonly`
</td><td>
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
</td><td>
图元类型
</td></tr>
<tr><td>
[rotation](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
number
</td><td>
旋转角度
</td></tr>
<tr><td>
[x](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
[y](./ISCH_PrimitivePin.md)
</td><td>
`protected`
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_OtherProperty()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:其它参数
</td></tr>
<tr><td>
[getState\_PinColor()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚颜色
</td></tr>
<tr><td>
[getState\_PinLength()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚长度
</td></tr>
<tr><td>
[getState\_PinName()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚名称
</td></tr>
<tr><td>
[getState\_PinNumber()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚编号
</td></tr>
<tr><td>
[getState\_PinShape()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚形状
</td></tr>
<tr><td>
[getState\_pinType()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:引脚类型
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_X()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_OtherProperty(otherProperty)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:其它参数
</td></tr>
<tr><td>
[setState\_PinColor(pinColor)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚颜色
</td></tr>
<tr><td>
[setState\_PinLength(pinLength)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚长度
</td></tr>
<tr><td>
[setState\_PinName(pinName)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚名称
</td></tr>
<tr><td>
[setState\_PinNumber(pinNumber)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚编号
</td></tr>
<tr><td>
[setState\_PinShape(pinShape)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚形状
</td></tr>
<tr><td>
[setState\_PinType(pinType)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:引脚类型
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_X(x)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitivePin.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 属性详情
### async
# ISCH\_PrimitivePin.async property
异步
## Signature
```typescript
protected async: boolean;
```
### pincolor
# ISCH\_PrimitivePin.pinColor property
引脚颜色
## Signature
```typescript
protected pinColor: string | null;
```
### pinlength
# ISCH\_PrimitivePin.pinLength property
引脚长度
## Signature
```typescript
protected pinLength: number;
```
### pinname
# ISCH\_PrimitivePin.pinName property
引脚名称
## Signature
```typescript
protected pinName: string;
```
### pinnumber
# ISCH\_PrimitivePin.pinNumber property
引脚编号
## Signature
```typescript
protected pinNumber: string;
```
### pinshape
# ISCH\_PrimitivePin.pinShape property
引脚形状
## Signature
```typescript
protected pinShape: ESCH_PrimitivePinShape;
```
### pintype
# ISCH\_PrimitivePin.pinType property
引脚类型
## Signature
```typescript
protected pinType: ESCH_PrimitivePinType;
```
### primitiveid
# ISCH\_PrimitivePin.primitiveId property
图元 ID
## Signature
```typescript
protected primitiveId?: string;
```
### primitivetype
# ISCH\_PrimitivePin.primitiveType property
图元类型
## Signature
```typescript
protected readonly primitiveType: ESCH_PrimitiveType;
```
### rotation
# ISCH\_PrimitivePin.rotation property
旋转角度
## Signature
```typescript
protected rotation: number;
```
### x
# ISCH\_PrimitivePin.x property
坐标 X
## Signature
```typescript
protected x: number;
```
### y
# ISCH\_PrimitivePin.y property
坐标 Y
## Signature
```typescript
protected y: number;
```
---
## 方法详情
### done
# ISCH\_PrimitivePin.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitivePin>;
```
## Returns
Promise<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)<!-- -->>
引脚图元对象
### getstate_otherproperty
# ISCH\_PrimitivePin.getState\_OtherProperty() method
获取属性状态:其它参数
## Signature
```typescript
getState_OtherProperty(): {
[key: string]: string | number | boolean;
} | undefined;
```
## Returns
{ \[key: string\]: string \| number \| boolean; } \| undefined
其它参数
### getstate_pincolor
# ISCH\_PrimitivePin.getState\_PinColor() method
获取属性状态:引脚颜色
## Signature
```typescript
getState_PinColor(): string | null;
```
## Returns
string \| null
引脚颜色
### getstate_pinlength
# ISCH\_PrimitivePin.getState\_PinLength() method
获取属性状态:引脚长度
## Signature
```typescript
getState_PinLength(): number;
```
## Returns
number
引脚长度
### getstate_pinname
# ISCH\_PrimitivePin.getState\_PinName() method
获取属性状态:引脚名称
## Signature
```typescript
getState_PinName(): string;
```
## Returns
string
引脚名称
### getstate_pinnumber
# ISCH\_PrimitivePin.getState\_PinNumber() method
获取属性状态:引脚编号
## Signature
```typescript
getState_PinNumber(): string;
```
## Returns
string
引脚编号
### getstate_pinshape
# ISCH\_PrimitivePin.getState\_PinShape() method
获取属性状态:引脚形状
## Signature
```typescript
getState_PinShape(): ESCH_PrimitivePinShape;
```
## Returns
[ESCH\_PrimitivePinShape](../enums/ESCH_PrimitivePinShape.md)
引脚形状
### getstate_pintype
# ISCH\_PrimitivePin.getState\_pinType() method
获取属性状态:引脚类型
## Signature
```typescript
getState_pinType(): ESCH_PrimitivePinType;
```
## Returns
[ESCH\_PrimitivePinType](../enums/ESCH_PrimitivePinType.md)
引脚类型
### getstate_primitiveid
# ISCH\_PrimitivePin.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitivePin.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_rotation
# ISCH\_PrimitivePin.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_x
# ISCH\_PrimitivePin.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# ISCH\_PrimitivePin.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# ISCH\_PrimitivePin.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitivePin.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitivePin>;
```
## Returns
Promise<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)<!-- -->>
引脚图元对象
### setstate_otherproperty
# ISCH\_PrimitivePin.setState\_OtherProperty() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:其它参数
## Signature
```typescript
setState_OtherProperty(otherProperty: {
[key: string]: string | number | boolean;
}): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
otherProperty
</td><td>
\{ \[key: string\]: string \| number \| boolean; \}
</td><td>
其它参数
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pincolor
# ISCH\_PrimitivePin.setState\_PinColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚颜色
## Signature
```typescript
setState_PinColor(pinColor: string | null): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinColor
</td><td>
string \| null
</td><td>
引脚颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pinlength
# ISCH\_PrimitivePin.setState\_PinLength() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚长度
## Signature
```typescript
setState_PinLength(pinLength: number): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinLength
</td><td>
number
</td><td>
引脚长度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pinname
# ISCH\_PrimitivePin.setState\_PinName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚名称
## Signature
```typescript
setState_PinName(pinName: string): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinName
</td><td>
string
</td><td>
引脚名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pinnumber
# ISCH\_PrimitivePin.setState\_PinNumber() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚编号
## Signature
```typescript
setState_PinNumber(pinNumber: string): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinNumber
</td><td>
string
</td><td>
引脚编号
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pinshape
# ISCH\_PrimitivePin.setState\_PinShape() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚形状
## Signature
```typescript
setState_PinShape(pinShape: ESCH_PrimitivePinShape): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinShape
</td><td>
[ESCH\_PrimitivePinShape](../enums/ESCH_PrimitivePinShape.md)
</td><td>
引脚形状
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_pintype
# ISCH\_PrimitivePin.setState\_PinType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:引脚类型
## Signature
```typescript
setState_PinType(pinType: ESCH_PrimitivePinType): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pinType
</td><td>
[ESCH\_PrimitivePinType](../enums/ESCH_PrimitivePinType.md)
</td><td>
引脚类型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_rotation
# ISCH\_PrimitivePin.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_x
# ISCH\_PrimitivePin.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### setstate_y
# ISCH\_PrimitivePin.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): ISCH_PrimitivePin;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### toasync
# ISCH\_PrimitivePin.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitivePin;
```
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
### tosync
# ISCH\_PrimitivePin.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitivePin;
```
## Returns
[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)
引脚图元对象
FILE:references/classes/ISCH_PrimitivePolygon.md
# ISCH\_PrimitivePolygon class
多边形(折线)图元
## Signature
```typescript
declare class ISCH_PrimitivePolygon implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:颜色
</td></tr>
<tr><td>
[getState\_FillColor()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:填充颜色
</td></tr>
<tr><td>
[getState\_Line()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:坐标组
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:颜色
</td></tr>
<tr><td>
[setState\_FillColor(fillColor)](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充颜色
</td></tr>
<tr><td>
[setState\_Line(line)](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标组
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitivePolygon.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitivePolygon.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): ISCH_PrimitivePolygon;
```
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### getstate_color
# ISCH\_PrimitivePolygon.getState\_Color() method
获取属性状态:颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
颜色
### getstate_fillcolor
# ISCH\_PrimitivePolygon.getState\_FillColor() method
获取属性状态:填充颜色
## Signature
```typescript
getState_FillColor(): string | null;
```
## Returns
string \| null
填充颜色
### getstate_line
# ISCH\_PrimitivePolygon.getState\_Line() method
获取属性状态:坐标组
## Signature
```typescript
getState_Line(): Array<number>;
```
## Returns
Array<number>
坐标组
### getstate_linetype
# ISCH\_PrimitivePolygon.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitivePolygon.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_primitiveid
# ISCH\_PrimitivePolygon.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitivePolygon.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### isasync
# ISCH\_PrimitivePolygon.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitivePolygon.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitivePolygon>;
```
## Returns
Promise<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)<!-- -->>
多边形图元对象
### setstate_color
# ISCH\_PrimitivePolygon.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitivePolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### setstate_fillcolor
# ISCH\_PrimitivePolygon.setState\_FillColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充颜色
## Signature
```typescript
setState_FillColor(fillColor: string | null): ISCH_PrimitivePolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillColor
</td><td>
string \| null
</td><td>
填充颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### setstate_line
# ISCH\_PrimitivePolygon.setState\_Line() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标组
## Signature
```typescript
setState_Line(line: Array<number>): ISCH_PrimitivePolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
line
</td><td>
Array<number>
</td><td>
坐标组
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### setstate_linetype
# ISCH\_PrimitivePolygon.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitivePolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### setstate_linewidth
# ISCH\_PrimitivePolygon.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitivePolygon;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### toasync
# ISCH\_PrimitivePolygon.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitivePolygon;
```
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
### tosync
# ISCH\_PrimitivePolygon.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitivePolygon;
```
## Returns
[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
多边形图元对象
FILE:references/classes/ISCH_PrimitiveRectangle.md
# ISCH\_PrimitiveRectangle class
矩形图元
## Signature
```typescript
declare class ISCH_PrimitiveRectangle implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:边框颜色
</td></tr>
<tr><td>
[getState\_CornerRadius()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:圆角半径
</td></tr>
<tr><td>
[getState\_FillColor()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:填充颜色
</td></tr>
<tr><td>
[getState\_FillStyle()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:填充样式
</td></tr>
<tr><td>
[getState\_Height()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:高
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_TopLeftX()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:左上点 X
</td></tr>
<tr><td>
[getState\_TopLeftY()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:左上点 Y
</td></tr>
<tr><td>
[getState\_Width()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取属性状态:宽
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:边框颜色
</td></tr>
<tr><td>
[setState\_CornerRadius(cornerRadius)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:圆角半径
</td></tr>
<tr><td>
[setState\_FillColor(fillColor)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充颜色
</td></tr>
<tr><td>
[setState\_FillStyle(fillStyle)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:填充样式
</td></tr>
<tr><td>
[setState\_Height(height)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:高
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_TopLeftX(topLeftX)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:左上点 X
</td></tr>
<tr><td>
[setState\_TopLeftY(topLeftY)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:左上点 Y
</td></tr>
<tr><td>
[setState\_Width(width)](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:宽
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveRectangle.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveRectangle.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): ISCH_PrimitiveRectangle;
```
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### getstate_color
# ISCH\_PrimitiveRectangle.getState\_Color() method
获取属性状态:边框颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
边框颜色
### getstate_cornerradius
# ISCH\_PrimitiveRectangle.getState\_CornerRadius() method
获取属性状态:圆角半径
## Signature
```typescript
getState_CornerRadius(): number;
```
## Returns
number
圆角半径
### getstate_fillcolor
# ISCH\_PrimitiveRectangle.getState\_FillColor() method
获取属性状态:填充颜色
## Signature
```typescript
getState_FillColor(): string | null;
```
## Returns
string \| null
填充颜色
### getstate_fillstyle
# ISCH\_PrimitiveRectangle.getState\_FillStyle() method
获取属性状态:填充样式
## Signature
```typescript
getState_FillStyle(): ESCH_PrimitiveFillStyle | null;
```
## Returns
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
填充样式
### getstate_height
# ISCH\_PrimitiveRectangle.getState\_Height() method
获取属性状态:高
## Signature
```typescript
getState_Height(): number;
```
## Returns
number
高
### getstate_linetype
# ISCH\_PrimitiveRectangle.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitiveRectangle.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_primitiveid
# ISCH\_PrimitiveRectangle.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveRectangle.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_rotation
# ISCH\_PrimitiveRectangle.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_topleftx
# ISCH\_PrimitiveRectangle.getState\_TopLeftX() method
获取属性状态:左上点 X
## Signature
```typescript
getState_TopLeftX(): number;
```
## Returns
number
左上点 X
### getstate_toplefty
# ISCH\_PrimitiveRectangle.getState\_TopLeftY() method
获取属性状态:左上点 Y
## Signature
```typescript
getState_TopLeftY(): number;
```
## Returns
number
左上点 Y
### getstate_width
# ISCH\_PrimitiveRectangle.getState\_Width() method
获取属性状态:宽
## Signature
```typescript
getState_Width(): number;
```
## Returns
number
宽
### isasync
# ISCH\_PrimitiveRectangle.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveRectangle.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveRectangle>;
```
## Returns
Promise<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)<!-- -->>
矩形图元对象
### setstate_color
# ISCH\_PrimitiveRectangle.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:边框颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
边框颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_cornerradius
# ISCH\_PrimitiveRectangle.setState\_CornerRadius() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:圆角半径
## Signature
```typescript
setState_CornerRadius(cornerRadius: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cornerRadius
</td><td>
number
</td><td>
圆角半径
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_fillcolor
# ISCH\_PrimitiveRectangle.setState\_FillColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充颜色
## Signature
```typescript
setState_FillColor(fillColor: string | null): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillColor
</td><td>
string \| null
</td><td>
填充颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_fillstyle
# ISCH\_PrimitiveRectangle.setState\_FillStyle() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:填充样式
## Signature
```typescript
setState_FillStyle(fillStyle: ESCH_PrimitiveFillStyle | null): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fillStyle
</td><td>
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
</td><td>
填充样式
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_height
# ISCH\_PrimitiveRectangle.setState\_Height() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:高
## Signature
```typescript
setState_Height(height: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
height
</td><td>
number
</td><td>
高
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_linetype
# ISCH\_PrimitiveRectangle.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_linewidth
# ISCH\_PrimitiveRectangle.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_rotation
# ISCH\_PrimitiveRectangle.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_topleftx
# ISCH\_PrimitiveRectangle.setState\_TopLeftX() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:左上点 X
## Signature
```typescript
setState_TopLeftX(topLeftX: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topLeftX
</td><td>
number
</td><td>
左上点 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_toplefty
# ISCH\_PrimitiveRectangle.setState\_TopLeftY() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:左上点 Y
## Signature
```typescript
setState_TopLeftY(topLeftY: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topLeftY
</td><td>
number
</td><td>
左上点 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### setstate_width
# ISCH\_PrimitiveRectangle.setState\_Width() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:宽
## Signature
```typescript
setState_Width(width: number): ISCH_PrimitiveRectangle;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
width
</td><td>
number
</td><td>
宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### toasync
# ISCH\_PrimitiveRectangle.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveRectangle;
```
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
### tosync
# ISCH\_PrimitiveRectangle.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveRectangle;
```
## Returns
[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
矩形图元对象
FILE:references/classes/ISCH_PrimitiveText.md
# ISCH\_PrimitiveText class
文本图元
## Signature
```typescript
declare class ISCH_PrimitiveText implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_AlignMode()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:对齐模式
</td></tr>
<tr><td>
[getState\_Bold()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:是否加粗
</td></tr>
<tr><td>
[getState\_Content()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:文本内容
</td></tr>
<tr><td>
[getState\_FontName()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:字体名称
</td></tr>
<tr><td>
[getState\_FontSize()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:字体大小
</td></tr>
<tr><td>
[getState\_Italic()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:是否斜体
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[getState\_Rotation()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:旋转角度
</td></tr>
<tr><td>
[getState\_TextColor()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:文本颜色
</td></tr>
<tr><td>
[getState\_UnderLine()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:是否加下划线
</td></tr>
<tr><td>
[getState\_X()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:坐标 X
</td></tr>
<tr><td>
[getState\_Y()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
获取属性状态:坐标 Y
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[reset()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 将异步图元重置为当前画布状态
</td></tr>
<tr><td>
[setState\_AlignMode(alignMode)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:对齐模式
</td></tr>
<tr><td>
[setState\_Bold(bold)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加粗
</td></tr>
<tr><td>
[setState\_Content(content)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:文本内容
</td></tr>
<tr><td>
[setState\_FontName(fontName)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体名称
</td></tr>
<tr><td>
[setState\_FontSize(fontSize)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:字体大小
</td></tr>
<tr><td>
[setState\_Italic(italic)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否斜体
</td></tr>
<tr><td>
[setState\_Rotation(rotation)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:旋转角度
</td></tr>
<tr><td>
[setState\_TextColor(textColor)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:文本颜色
</td></tr>
<tr><td>
[setState\_UnderLine(underLine)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:是否加下划线
</td></tr>
<tr><td>
[setState\_X(x)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 X
</td></tr>
<tr><td>
[setState\_Y(y)](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:坐标 Y
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveText.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveText.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveText>;
```
## Returns
Promise<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)<!-- -->>
文本图元对象
### getstate_alignmode
# ISCH\_PrimitiveText.getState\_AlignMode() method
获取属性状态:对齐模式
## Signature
```typescript
getState_AlignMode(): ESCH_PrimitiveTextAlignMode;
```
## Returns
[ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md)
对齐模式
### getstate_bold
# ISCH\_PrimitiveText.getState\_Bold() method
获取属性状态:是否加粗
## Signature
```typescript
getState_Bold(): boolean;
```
## Returns
boolean
是否加粗
### getstate_content
# ISCH\_PrimitiveText.getState\_Content() method
获取属性状态:文本内容
## Signature
```typescript
getState_Content(): string;
```
## Returns
string
文本内容
### getstate_fontname
# ISCH\_PrimitiveText.getState\_FontName() method
获取属性状态:字体名称
## Signature
```typescript
getState_FontName(): string | null;
```
## Returns
string \| null
字体名称
### getstate_fontsize
# ISCH\_PrimitiveText.getState\_FontSize() method
获取属性状态:字体大小
## Signature
```typescript
getState_FontSize(): number | null;
```
## Returns
number \| null
字体大小
### getstate_italic
# ISCH\_PrimitiveText.getState\_Italic() method
获取属性状态:是否斜体
## Signature
```typescript
getState_Italic(): boolean;
```
## Returns
boolean
是否斜体
### getstate_primitiveid
# ISCH\_PrimitiveText.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveText.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### getstate_rotation
# ISCH\_PrimitiveText.getState\_Rotation() method
获取属性状态:旋转角度
## Signature
```typescript
getState_Rotation(): number;
```
## Returns
number
旋转角度
### getstate_textcolor
# ISCH\_PrimitiveText.getState\_TextColor() method
获取属性状态:文本颜色
## Signature
```typescript
getState_TextColor(): string | null;
```
## Returns
string \| null
文本颜色
### getstate_underline
# ISCH\_PrimitiveText.getState\_UnderLine() method
获取属性状态:是否加下划线
## Signature
```typescript
getState_UnderLine(): boolean;
```
## Returns
boolean
是否加下划线
### getstate_x
# ISCH\_PrimitiveText.getState\_X() method
获取属性状态:坐标 X
## Signature
```typescript
getState_X(): number;
```
## Returns
number
坐标 X
### getstate_y
# ISCH\_PrimitiveText.getState\_Y() method
获取属性状态:坐标 Y
## Signature
```typescript
getState_Y(): number;
```
## Returns
number
坐标 Y
### isasync
# ISCH\_PrimitiveText.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### reset
# ISCH\_PrimitiveText.reset() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将异步图元重置为当前画布状态
## Signature
```typescript
reset(): Promise<ISCH_PrimitiveText>;
```
## Returns
Promise<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)<!-- -->>
文本图元对象
### setstate_alignmode
# ISCH\_PrimitiveText.setState\_AlignMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:对齐模式
## Signature
```typescript
setState_AlignMode(alignMode: ESCH_PrimitiveTextAlignMode): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
alignMode
</td><td>
[ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md)
</td><td>
对齐模式
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_bold
# ISCH\_PrimitiveText.setState\_Bold() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加粗
## Signature
```typescript
setState_Bold(bold: boolean): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
bold
</td><td>
boolean
</td><td>
是否加粗
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_content
# ISCH\_PrimitiveText.setState\_Content() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:文本内容
## Signature
```typescript
setState_Content(content: string): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
content
</td><td>
string
</td><td>
文本内容
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_fontname
# ISCH\_PrimitiveText.setState\_FontName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体名称
## Signature
```typescript
setState_FontName(fontName: string | null): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontName
</td><td>
string \| null
</td><td>
字体名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_fontsize
# ISCH\_PrimitiveText.setState\_FontSize() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:字体大小
## Signature
```typescript
setState_FontSize(fontSize: number | null): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontSize
</td><td>
number \| null
</td><td>
字体大小
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_italic
# ISCH\_PrimitiveText.setState\_Italic() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否斜体
## Signature
```typescript
setState_Italic(italic: boolean): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
italic
</td><td>
boolean
</td><td>
是否斜体
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_rotation
# ISCH\_PrimitiveText.setState\_Rotation() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:旋转角度
## Signature
```typescript
setState_Rotation(rotation: number): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
rotation
</td><td>
number
</td><td>
旋转角度
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_textcolor
# ISCH\_PrimitiveText.setState\_TextColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:文本颜色
## Signature
```typescript
setState_TextColor(textColor: string | null): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
textColor
</td><td>
string \| null
</td><td>
文本颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_underline
# ISCH\_PrimitiveText.setState\_UnderLine() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:是否加下划线
## Signature
```typescript
setState_UnderLine(underLine: boolean): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
underLine
</td><td>
boolean
</td><td>
是否加下划线
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_x
# ISCH\_PrimitiveText.setState\_X() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 X
## Signature
```typescript
setState_X(x: number): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### setstate_y
# ISCH\_PrimitiveText.setState\_Y() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:坐标 Y
## Signature
```typescript
setState_Y(y: number): ISCH_PrimitiveText;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### toasync
# ISCH\_PrimitiveText.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveText;
```
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
### tosync
# ISCH\_PrimitiveText.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveText;
```
## Returns
[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
文本图元对象
FILE:references/classes/ISCH_PrimitiveWire.md
# ISCH\_PrimitiveWire class
导线图元
## Signature
```typescript
declare class ISCH_PrimitiveWire implements ISCH_Primitive
```
**Implements:** [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[done()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 将对图元的更改应用到画布
</td></tr>
<tr><td>
[getState\_Color()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:总线颜色
</td></tr>
<tr><td>
[getState\_Line()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:多段线坐标组
</td></tr>
<tr><td>
[getState\_LineType()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:线型
</td></tr>
<tr><td>
[getState\_LineWidth()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:线宽
</td></tr>
<tr><td>
[getState\_Net()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:网络名称
</td></tr>
<tr><td>
[getState\_PrimitiveId()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:图元 ID
</td></tr>
<tr><td>
[getState\_PrimitiveType()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
获取属性状态:图元类型
</td></tr>
<tr><td>
[isAsync()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
查询图元是否为异步图元
</td></tr>
<tr><td>
[setState\_Color(color)](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:导线颜色
</td></tr>
<tr><td>
[setState\_Line(line)](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:多段线坐标组
</td></tr>
<tr><td>
[setState\_LineType(lineType)](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线型
</td></tr>
<tr><td>
[setState\_LineWidth(lineWidth)](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:线宽
</td></tr>
<tr><td>
[setState\_Net(net)](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 设置属性状态:网络名称
</td></tr>
<tr><td>
[toAsync()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
将图元转换为异步图元
</td></tr>
<tr><td>
[toSync()](./ISCH_PrimitiveWire.md)
</td><td>
</td><td>
将图元转换为同步图元
</td></tr>
</tbody></table>
---
## 方法详情
### done
# ISCH\_PrimitiveWire.done() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将对图元的更改应用到画布
## Signature
```typescript
done(): Promise<ISCH_PrimitiveWire>;
```
## Returns
Promise<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)<!-- -->>
导线图元对象
### getstate_color
# ISCH\_PrimitiveWire.getState\_Color() method
获取属性状态:总线颜色
## Signature
```typescript
getState_Color(): string | null;
```
## Returns
string \| null
总线颜色
### getstate_line
# ISCH\_PrimitiveWire.getState\_Line() method
获取属性状态:多段线坐标组
## Signature
```typescript
getState_Line(): Array<number> | Array<Array<number>>;
```
## Returns
Array<number> \| Array<Array<number>>
多段线坐标组
### getstate_linetype
# ISCH\_PrimitiveWire.getState\_LineType() method
获取属性状态:线型
## Signature
```typescript
getState_LineType(): ESCH_PrimitiveLineType | null;
```
## Returns
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
线型
### getstate_linewidth
# ISCH\_PrimitiveWire.getState\_LineWidth() method
获取属性状态:线宽
## Signature
```typescript
getState_LineWidth(): number | null;
```
## Returns
number \| null
线宽
### getstate_net
# ISCH\_PrimitiveWire.getState\_Net() method
获取属性状态:网络名称
## Signature
```typescript
getState_Net(): string;
```
## Returns
string
网络名称
### getstate_primitiveid
# ISCH\_PrimitiveWire.getState\_PrimitiveId() method
获取属性状态:图元 ID
## Signature
```typescript
getState_PrimitiveId(): string;
```
## Returns
string
图元 ID
### getstate_primitivetype
# ISCH\_PrimitiveWire.getState\_PrimitiveType() method
获取属性状态:图元类型
## Signature
```typescript
getState_PrimitiveType(): ESCH_PrimitiveType;
```
## Returns
[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
图元类型
### isasync
# ISCH\_PrimitiveWire.isAsync() method
查询图元是否为异步图元
## Signature
```typescript
isAsync(): boolean;
```
## Returns
boolean
是否为异步图元
### setstate_color
# ISCH\_PrimitiveWire.setState\_Color() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:导线颜色
## Signature
```typescript
setState_Color(color: string | null): ISCH_PrimitiveWire;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
color
</td><td>
string \| null
</td><td>
导线颜色
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### setstate_line
# ISCH\_PrimitiveWire.setState\_Line() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:多段线坐标组
## Signature
```typescript
setState_Line(line: Array<number> | Array<Array<number>>): ISCH_PrimitiveWire;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
line
</td><td>
Array<number> \| Array<Array<number>>
</td><td>
多段线坐标组
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### setstate_linetype
# ISCH\_PrimitiveWire.setState\_LineType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线型
## Signature
```typescript
setState_LineType(lineType: ESCH_PrimitiveLineType | null): ISCH_PrimitiveWire;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
线型
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### setstate_linewidth
# ISCH\_PrimitiveWire.setState\_LineWidth() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:线宽
## Signature
```typescript
setState_LineWidth(lineWidth: number | null): ISCH_PrimitiveWire;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lineWidth
</td><td>
number \| null
</td><td>
线宽
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### setstate_net
# ISCH\_PrimitiveWire.setState\_Net() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置属性状态:网络名称
## Signature
```typescript
setState_Net(net: string): ISCH_PrimitiveWire;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### toasync
# ISCH\_PrimitiveWire.toAsync() method
将图元转换为异步图元
## Signature
```typescript
toAsync(): ISCH_PrimitiveWire;
```
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
### tosync
# ISCH\_PrimitiveWire.toSync() method
将图元转换为同步图元
## Signature
```typescript
toSync(): ISCH_PrimitiveWire;
```
## Returns
[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
导线图元对象
FILE:references/classes/LIB_3DModel.md
# LIB\_3DModel class
综合库 / 3D 模型类
## Signature
```typescript
declare class LIB_3DModel
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(modelUuid, libraryUuid, targetLibraryUuid, targetClassification, newModelName)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 复制 3D 模型
</td></tr>
<tr><td>
[create(libraryUuid, modelFile, classification, unit)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 创建 3D 模型
</td></tr>
<tr><td>
[delete(modelUuid, libraryUuid)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 删除 3D 模型
</td></tr>
<tr><td>
[get(modelUuid, libraryUuid)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 获取 3D 模型的所有属性
</td></tr>
<tr><td>
[modify(modelUuid, libraryUuid, modelName, classification, description)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 修改 3D 模型
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_3DModel.md)
</td><td>
</td><td>
**_(BETA)_** 搜索 3D 模型
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_3DModel.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制 3D 模型
## Signature
```typescript
copy(modelUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newModelName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
modelUuid
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newModelName
</td><td>
string
</td><td>
_(Optional)_ 新 3D 模型名称,如若目标库内存在重名 3D 模型将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新 3D 模型的 UUID
### create
# LIB\_3DModel.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建 3D 模型
## Signature
```typescript
create(libraryUuid: string, modelFile: Blob, classification?: ILIB_ClassificationIndex | Array<string>, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.METER | ESYS_Unit.MIL | ESYS_Unit.INCH): Promise<string[] | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
modelFile
</td><td>
Blob
</td><td>
3D 模型文件数据
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
unit
</td><td>
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.CENTIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.METER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md)
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<string\[\] \| undefined>
3D 模型 UUID
### delete
# LIB\_3DModel.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除 3D 模型
## Signature
```typescript
delete(modelUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
modelUuid
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_3DModel.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 3D 模型的所有属性
## Signature
```typescript
get(modelUuid: string, libraryUuid?: string): Promise<ILIB_3DModelItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
modelUuid
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_3DModelItem](../interfaces/ILIB_3DModelItem.md) \| undefined>
3D 模型属性
### modify
# LIB\_3DModel.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改 3D 模型
## Signature
```typescript
modify(modelUuid: string, libraryUuid: string, modelName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
modelUuid
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
modelName
</td><td>
string
</td><td>
_(Optional)_ 3D 模型名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### search
# LIB\_3DModel.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索 3D 模型
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_3DModelSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_3DModelSearchItem](../interfaces/ILIB_3DModelSearchItem.md)<!-- -->>>
搜索到的 3D 模型属性列表
FILE:references/classes/LIB_Cbb.md
# LIB\_Cbb class
综合库 / 复用模块类
## Signature
```typescript
declare class LIB_Cbb
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(cbbUuid, libraryUuid, targetLibraryUuid, targetClassification, newCbbName)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 复制复用模块
</td></tr>
<tr><td>
[create(libraryUuid, cbbName, classification, description)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 创建复用模块
</td></tr>
<tr><td>
[delete(cbbUuid, libraryUuid)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 删除复用模块
</td></tr>
<tr><td>
[get(cbbUuid, libraryUuid)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 获取复用模块的所有属性
</td></tr>
<tr><td>
[modify(cbbUuid, libraryUuid, cbbName, classification, description)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 修改复用模块
</td></tr>
<tr><td>
[openProjectInEditor(cbbUuid, libraryUuid)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 在编辑器打开复用模块工程
</td></tr>
<tr><td>
[openSymbolInEditor(cbbUuid, libraryUuid, splitScreenId)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 在编辑器打开复用模块符号
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_Cbb.md)
</td><td>
</td><td>
**_(BETA)_** 搜索复用模块
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_Cbb.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制复用模块
## Signature
```typescript
copy(cbbUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newCbbName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newCbbName
</td><td>
string
</td><td>
_(Optional)_ 新复用模块名称,如若目标库内存在重名复用模块将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新复用模块的 UUID
### create
# LIB\_Cbb.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建复用模块
## Signature
```typescript
create(libraryUuid: string, cbbName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
cbbName
</td><td>
string
</td><td>
复用模块名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
复用模块 UUID
### delete
# LIB\_Cbb.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除复用模块
## Signature
```typescript
delete(cbbUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_Cbb.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取复用模块的所有属性
## Signature
```typescript
get(cbbUuid: string, libraryUuid?: string): Promise<ILIB_CbbItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_CbbItem](../interfaces/ILIB_CbbItem.md) \| undefined>
复用模块属性
### modify
# LIB\_Cbb.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改复用模块
## Signature
```typescript
modify(cbbUuid: string, libraryUuid: string, cbbName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
cbbName
</td><td>
string
</td><td>
_(Optional)_ 复用模块名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### openprojectineditor
# LIB\_Cbb.openProjectInEditor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在编辑器打开复用模块工程
## Signature
```typescript
openProjectInEditor(cbbUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
## Remarks
本操作将会在 EDA 前端打开模块工程,如若原先已打开其它工程且有未保存的变更,执行本操作将直接丢失所有未保存的数据
### opensymbolineditor
# LIB\_Cbb.openSymbolInEditor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在编辑器打开复用模块符号
## Signature
```typescript
openSymbolInEditor(cbbUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,不填写则默认在最后输入焦点的分屏内打开,可以使用 [DMT\_EditorControl](./DMT_EditorControl.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,对应 [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->,可使用 [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) 获取到分屏 ID
### search
# LIB\_Cbb.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索复用模块
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_CbbSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_CbbSearchItem](../interfaces/ILIB_CbbSearchItem.md)<!-- -->>>
搜索到的复用模块属性列表
FILE:references/classes/LIB_Classification.md
# LIB\_Classification class
综合库 / 库分类索引类
## Signature
```typescript
declare class LIB_Classification
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createPrimary(libraryUuid, libraryType, primaryClassificationName)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 创建一级分类
</td></tr>
<tr><td>
[createSecondary(libraryUuid, libraryType, primaryClassificationUuid, secondaryClassificationName)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 创建二级分类
</td></tr>
<tr><td>
[deleteByIndex(classificationIndex)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 删除指定索引的分类
</td></tr>
<tr><td>
[deleteByUuid(libraryUuid, classificationUuid)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 删除指定 UUID 的分类
</td></tr>
<tr><td>
[getAllClassificationTree(libraryUuid, libraryType)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有分类信息组成的树
</td></tr>
<tr><td>
[getIndexByName(libraryUuid, libraryType, primaryClassificationName, secondaryClassificationName)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定名称的分类的分类索引
</td></tr>
<tr><td>
[getNameByIndex(classificationIndex)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定索引的分类的名称
</td></tr>
<tr><td>
[getNameByUuid(libraryUuid, libraryType, primaryClassificationUuid, secondaryClassificationUuid)](./LIB_Classification.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定 UUID 的分类的名称
</td></tr>
</tbody></table>
---
## 方法详情
### createprimary
# LIB\_Classification.createPrimary() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
创建一级分类
## Signature
```typescript
createPrimary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
primaryClassificationName
</td><td>
string
</td><td>
一级分类名称
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| undefined>
分类索引
### createsecondary
# LIB\_Classification.createSecondary() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
创建二级分类
## Signature
```typescript
createSecondary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
primaryClassificationUuid
</td><td>
string
</td><td>
一级分类 UUID
</td></tr>
<tr><td>
secondaryClassificationName
</td><td>
string
</td><td>
二级分类名称
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| undefined>
分类索引
### deletebyindex
# LIB\_Classification.deleteByIndex() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
删除指定索引的分类
## Signature
```typescript
deleteByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
classificationIndex
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md)
</td><td>
分类索引
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### deletebyuuid
# LIB\_Classification.deleteByUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除指定 UUID 的分类
## Signature
```typescript
deleteByUuid(libraryUuid: string, classificationUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
classificationUuid
</td><td>
string
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallclassificationtree
# LIB\_Classification.getAllClassificationTree() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有分类信息组成的树
## Signature
```typescript
getAllClassificationTree(libraryUuid: string, libraryType: ELIB_LibraryType): Promise<Array<{
name: string;
uuid: string;
children?: Array<{
name: string;
uuid: string;
}> | undefined;
}>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
</tbody></table>
## Returns
Promise<Array<{ name: string; uuid: string; children?: Array<{ name: string; uuid: string; }> \| undefined; }>>
分类信息组成的树结构数据
### getindexbyname
# LIB\_Classification.getIndexByName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
获取指定名称的分类的分类索引
## Signature
```typescript
getIndexByName(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string, secondaryClassificationName?: string): Promise<ILIB_ClassificationIndex | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
primaryClassificationName
</td><td>
string
</td><td>
一级分类名称
</td></tr>
<tr><td>
secondaryClassificationName
</td><td>
string
</td><td>
_(Optional)_ 二级分类名称
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| undefined>
分类索引
## Remarks
分类索引内包含分类的 UUID,具体可查阅 [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md)
### getnamebyindex
# LIB\_Classification.getNameByIndex() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
获取指定索引的分类的名称
## Signature
```typescript
getNameByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<{
primaryClassificationName: string;
secondaryClassificationName?: string | undefined;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
classificationIndex
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md)
</td><td>
分类索引
</td></tr>
</tbody></table>
## Returns
Promise<{ primaryClassificationName: string; secondaryClassificationName?: string \| undefined; } \| undefined>
两级分类的名称
### getnamebyuuid
# LIB\_Classification.getNameByUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取指定 UUID 的分类的名称
## Signature
```typescript
getNameByUuid(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationUuid?: string): Promise<{
primaryClassificationName: string;
secondaryClassificationName?: string | undefined;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
libraryType
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
primaryClassificationUuid
</td><td>
string
</td><td>
一级分类 UUID
</td></tr>
<tr><td>
secondaryClassificationUuid
</td><td>
string
</td><td>
_(Optional)_ 二级分类 UUID,如若不指定,则只获取一级分类的信息
</td></tr>
</tbody></table>
## Returns
Promise<{ primaryClassificationName: string; secondaryClassificationName?: string \| undefined; } \| undefined>
两级分类的名称
FILE:references/classes/LIB_Device.md
# LIB\_Device class
综合库 / 器件类
## Signature
```typescript
declare class LIB_Device
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(deviceUuid, libraryUuid, targetLibraryUuid, targetClassification, newDeviceName)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 复制器件
</td></tr>
<tr><td>
[create(libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 创建器件
</td></tr>
<tr><td>
[delete(deviceUuid, libraryUuid)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 删除器件
</td></tr>
<tr><td>
[get(deviceUuid, libraryUuid)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件的所有属性
</td></tr>
<tr><td>
[getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 使用立创 C 编号获取器件
</td></tr>
<tr><td>
[getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 使用立创 C 编号批量获取器件
</td></tr>
<tr><td>
[modify(deviceUuid, libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 修改器件
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Device.md)
</td><td>
</td><td>
**_(BETA)_** 搜索器件
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_Device.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制器件
## Signature
```typescript
copy(deviceUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newDeviceName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
deviceUuid
</td><td>
string
</td><td>
器件 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newDeviceName
</td><td>
string
</td><td>
_(Optional)_ 新器件名称,如若目标库内存在重名器件将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新器件的 UUID
### create
# LIB\_Device.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建器件
## Signature
```typescript
create(libraryUuid: string, deviceName: string, classification?: ILIB_ClassificationIndex | Array<string>, association?: {
symbolType?: ELIB_SymbolType;
symbolUuid?: string;
symbol?: {
uuid: string;
libraryUuid: string;
};
footprintUuid?: string;
footprint?: {
uuid: string;
libraryUuid: string;
};
model3D?: {
uuid: string;
libraryUuid: string;
};
imageData?: File | Blob;
}, description?: string, property?: ILIB_DeviceExtendPropertyItem): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
deviceName
</td><td>
string
</td><td>
器件名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
association
</td><td>
{ symbolType?: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; symbolUuid?: string; symbol?: { uuid: string; libraryUuid: string; }; footprintUuid?: string; footprint?: { uuid: string; libraryUuid: string; }; model3D?: { uuid: string; libraryUuid: string; }; imageData?: File \| Blob; }
</td><td>
_(Optional)_ 关联符号、封装、图像,指定 `symbolType` 则创建新符号,无需新建符号则无需指定 `symbolType`<!-- -->,但请注意,如若不新建符号也不指定符号的关联信息将无法创建器件
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
property
</td><td>
[ILIB\_DeviceExtendPropertyItem](../interfaces/ILIB_DeviceExtendPropertyItem.md)
</td><td>
_(Optional)_ 其它属性,仅 `designator`<!-- -->、`addIntoBom`<!-- -->、`addIntoPcb` 存在默认值
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
器件 UUID
### delete
# LIB\_Device.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除器件
## Signature
```typescript
delete(deviceUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
deviceUuid
</td><td>
string
</td><td>
器件 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_Device.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件的所有属性
## Signature
```typescript
get(deviceUuid: string, libraryUuid?: string): Promise<ILIB_DeviceItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
deviceUuid
</td><td>
string
</td><td>
器件 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| undefined>
器件属性
### getbylcscids
# LIB\_Device.getByLcscIds() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用立创 C 编号获取器件
## Signature
```typescript
getByLcscIds<T extends boolean>(lcscIds: string, libraryUuid?: string, allowMultiMatch?: T): Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lcscIds
</td><td>
string
</td><td>
立创 C 编号
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
allowMultiMatch
</td><td>
T
</td><td>
_(Optional)_ 是否允许单个立创 C 编号匹配多个结果
</td></tr>
</tbody></table>
## Returns
Promise<T extends true ? [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md) \| undefined : Array<[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->>>
搜索到的器件属性
## Remarks
默认情况下,如果在同一个库内匹配到多个相同 C 编号的器件,将只会返回第一个结果;
如果希望返回多个结果,请将 `allowMultiMatch` 置为 `true`<!-- -->;
私有化部署环境暂无法使用本接口
### getbylcscids_1
# LIB\_Device.getByLcscIds() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用立创 C 编号批量获取器件
## Signature
```typescript
getByLcscIds(lcscIds: Array<string>, libraryUuid?: string, allowMultiMatch?: boolean): Promise<Array<ILIB_DeviceSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
lcscIds
</td><td>
Array<string>
</td><td>
立创 C 编号数组
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
allowMultiMatch
</td><td>
boolean
</td><td>
_(Optional)_ 是否允许单个立创 C 编号匹配多个结果
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->>>
搜索到的器件属性的列表
## Remarks
默认情况下,如果在同一个库内匹配到多个相同 C 编号的器件,将只会返回第一个结果;
如果希望返回多个结果,请将 `allowMultiMatch` 置为 `true`<!-- -->;
私有化部署环境暂无法使用本接口
### modify
# LIB\_Device.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改器件
## Signature
```typescript
modify(deviceUuid: string, libraryUuid: string, deviceName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, association?: {
symbolUuid?: string;
symbol?: {
uuid: string;
libraryUuid: string;
};
footprintUuid?: string | null;
footprint?: {
uuid: string;
libraryUuid: string;
} | null;
model3D?: {
uuid: string;
libraryUuid: string;
} | null;
imageData?: File | Blob | null;
}, description?: string | null, property?: {
name?: string | null;
designator?: string;
addIntoBom?: boolean;
addIntoPcb?: boolean;
net?: string;
manufacturer?: string | null;
manufacturerId?: string | null;
supplier?: string | null;
supplierId?: string | null;
otherProperty?: {
[key: string]: boolean | number | string | undefined | null;
};
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
deviceUuid
</td><td>
string
</td><td>
器件 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
deviceName
</td><td>
string
</td><td>
_(Optional)_ 器件名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
association
</td><td>
\{ symbolUuid?: string; symbol?: \{ uuid: string; libraryUuid: string; \}; footprintUuid?: string \| null; footprint?: \{ uuid: string; libraryUuid: string; \} \| null; model3D?: \{ uuid: string; libraryUuid: string; \} \| null; imageData?: File \| Blob \| null; \}
</td><td>
_(Optional)_ 关联符号、封装、图像
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
property
</td><td>
\{ name?: string \| null; designator?: string; addIntoBom?: boolean; addIntoPcb?: boolean; net?: string; manufacturer?: string \| null; manufacturerId?: string \| null; supplier?: string \| null; supplierId?: string \| null; otherProperty?: \{ \[key: string\]: boolean \| number \| string \| undefined \| null; \}; \}
</td><td>
_(Optional)_ 其它属性
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### search
# LIB\_Device.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索器件
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_DeviceSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
symbolType
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
_(Optional)_ 符号类型,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->>>
搜索到的器件属性的列表
FILE:references/classes/LIB_Footprint.md
# LIB\_Footprint class
综合库 / 封装类
## Signature
```typescript
declare class LIB_Footprint
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(footprintUuid, libraryUuid, targetLibraryUuid, targetClassification, newFootprintName)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 复制封装
</td></tr>
<tr><td>
[create(libraryUuid, footprintName, classification, description)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 创建封装
</td></tr>
<tr><td>
[delete(footprintUuid, libraryUuid)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 删除封装
</td></tr>
<tr><td>
[get(footprintUuid, libraryUuid)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 获取封装的所有属性
</td></tr>
<tr><td>
[getRenderImage(source)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 获取封装渲染图
</td></tr>
<tr><td>
[modify(footprintUuid, libraryUuid, footprintName, classification, description)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 修改封装
</td></tr>
<tr><td>
[openInEditor(footprintUuid, libraryUuid, splitScreenId)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 在编辑器打开文档
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 搜索封装
</td></tr>
<tr><td>
[updateDocumentSource(footprintUuid, libraryUuid, documentSource)](./LIB_Footprint.md)
</td><td>
</td><td>
**_(BETA)_** 更新封装的文档源码
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_Footprint.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制封装
## Signature
```typescript
copy(footprintUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newFootprintName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newFootprintName
</td><td>
string
</td><td>
_(Optional)_ 新封装名称,如若目标库内存在重名封装将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新封装的 UUID
### create
# LIB\_Footprint.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建封装
## Signature
```typescript
create(libraryUuid: string, footprintName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
footprintName
</td><td>
string
</td><td>
封装名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
封装 UUID
### delete
# LIB\_Footprint.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除封装
## Signature
```typescript
delete(footprintUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_Footprint.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取封装的所有属性
## Signature
```typescript
get(footprintUuid: string, libraryUuid?: string): Promise<ILIB_FootprintItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_FootprintItem](../interfaces/ILIB_FootprintItem.md) \| undefined>
封装属性
### getrenderimage
# LIB\_Footprint.getRenderImage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取封装渲染图
## Signature
```typescript
getRenderImage(source: {
footprintUuid: string;
libraryUuid: string;
}): Promise<Blob | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
source
</td><td>
\{ footprintUuid: string; libraryUuid: string; \}
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<Blob \| undefined>
封装渲染图
### modify
# LIB\_Footprint.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改封装
## Signature
```typescript
modify(footprintUuid: string, libraryUuid: string, footprintName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
footprintName
</td><td>
string
</td><td>
_(Optional)_ 封装名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### openineditor
# LIB\_Footprint.openInEditor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在编辑器打开文档
## Signature
```typescript
openInEditor(footprintUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,不填写则默认在最后输入焦点的分屏内打开,可以使用 [DMT\_EditorControl](./DMT_EditorControl.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,对应 [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->,可使用 [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) 获取到分屏 ID
### search
# LIB\_Footprint.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索封装
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_FootprintSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)<!-- -->>>
搜索到的封装属性列表
### updatedocumentsource
# LIB\_Footprint.updateDocumentSource() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
更新封装的文档源码
## Signature
```typescript
updateDocumentSource(footprintUuid: string, libraryUuid: string, documentSource: string): Promise<boolean | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
documentSource
</td><td>
string
</td><td>
文档源码
</td></tr>
</tbody></table>
## Returns
Promise<boolean \| undefined>
是否更新成功
FILE:references/classes/LIB_LibrariesList.md
# LIB\_LibrariesList class
综合库 / 库列表类
## Signature
```typescript
declare class LIB_LibrariesList
```
## Remarks
此处所有接口都基于编辑器当前工作区环境,如需切换到其他工作区,请使用 [DMT\_Workspace.toggleToWorkspace()](./DMT_Workspace.md) 接口切换工作区
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getAllLibrariesList()](./LIB_LibrariesList.md)
</td><td>
</td><td>
获取所有库的列表
</td></tr>
<tr><td>
[getFavoriteLibraryUuid()](./LIB_LibrariesList.md)
</td><td>
</td><td>
获取收藏库的 UUID
</td></tr>
<tr><td>
[getPersonalLibraryUuid()](./LIB_LibrariesList.md)
</td><td>
</td><td>
获取个人库的 UUID
</td></tr>
<tr><td>
[getProjectLibraryUuid()](./LIB_LibrariesList.md)
</td><td>
</td><td>
获取工程库的 UUID
</td></tr>
<tr><td>
[getSystemLibraryUuid()](./LIB_LibrariesList.md)
</td><td>
</td><td>
获取系统库的 UUID
</td></tr>
</tbody></table>
---
## 方法详情
### getalllibrarieslist
# LIB\_LibrariesList.getAllLibrariesList() method
获取所有库的列表
## Signature
```typescript
getAllLibrariesList(): Promise<Array<ILIB_LibraryInfo>>;
```
## Returns
Promise<Array<[ILIB\_LibraryInfo](../interfaces/ILIB_LibraryInfo.md)<!-- -->>>
库信息列表
## Remarks
此处不会获取到系统库、个人库、工程库、收藏库的信息,如需获取它们的信息,请使用 [getSystemLibraryUuid](./LIB_LibrariesList.md)<!-- -->、[getPersonalLibraryUuid](./LIB_LibrariesList.md)<!-- -->、[getProjectLibraryUuid](./LIB_LibrariesList.md)<!-- -->、[getFavoriteLibraryUuid](./LIB_LibrariesList.md) 接口
### getfavoritelibraryuuid
# LIB\_LibrariesList.getFavoriteLibraryUuid() method
获取收藏库的 UUID
## Signature
```typescript
getFavoriteLibraryUuid(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
收藏库的 UUID
## Remarks
将会获取当前编辑器工作区下的收藏库的 UUID
### getpersonallibraryuuid
# LIB\_LibrariesList.getPersonalLibraryUuid() method
获取个人库的 UUID
## Signature
```typescript
getPersonalLibraryUuid(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
个人库的 UUID
## Remarks
将会获取当前编辑器工作区下的个人库的 UUID,在私有部署环境下不存在个人库,此接口将永远返回 `undefined`
### getprojectlibraryuuid
# LIB\_LibrariesList.getProjectLibraryUuid() method
获取工程库的 UUID
## Signature
```typescript
getProjectLibraryUuid(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
工程库的 UUID
## Remarks
在未打开工程的情况下调用将返回 `undefined`
### getsystemlibraryuuid
# LIB\_LibrariesList.getSystemLibraryUuid() method
获取系统库的 UUID
## Signature
```typescript
getSystemLibraryUuid(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
系统库的 UUID
FILE:references/classes/LIB_PanelLibrary.md
# LIB\_PanelLibrary class
综合库 / 面板库类
## Signature
```typescript
declare class LIB_PanelLibrary
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(panelLibraryUuid, libraryUuid, targetLibraryUuid, targetClassification, newPanelLibraryName)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 复制面板库
</td></tr>
<tr><td>
[create(libraryUuid, panelLibraryName, classification, description)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 创建面板库
</td></tr>
<tr><td>
[delete(panelLibraryUuid, libraryUuid)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 删除面板库
</td></tr>
<tr><td>
[get(panelLibraryUuid, libraryUuid)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 获取面板库的所有属性
</td></tr>
<tr><td>
[modify(panelLibraryUuid, libraryUuid, panelLibraryName, classification, description)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 修改面板库
</td></tr>
<tr><td>
[openInEditor(panelLibraryUuid, libraryUuid, splitScreenId)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 在编辑器打开文档
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_PanelLibrary.md)
</td><td>
</td><td>
**_(BETA)_** 搜索面板库
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_PanelLibrary.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制面板库
## Signature
```typescript
copy(panelLibraryUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newPanelLibraryName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newPanelLibraryName
</td><td>
string
</td><td>
_(Optional)_ 新面板库名称,如若目标库内存在重名面板库将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新面板库的 UUID
### create
# LIB\_PanelLibrary.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建面板库
## Signature
```typescript
create(libraryUuid: string, panelLibraryName: string, classification?: ILIB_ClassificationIndex | Array<string>, description?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
panelLibraryName
</td><td>
string
</td><td>
面板库名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
面板库 UUID
### delete
# LIB\_PanelLibrary.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除面板库
## Signature
```typescript
delete(panelLibraryUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_PanelLibrary.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取面板库的所有属性
## Signature
```typescript
get(panelLibraryUuid: string, libraryUuid?: string): Promise<ILIB_PanelLibraryItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_PanelLibraryItem](../interfaces/ILIB_PanelLibraryItem.md) \| undefined>
面板库属性
### modify
# LIB\_PanelLibrary.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改面板库
## Signature
```typescript
modify(panelLibraryUuid: string, libraryUuid: string, panelLibraryName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
panelLibraryName
</td><td>
string
</td><td>
_(Optional)_ 面板库名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### openineditor
# LIB\_PanelLibrary.openInEditor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在编辑器打开文档
## Signature
```typescript
openInEditor(panelLibraryUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,不填写则默认在最后输入焦点的分屏内打开,可以使用 [DMT\_EditorControl](./DMT_EditorControl.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,对应 [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->,可使用 [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) 获取到分屏 ID
### search
# LIB\_PanelLibrary.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索面板库
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, itemsOfPage?: number, page?: number): Promise<Array<ILIB_PanelLibrarySearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_PanelLibrarySearchItem](../interfaces/ILIB_PanelLibrarySearchItem.md)<!-- -->>>
搜索到的面板库属性列表
FILE:references/classes/LIB_SelectControl.md
# LIB\_SelectControl class
综合库 / 选择控制类
## Signature
```typescript
declare class LIB_SelectControl
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getSelectedLibraryRowInfo()](./LIB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前底部库选中行的信息
</td></tr>
</tbody></table>
---
## 方法详情
### getselectedlibraryrowinfo
# LIB\_SelectControl.getSelectedLibraryRowInfo() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前底部库选中行的信息
## Signature
```typescript
getSelectedLibraryRowInfo(): Promise<ILIB_LibraryItem | undefined>;
```
## Returns
Promise<[ILIB\_LibraryItem](../interfaces/ILIB_LibraryItem.md) \| undefined>
库属性对象,如若为 `undefined` 则获取失败
## Remarks
将会获取当前底部库选中行的库类型、UUID、所属库 UUID
FILE:references/classes/LIB_Symbol.md
# LIB\_Symbol class
综合库 / 符号类
## Signature
```typescript
declare class LIB_Symbol
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[copy(symbolUuid, libraryUuid, targetLibraryUuid, targetClassification, newSymbolName)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 复制符号
</td></tr>
<tr><td>
[create(libraryUuid, symbolName, classification, symbolType, description)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 创建符号
</td></tr>
<tr><td>
[delete(symbolUuid, libraryUuid)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 删除符号
</td></tr>
<tr><td>
[get(symbolUuid, libraryUuid)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 获取符号的所有属性
</td></tr>
<tr><td>
[getRenderImage(source)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 获取符号渲染图
</td></tr>
<tr><td>
[modify(symbolUuid, libraryUuid, symbolName, classification, description)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 修改符号
</td></tr>
<tr><td>
[openInEditor(symbolUuid, libraryUuid, splitScreenId)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 在编辑器打开文档
</td></tr>
<tr><td>
[search(key, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 搜索符号
</td></tr>
<tr><td>
[updateDocumentSource(symbolUuid, libraryUuid, documentSource)](./LIB_Symbol.md)
</td><td>
</td><td>
**_(BETA)_** 更新符号的文档源码
</td></tr>
</tbody></table>
---
## 方法详情
### copy
# LIB\_Symbol.copy() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
复制符号
## Signature
```typescript
copy(symbolUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array<string>, newSymbolName?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
targetLibraryUuid
</td><td>
string
</td><td>
目标库 UUID
</td></tr>
<tr><td>
targetClassification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 目标库内的分类
</td></tr>
<tr><td>
newSymbolName
</td><td>
string
</td><td>
_(Optional)_ 新符号名称,如若目标库内存在重名符号将导致复制失败
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
目标库内新符号的 UUID
### create
# LIB\_Symbol.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建符号
## Signature
```typescript
create(libraryUuid: string, symbolName: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, description?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
symbolName
</td><td>
string
</td><td>
符号名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
symbolType
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
_(Optional)_ 符号类型
</td></tr>
<tr><td>
description
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
符号 UUID
### delete
# LIB\_Symbol.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除符号
## Signature
```typescript
delete(symbolUuid: string, libraryUuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### get
# LIB\_Symbol.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取符号的所有属性
## Signature
```typescript
get(symbolUuid: string, libraryUuid?: string): Promise<ILIB_SymbolItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<[ILIB\_SymbolItem](../interfaces/ILIB_SymbolItem.md) \| undefined>
符号属性
### getrenderimage
# LIB\_Symbol.getRenderImage() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取符号渲染图
## Signature
```typescript
getRenderImage(source: {
symbolUuid: string;
libraryUuid: string;
subPartName?: string;
}): Promise<Blob | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
source
</td><td>
\{ symbolUuid: string; libraryUuid: string; subPartName?: string; \}
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<Blob \| undefined>
符号渲染图
### modify
# LIB\_Symbol.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改符号
## Signature
```typescript
modify(symbolUuid: string, libraryUuid: string, symbolName?: string, classification?: ILIB_ClassificationIndex | Array<string> | null, description?: string | null): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
symbolName
</td><td>
string
</td><td>
_(Optional)_ 符号名称
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string> \| null
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
description
</td><td>
string \| null
</td><td>
_(Optional)_ 描述
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
如希望清除某些属性,则将其的值设置为 `null`
### openineditor
# LIB\_Symbol.openInEditor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在编辑器打开文档
## Signature
```typescript
openInEditor(symbolUuid: string, libraryUuid: string, splitScreenId?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
splitScreenId
</td><td>
string
</td><td>
_(Optional)_ 分屏 ID,不填写则默认在最后输入焦点的分屏内打开,可以使用 [DMT\_EditorControl](./DMT_EditorControl.md) 内的接口获取
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
标签页 ID,对应 [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->,可使用 [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) 获取到分屏 ID
### search
# LIB\_Symbol.search() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
搜索符号
## Signature
```typescript
search(key: string, libraryUuid?: string, classification?: ILIB_ClassificationIndex | Array<string>, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number): Promise<Array<ILIB_SymbolSearchItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
搜索关键字
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
classification
</td><td>
[ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类,默认为全部
</td></tr>
<tr><td>
symbolType
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
_(Optional)_ 符号类型,默认为全部
</td></tr>
<tr><td>
itemsOfPage
</td><td>
number
</td><td>
_(Optional)_ 一页搜索结果的数量
</td></tr>
<tr><td>
page
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ILIB\_SymbolSearchItem](../interfaces/ILIB_SymbolSearchItem.md)<!-- -->>>
搜索到的符号属性列表
### updatedocumentsource
# LIB\_Symbol.updateDocumentSource() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
更新符号的文档源码
## Signature
```typescript
updateDocumentSource(symbolUuid: string, libraryUuid: string, documentSource: string): Promise<boolean | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
symbolUuid
</td><td>
string
</td><td>
符号 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
documentSource
</td><td>
string
</td><td>
文档源码
</td></tr>
</tbody></table>
## Returns
Promise<boolean \| undefined>
是否更新成功
FILE:references/classes/PCB_Document.md
# PCB\_Document class
PCB & 封装 / 文档操作类
## Signature
```typescript
declare class PCB_Document
```
## Remarks
对设计文档总体进行的操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertCanvasOriginToDataOrigin(x, y)](./PCB_Document.md)
</td><td>
</td><td>
输入画布坐标返回该坐标对应的数据坐标
</td></tr>
<tr><td>
[convertDataOriginToCanvasOrigin(x, y)](./PCB_Document.md)
</td><td>
</td><td>
输入数据坐标返回该坐标对应的画布坐标
</td></tr>
<tr><td>
[getCalculatingRatlineStatus()](./PCB_Document.md)
</td><td>
</td><td>
获取当前飞线计算功能状态
</td></tr>
<tr><td>
[getCanvasOrigin()](./PCB_Document.md)
</td><td>
</td><td>
获取画布原点相对于数据原点的偏移坐标
</td></tr>
<tr><td>
[getCurrentFilterConfiguration()](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前画布过滤器配置
</td></tr>
<tr><td>
[getPrimitiveAtPoint(x, y)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 获取坐标点的图元
</td></tr>
<tr><td>
[getPrimitivesInRegion(left, right, top, bottom, leftToRight)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 获取区域内所有图元
</td></tr>
<tr><td>
[importAutoLayoutJsonFile(autoLayoutFile)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 导入自动布局文件(JSON)
</td></tr>
<tr><td>
[importAutoRouteJsonFile(autoRouteFile)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 导入自动布线文件(JSON)
</td></tr>
<tr><td>
[importAutoRouteSesFile(autoRouteFile)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 导入自动布线文件(SES)
</td></tr>
<tr><td>
[importChanges(uuid)](./PCB_Document.md)
</td><td>
</td><td>
从原理图导入变更
</td></tr>
<tr><td>
[navigateToCoordinates(x, y)](./PCB_Document.md)
</td><td>
</td><td>
定位到画布坐标
</td></tr>
<tr><td>
[navigateToRegion(left, right, top, bottom)](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 定位到画布区域
</td></tr>
<tr><td>
[save(uuid)](./PCB_Document.md)
</td><td>
</td><td>
保存文档
</td></tr>
<tr><td>
[setCanvasOrigin(offsetX, offsetY)](./PCB_Document.md)
</td><td>
</td><td>
设置画布原点相对于数据原点的偏移坐标
</td></tr>
<tr><td>
[startCalculatingRatline()](./PCB_Document.md)
</td><td>
</td><td>
启动飞线计算功能
</td></tr>
<tr><td>
[stopCalculatingRatline()](./PCB_Document.md)
</td><td>
</td><td>
停止飞线计算功能
</td></tr>
<tr><td>
[zoomToBoardOutline()](./PCB_Document.md)
</td><td>
</td><td>
**_(BETA)_** 缩放到板框(适应板框)
</td></tr>
</tbody></table>
---
## 方法详情
### convertcanvasorigintodataorigin
# PCB\_Document.convertCanvasOriginToDataOrigin() method
输入画布坐标返回该坐标对应的数据坐标
## Signature
```typescript
convertCanvasOriginToDataOrigin(x: number, y: number): Promise<{
x: number;
y: number;
}>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<{ x: number; y: number; }>
数据原点坐标
## Remarks
嘉立创 EDA 前端显示的坐标均为画布原点;嘉立创 EDA API 使用的均为数据原点;在创建 PCB 时,默认画布原点等于数据原点
### convertdataorigintocanvasorigin
# PCB\_Document.convertDataOriginToCanvasOrigin() method
输入数据坐标返回该坐标对应的画布坐标
## Signature
```typescript
convertDataOriginToCanvasOrigin(x: number, y: number): Promise<{
x: number;
y: number;
}>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
数据原点 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
数据原点 Y
</td></tr>
</tbody></table>
## Returns
Promise<{ x: number; y: number; }>
画布原点坐标
## Remarks
嘉立创 EDA 前端显示的坐标均为画布原点;嘉立创 EDA API 使用的均为数据原点;在创建 PCB 时,默认画布原点等于数据原点
### getcalculatingratlinestatus
# PCB\_Document.getCalculatingRatlineStatus() method
获取当前飞线计算功能状态
## Signature
```typescript
getCalculatingRatlineStatus(): Promise<EPCB_DocumentRatlineCalculatingActiveStatus>;
```
## Returns
Promise<[EPCB\_DocumentRatlineCalculatingActiveStatus](../enums/EPCB_DocumentRatlineCalculatingActiveStatus.md)<!-- -->>
功能状态
### getcanvasorigin
# PCB\_Document.getCanvasOrigin() method
获取画布原点相对于数据原点的偏移坐标
## Signature
```typescript
getCanvasOrigin(): Promise<{
offsetX: number;
offsetY: number;
}>;
```
## Returns
Promise<{ offsetX: number; offsetY: number; }>
画布原点相对于数据原点的偏移坐标
## Remarks
嘉立创 EDA 专业版前端显示的坐标均为画布原点;
嘉立创 EDA 专业版 API 使用的均为数据原点;
如果返回的数据为 `{ canvasOriginOffsetX: 100, canvasOriginOffsetY: 200 }`<!-- -->, 则代表画布原点在数据原点的向右 100 单位且向上 200 单位的位置;
此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
### getcurrentfilterconfiguration
# PCB\_Document.getCurrentFilterConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前画布过滤器配置
## Signature
```typescript
getCurrentFilterConfiguration(): Promise<{
[key: string]: any;
} | undefined>;
```
## Returns
Promise<{ \[key: string\]: any; } \| undefined>
当前画布过滤器配置,`undefined` 为获取失败
### getprimitiveatpoint
# PCB\_Document.getPrimitiveAtPoint() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取坐标点的图元
## Signature
```typescript
getPrimitiveAtPoint(x: number, y: number): Promise<IPCB_Primitive | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标点 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标点 Y
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_Primitive](../interfaces/IPCB_Primitive.md) \| undefined>
坐标点的图元,如若坐标点无法找到图元,将返回 `undefined`
## Remarks
本操作和前端鼠标点击操作类似,将会获取指定坐标点上的图元
### getprimitivesinregion
# PCB\_Document.getPrimitivesInRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取区域内所有图元
## Signature
```typescript
getPrimitivesInRegion(left: number, right: number, top: number, bottom: number, leftToRight?: boolean): Promise<Array<IPCB_Primitive>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
left
</td><td>
number
</td><td>
矩形框第一 X 坐标
</td></tr>
<tr><td>
right
</td><td>
number
</td><td>
矩形框第二 X 坐标
</td></tr>
<tr><td>
top
</td><td>
number
</td><td>
矩形框第一 Y 坐标
</td></tr>
<tr><td>
bottom
</td><td>
number
</td><td>
矩形框第二 Y 坐标
</td></tr>
<tr><td>
leftToRight
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅获取完全框选的图元,`false` 则触碰即获取
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_Primitive](../interfaces/IPCB_Primitive.md)<!-- -->>>
区域内所有图元
### importautolayoutjsonfile
# PCB\_Document.importAutoLayoutJsonFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
导入自动布局文件(JSON)
## Signature
```typescript
importAutoLayoutJsonFile(autoLayoutFile: File): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
autoLayoutFile
</td><td>
File
</td><td>
欲导入的 JSON 文件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
导入操作是否成功
## Remarks
可以使用 读入文件
### importautoroutejsonfile
# PCB\_Document.importAutoRouteJsonFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
导入自动布线文件(JSON)
## Signature
```typescript
importAutoRouteJsonFile(autoRouteFile: File): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
autoRouteFile
</td><td>
File
</td><td>
欲导入的 JSON 文件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
导入操作是否成功
## Remarks
可以使用 读入文件
### importautoroutesesfile
# PCB\_Document.importAutoRouteSesFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
导入自动布线文件(SES)
## Signature
```typescript
importAutoRouteSesFile(autoRouteFile: File): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
autoRouteFile
</td><td>
File
</td><td>
欲导入的 SES 文件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
导入操作是否成功
## Remarks
可以使用 读入文件
### importchanges
# PCB\_Document.importChanges() method
从原理图导入变更
## Signature
```typescript
importChanges(uuid?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uuid
</td><td>
string
</td><td>
_(Optional)_ 原理图 UUID,默认为关联在同一个 Board 下的原理图
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
导入操作是否成功,导入失败或未传入原理图 UUID 的游离 PCB 将返回 `false`
### navigatetocoordinates
# PCB\_Document.navigateToCoordinates() method
定位到画布坐标
## Signature
```typescript
navigateToCoordinates(x: number, y: number): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口在前端画布上定位到指定的数据层面坐标;
如果希望在进行本操作时前端画布坐标能与传入数据一致, 建议调用 [PCB\_Document.setCanvasOrigin()](./PCB_Document.md) 方法并设置偏移量为零;
此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
### navigatetoregion
# PCB\_Document.navigateToRegion() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
定位到画布区域
## Signature
```typescript
navigateToRegion(left: number, right: number, top: number, bottom: number): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
left
</td><td>
number
</td><td>
矩形框第一 X 坐标
</td></tr>
<tr><td>
right
</td><td>
number
</td><td>
矩形框第二 X 坐标
</td></tr>
<tr><td>
top
</td><td>
number
</td><td>
矩形框第一 Y 坐标
</td></tr>
<tr><td>
bottom
</td><td>
number
</td><td>
矩形框第二 Y 坐标
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口在前端画布上定位到指定的区域,区域数据为相对于数据原点的偏移;
例如:传入数据为 `{left: 0, right: 60, top: 100, bottom: -20}` =<!-- -->> `navigateToRegion(0, 60, 100, -20)`<!-- -->, 则画布将会定位到以 `[30, 40]` 为中心的,`x` 轴方向长度为 `60`<!-- -->,`y` 轴方向长度为 `120` 的矩形范围;
本接口不进行缩放操作,但会生成指示定位中心及表示区域范围的矩形框;
此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
### save
# PCB\_Document.save() method
保存文档
## Signature
```typescript
save(uuid: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uuid
</td><td>
string
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
保存操作是否成功,保存失败、上传失败等错误均返回 `false`
### setcanvasorigin
# PCB\_Document.setCanvasOrigin() method
设置画布原点相对于数据原点的偏移坐标
## Signature
```typescript
setCanvasOrigin(offsetX: number, offsetY: number): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
offsetX
</td><td>
number
</td><td>
画布原点相对于数据原点的 X 坐标偏移
</td></tr>
<tr><td>
offsetY
</td><td>
number
</td><td>
画布原点相对于数据原点的 Y 坐标偏移
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
嘉立创 EDA 专业版前端显示的坐标均为画布原点;
嘉立创 EDA 专业版 API 使用的均为数据原点;
如果希望在 API 操作时前端画布坐标能与数据一致, 建议调用本方法并设置偏移量为零, 即 `setCanvasOrigin(0, 0)`<!-- -->;
此处的单位为数据层面单位,在跨度上等同于画布层面的 mil
### startcalculatingratline
# PCB\_Document.startCalculatingRatline() method
启动飞线计算功能
## Signature
```typescript
startCalculatingRatline(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
在启动时将会触发一次飞线计算
### stopcalculatingratline
# PCB\_Document.stopCalculatingRatline() method
停止飞线计算功能
## Signature
```typescript
stopCalculatingRatline(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
### zoomtoboardoutline
# PCB\_Document.zoomToBoardOutline() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
缩放到板框(适应板框)
## Signature
```typescript
zoomToBoardOutline(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
FILE:references/classes/PCB_Drc.md
# PCB\_Drc class
PCB & 封装 / 设计规则检查(DRC)类
## Signature
```typescript
declare class PCB_Drc
```
## Remarks
检查、设定 DRC 规则
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addNetToEqualLengthNetGroup(equalLengthNetGroupName, net)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 将网络添加到等长网络组
</td></tr>
<tr><td>
[addNetToNetClass(netClassName, net)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 将网络添加到网络类
</td></tr>
<tr><td>
[addPadPairToPadPairGroup(padPairGroupName, padPair)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 将焊盘对添加到焊盘对组
</td></tr>
<tr><td>
[check(strict, userInterface, includeVerboseError)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 检查 DRC
</td></tr>
<tr><td>
[check(strict, userInterface, includeVerboseError)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 检查 DRC
</td></tr>
<tr><td>
[createDifferentialPair(differentialPairName, positiveNet, negativeNet)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 创建差分对
</td></tr>
<tr><td>
[createEqualLengthNetGroup(equalLengthNetGroupName, nets, color)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 创建等长网络组
</td></tr>
<tr><td>
[createNetClass(netClassName, nets, color)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 创建网络类
</td></tr>
<tr><td>
[createPadPairGroup(padPairGroupName, padPairs)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 创建焊盘对组
</td></tr>
<tr><td>
[deleteDifferentialPair(differentialPairName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 删除差分对
</td></tr>
<tr><td>
[deleteEqualLengthNetGroup(equalLengthNetGroupName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 删除等长网络组
</td></tr>
<tr><td>
[deleteNetClass(netClassName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 删除网络类
</td></tr>
<tr><td>
[deletePadPairGroup(padPairGroupName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 删除焊盘对组
</td></tr>
<tr><td>
[deleteRuleConfiguration(configurationName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 删除设计规则配置
</td></tr>
<tr><td>
[getAllDifferentialPairs()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有差分对的详细属性
</td></tr>
<tr><td>
[getAllEqualLengthNetGroups()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有等长网络组的详细属性
</td></tr>
<tr><td>
[getAllNetClasses()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有网络类的详细属性
</td></tr>
<tr><td>
[getAllPadPairGroups()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有焊盘对组的详细属性
</td></tr>
<tr><td>
[getAllRuleConfigurations(includeSystem)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有设计规则配置
</td></tr>
<tr><td>
[getCurrentRuleConfiguration()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前设计规则配置
</td></tr>
<tr><td>
[getCurrentRuleConfigurationName()](./PCB_Drc.md)
</td><td>
</td><td>
获取当前设计规则配置名称
</td></tr>
<tr><td>
[getDefaultRuleConfigurationName()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取新建 PCB 默认设计规则配置的名称
</td></tr>
<tr><td>
[getNetByNetRules()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取网络-网络规则
</td></tr>
<tr><td>
[getNetRules()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取网络规则
</td></tr>
<tr><td>
[getPadPairGroupMinWireLength(padPairGroupName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取焊盘对组最短导线长度
</td></tr>
<tr><td>
[getRegionRules()](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 获取区域规则
</td></tr>
<tr><td>
[getRuleConfiguration(configurationName)](./PCB_Drc.md)
</td><td>
</td><td>
获取指定设计规则配置
</td></tr>
<tr><td>
[modifyDifferentialPairName(originalDifferentialPairName, differentialPairName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改差分对的名称
</td></tr>
<tr><td>
[modifyDifferentialPairNegativeNet(differentialPairName, negativeNet)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改差分对负网络
</td></tr>
<tr><td>
[modifyDifferentialPairPositiveNet(differentialPairName, positiveNet)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改差分对正网络
</td></tr>
<tr><td>
[modifyEqualLengthNetGroupName(originalEqualLengthNetGroupName, equalLengthNetGroupName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改等长网络组的名称
</td></tr>
<tr><td>
[modifyNetClassName(originalNetClassName, netClassName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改网络类的名称
</td></tr>
<tr><td>
[modifyPadPairGroupName(originalPadPairGroupName, padPairGroupName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 修改焊盘对组的名称
</td></tr>
<tr><td>
[overwriteCurrentRuleConfiguration(ruleConfiguration)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 覆写目前规则配置
</td></tr>
<tr><td>
[overwriteNetByNetRules(netByNetRules)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 覆写网络-网络规则
</td></tr>
<tr><td>
[overwriteNetRules(netRules)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 覆写网络规则
</td></tr>
<tr><td>
[overwriteRegionRules(regionRules)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 覆写区域规则
</td></tr>
<tr><td>
[removeNetFromEqualLengthNetGroup(equalLengthNetGroupName, net)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 从等长网络组中移除网络
</td></tr>
<tr><td>
[removeNetFromNetClass(netClassName, net)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 从网络类中移除网络
</td></tr>
<tr><td>
[removePadPairFromPadPairGroup(padPairGroupName, padPair)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 从焊盘对组中移除焊盘对
</td></tr>
<tr><td>
[renameRuleConfiguration(originalConfigurationName, configurationName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 重命名设计规则配置
</td></tr>
<tr><td>
[saveRuleConfiguration(ruleConfiguration, configurationName, allowOverwrite)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 保存设计规则配置
</td></tr>
<tr><td>
[setAsDefaultRuleConfiguration(configurationName)](./PCB_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 设置为新建 PCB 默认设计规则配置
</td></tr>
</tbody></table>
---
## 方法详情
### addnettoequallengthnetgroup
# PCB\_Drc.addNetToEqualLengthNetGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将网络添加到等长网络组
## Signature
```typescript
addNetToEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
equalLengthNetGroupName
</td><td>
string
</td><td>
等长网络组名称
</td></tr>
<tr><td>
net
</td><td>
string \| Array<string>
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### addnettonetclass
# PCB\_Drc.addNetToNetClass() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将网络添加到网络类
## Signature
```typescript
addNetToNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netClassName
</td><td>
string
</td><td>
网络类名称
</td></tr>
<tr><td>
net
</td><td>
string \| Array<string>
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### addpadpairtopadpairgroup
# PCB\_Drc.addPadPairToPadPairGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将焊盘对添加到焊盘对组
## Signature
```typescript
addPadPairToPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padPairGroupName
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
<tr><td>
padPair
</td><td>
\[string, string\] \| Array<\[string, string\]>
</td><td>
焊盘对
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Example
有三种不同的用法,确保画布上已有对应的焊盘。 分别是 一,游离焊盘-游离焊盘;二,器件焊盘 - 器件焊盘;三,器件焊盘 - 游离焊盘 await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['e0','e1'\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['R1:1','R1:2'\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.addPadPairToPadPairGroup('test',\['R1:1','e1'\]) // 器件焊盘 - 游离焊盘
### check
# PCB\_Drc.check() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
检查 DRC
## Signature
```typescript
check(strict: boolean, userInterface: boolean, includeVerboseError: false): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
strict
</td><td>
boolean
</td><td>
是否严格检查,当前 PCB 统一为严格检查模式
</td></tr>
<tr><td>
userInterface
</td><td>
boolean
</td><td>
是否显示 UI(呼出底部 DRC 窗口)
</td></tr>
<tr><td>
includeVerboseError
</td><td>
false
</td><td>
是否在返回值中包含详细错误信息,如若为 `true`<!-- -->,则返回值将始终为数组
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
DRC 检查是否通过
### check_1
# PCB\_Drc.check() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
检查 DRC
## Signature
```typescript
check(strict: boolean, userInterface: boolean, includeVerboseError: true): Promise<Array<any>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
strict
</td><td>
boolean
</td><td>
是否严格检查,当前 PCB 统一为严格检查模式
</td></tr>
<tr><td>
userInterface
</td><td>
boolean
</td><td>
是否显示 UI(呼出底部 DRC 窗口)
</td></tr>
<tr><td>
includeVerboseError
</td><td>
true
</td><td>
是否在返回值中包含详细错误信息,如若为 `true`<!-- -->,则返回值将始终为数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<any>>
DRC 检查的详细结果
### createdifferentialpair
# PCB\_Drc.createDifferentialPair() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建差分对
## Signature
```typescript
createDifferentialPair(differentialPairName: string, positiveNet: string, negativeNet: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
differentialPairName
</td><td>
string
</td><td>
差分对名称
</td></tr>
<tr><td>
positiveNet
</td><td>
string
</td><td>
正网络名称
</td></tr>
<tr><td>
negativeNet
</td><td>
string
</td><td>
负网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### createequallengthnetgroup
# PCB\_Drc.createEqualLengthNetGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建等长网络组
## Signature
```typescript
createEqualLengthNetGroup(equalLengthNetGroupName: string, nets: Array<string>, color: IPCB_EqualLengthNetGroupItem['color']): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
equalLengthNetGroupName
</td><td>
string
</td><td>
等长网络组名称
</td></tr>
<tr><td>
nets
</td><td>
Array<string>
</td><td>
网络名称数组
</td></tr>
<tr><td>
color
</td><td>
[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->\['color'\]
</td><td>
等长网络组颜色
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### createnetclass
# PCB\_Drc.createNetClass() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建网络类
## Signature
```typescript
createNetClass(netClassName: string, nets: Array<string>, color: IPCB_EqualLengthNetGroupItem['color']): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netClassName
</td><td>
string
</td><td>
网络类名称
</td></tr>
<tr><td>
nets
</td><td>
Array<string>
</td><td>
网络名称数组
</td></tr>
<tr><td>
color
</td><td>
[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->\['color'\]
</td><td>
网络类颜色
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### createpadpairgroup
# PCB\_Drc.createPadPairGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建焊盘对组
## Signature
```typescript
createPadPairGroup(padPairGroupName: string, padPairs: Array<[string, string]>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padPairGroupName
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
<tr><td>
padPairs
</td><td>
Array<\[string, string\]>
</td><td>
焊盘对数组
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Example
有三种不同的用法,确保画布上已有对应的焊盘。 分别是 一,游离焊盘-游离焊盘;二,器件焊盘 - 器件焊盘;三,器件焊盘 - 游离焊盘 await eda.pcb\_Drc.createPadPairGroup('test',\[\['e0','e1'\]\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.createPadPairGroup('test',\[\['R1:1','R1:2'\],\['R2:1','R2:2'\]\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.createPadPairGroup('test',\[\['R1:1','e0'\],\['R1:2','e1'\]\]) // 器件焊盘 - 游离焊盘
### deletedifferentialpair
# PCB\_Drc.deleteDifferentialPair() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除差分对
## Signature
```typescript
deleteDifferentialPair(differentialPairName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
differentialPairName
</td><td>
string
</td><td>
差分对名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### deleteequallengthnetgroup
# PCB\_Drc.deleteEqualLengthNetGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除等长网络组
## Signature
```typescript
deleteEqualLengthNetGroup(equalLengthNetGroupName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
equalLengthNetGroupName
</td><td>
string
</td><td>
等长网络组名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### deletenetclass
# PCB\_Drc.deleteNetClass() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除网络类
## Signature
```typescript
deleteNetClass(netClassName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netClassName
</td><td>
string
</td><td>
网络类名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### deletepadpairgroup
# PCB\_Drc.deletePadPairGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除焊盘对组
## Signature
```typescript
deletePadPairGroup(padPairGroupName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padPairGroupName
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### deleteruleconfiguration
# PCB\_Drc.deleteRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除设计规则配置
## Signature
```typescript
deleteRuleConfiguration(configurationName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
configurationName
</td><td>
string
</td><td>
配置名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除是否成功
## Remarks
系统配置不允许删除
### getalldifferentialpairs
# PCB\_Drc.getAllDifferentialPairs() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有差分对的详细属性
## Signature
```typescript
getAllDifferentialPairs(): Promise<Array<IPCB_DifferentialPairItem> | {
[key: string]: any;
}>;
```
## Returns
Promise<Array<[IPCB\_DifferentialPairItem](../interfaces/IPCB_DifferentialPairItem.md)<!-- -->> \| { \[key: string\]: any; }>
所有差分对的详细属性
## Remarks
BREAKING CHANGE since EDA v3.4
- 返回值类型更改为对象
### getallequallengthnetgroups
# PCB\_Drc.getAllEqualLengthNetGroups() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有等长网络组的详细属性
## Signature
```typescript
getAllEqualLengthNetGroups(): Promise<Array<IPCB_EqualLengthNetGroupItem>>;
```
## Returns
Promise<Array<[IPCB\_EqualLengthNetGroupItem](../interfaces/IPCB_EqualLengthNetGroupItem.md)<!-- -->>>
所有等长网络组的详细属性
### getallnetclasses
# PCB\_Drc.getAllNetClasses() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有网络类的详细属性
## Signature
```typescript
getAllNetClasses(): Promise<Array<IPCB_NetClassItem>>;
```
## Returns
Promise<Array<[IPCB\_NetClassItem](../interfaces/IPCB_NetClassItem.md)<!-- -->>>
所有网络类的详细属性
### getallpadpairgroups
# PCB\_Drc.getAllPadPairGroups() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有焊盘对组的详细属性
## Signature
```typescript
getAllPadPairGroups(): Promise<Array<IPCB_PadPairGroupItem>>;
```
## Returns
Promise<Array<[IPCB\_PadPairGroupItem](../interfaces/IPCB_PadPairGroupItem.md)<!-- -->>>
所有焊盘对组的详细属性
### getallruleconfigurations
# PCB\_Drc.getAllRuleConfigurations() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有设计规则配置
## Signature
```typescript
getAllRuleConfigurations(includeSystem?: boolean): Promise<Array<{
[key: string]: any;
}>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeSystem
</td><td>
boolean
</td><td>
_(Optional)_ 是否获取系统设计规则配置
</td></tr>
</tbody></table>
## Returns
Promise<Array<{ \[key: string\]: any; }>>
所有设计规则配置
### getcurrentruleconfiguration
# PCB\_Drc.getCurrentRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前设计规则配置
## Signature
```typescript
getCurrentRuleConfiguration(): Promise<{
[key: string]: any;
} | undefined>;
```
## Returns
Promise<{ \[key: string\]: any; } \| undefined>
当前设计规则配置,`undefined` 为获取失败
### getcurrentruleconfigurationname
# PCB\_Drc.getCurrentRuleConfigurationName() method
获取当前设计规则配置名称
## Signature
```typescript
getCurrentRuleConfigurationName(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
当前设计规则配置名称,`undefined` 为获取失败
### getdefaultruleconfigurationname
# PCB\_Drc.getDefaultRuleConfigurationName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取新建 PCB 默认设计规则配置的名称
## Signature
```typescript
getDefaultRuleConfigurationName(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
默认设计规则配置的名称,`undefined` 为获取失败
### getnetbynetrules
# PCB\_Drc.getNetByNetRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取网络-网络规则
## Signature
```typescript
getNetByNetRules(): Promise<{
[key: string]: any;
}>;
```
## Returns
Promise<{ \[key: string\]: any; }>
当前 PCB 的所有网络-网络规则
### getnetrules
# PCB\_Drc.getNetRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取网络规则
## Signature
```typescript
getNetRules(): Promise<Array<{
[key: string]: any;
}>>;
```
## Returns
Promise<Array<{ \[key: string\]: any; }>>
当前 PCB 的所有网络规则
### getpadpairgroupminwirelength
# PCB\_Drc.getPadPairGroupMinWireLength() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取焊盘对组最短导线长度
## Signature
```typescript
getPadPairGroupMinWireLength(padPairGroupName: string): Promise<Array<IPCB_PadPairMinWireLengthItem>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padPairGroupName
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PadPairMinWireLengthItem](../interfaces/IPCB_PadPairMinWireLengthItem.md)<!-- -->>>
所有焊盘对的最短导线长度
### getregionrules
# PCB\_Drc.getRegionRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取区域规则
## Signature
```typescript
getRegionRules(): Promise<Array<{
[key: string]: any;
}>>;
```
## Returns
Promise<Array<{ \[key: string\]: any; }>>
- 当前 PCB 的所有区域规则
### getruleconfiguration
# PCB\_Drc.getRuleConfiguration() method
获取指定设计规则配置
## Signature
```typescript
getRuleConfiguration(configurationName: string): Promise<{
[key: string]: any;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
configurationName
</td><td>
string
</td><td>
配置名称
</td></tr>
</tbody></table>
## Returns
Promise<{ \[key: string\]: any; } \| undefined>
设计规则配置,`undefined` 为不存在该设计规则
### modifydifferentialpairname
# PCB\_Drc.modifyDifferentialPairName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改差分对的名称
## Signature
```typescript
modifyDifferentialPairName(originalDifferentialPairName: string, differentialPairName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalDifferentialPairName
</td><td>
string
</td><td>
原差分对名称
</td></tr>
<tr><td>
differentialPairName
</td><td>
string
</td><td>
新差分对名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifydifferentialpairnegativenet
# PCB\_Drc.modifyDifferentialPairNegativeNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改差分对负网络
## Signature
```typescript
modifyDifferentialPairNegativeNet(differentialPairName: string, negativeNet: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
differentialPairName
</td><td>
string
</td><td>
差分对名称
</td></tr>
<tr><td>
negativeNet
</td><td>
string
</td><td>
负网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifydifferentialpairpositivenet
# PCB\_Drc.modifyDifferentialPairPositiveNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改差分对正网络
## Signature
```typescript
modifyDifferentialPairPositiveNet(differentialPairName: string, positiveNet: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
differentialPairName
</td><td>
string
</td><td>
差分对名称
</td></tr>
<tr><td>
positiveNet
</td><td>
string
</td><td>
正网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifyequallengthnetgroupname
# PCB\_Drc.modifyEqualLengthNetGroupName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改等长网络组的名称
## Signature
```typescript
modifyEqualLengthNetGroupName(originalEqualLengthNetGroupName: string, equalLengthNetGroupName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalEqualLengthNetGroupName
</td><td>
string
</td><td>
原等长网络组名称
</td></tr>
<tr><td>
equalLengthNetGroupName
</td><td>
string
</td><td>
新等长网络组名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifynetclassname
# PCB\_Drc.modifyNetClassName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改网络类的名称
## Signature
```typescript
modifyNetClassName(originalNetClassName: string, netClassName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalNetClassName
</td><td>
string
</td><td>
原网络类名称
</td></tr>
<tr><td>
netClassName
</td><td>
string
</td><td>
新网络类名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifypadpairgroupname
# PCB\_Drc.modifyPadPairGroupName() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改焊盘对组的名称
## Signature
```typescript
modifyPadPairGroupName(originalPadPairGroupName: string, padPairGroupName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalPadPairGroupName
</td><td>
string
</td><td>
原焊盘对组名称
</td></tr>
<tr><td>
padPairGroupName
</td><td>
string
</td><td>
新焊盘对组名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### overwritecurrentruleconfiguration
# PCB\_Drc.overwriteCurrentRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
覆写目前规则配置
## Signature
```typescript
overwriteCurrentRuleConfiguration(ruleConfiguration: {
[key: string]: any;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ruleConfiguration
</td><td>
\{ \[key: string\]: any; \}
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
覆写是否成功
## Remarks
将会覆写当前 PCB 的目前规则管理,请注意数据丢失风险
### overwritenetbynetrules
# PCB\_Drc.overwriteNetByNetRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
覆写网络-网络规则
## Signature
```typescript
overwriteNetByNetRules(netByNetRules: {
[key: string]: any;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netByNetRules
</td><td>
\{ \[key: string\]: any; \}
</td><td>
网络-网络规则
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
覆写是否成功
## Remarks
将会覆写当前 PCB 的所有网络-网络规则,请注意数据丢失风险
### overwritenetrules
# PCB\_Drc.overwriteNetRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
覆写网络规则
## Signature
```typescript
overwriteNetRules(netRules: Array<{
[key: string]: any;
}>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netRules
</td><td>
Array<{ \[key: string\]: any; }>
</td><td>
网络规则
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
覆写是否成功
## Remarks
将会覆写当前 PCB 的所有网络规则,请注意数据丢失风险
### overwriteregionrules
# PCB\_Drc.overwriteRegionRules() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
覆写区域规则
## Signature
```typescript
overwriteRegionRules(regionRules: Array<{
[key: string]: any;
}>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
regionRules
</td><td>
Array<{ \[key: string\]: any; }>
</td><td>
区域规则
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
覆写是否成功
## Remarks
将会覆写当前 PCB 的所有区域规则,请注意数据丢失风险
### removenetfromequallengthnetgroup
# PCB\_Drc.removeNetFromEqualLengthNetGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
从等长网络组中移除网络
## Signature
```typescript
removeNetFromEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
equalLengthNetGroupName
</td><td>
string
</td><td>
等长网络组名称
</td></tr>
<tr><td>
net
</td><td>
string \| Array<string>
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### removenetfromnetclass
# PCB\_Drc.removeNetFromNetClass() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
从网络类中移除网络
## Signature
```typescript
removeNetFromNetClass(netClassName: string, net: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netClassName
</td><td>
string
</td><td>
网络类名称
</td></tr>
<tr><td>
net
</td><td>
string \| Array<string>
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### removepadpairfrompadpairgroup
# PCB\_Drc.removePadPairFromPadPairGroup() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
从焊盘对组中移除焊盘对
## Signature
```typescript
removePadPairFromPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
padPairGroupName
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
<tr><td>
padPair
</td><td>
\[string, string\] \| Array<\[string, string\]>
</td><td>
焊盘对
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Example
有三种不同的用法,确保画布上已有对应的焊盘。 分别是 一,游离焊盘-游离焊盘;二,器件焊盘 - 器件焊盘;三,器件焊盘 - 游离焊盘 await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['e0','e1'\]) // 游离焊盘-游离焊盘 await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['R1:1','R1:2'\]) // 器件焊盘 - 器件焊盘 await eda.pcb\_Drc.removePadPairFromPadPairGroup('test',\['R1:2','e1'\]) // 器件焊盘 - 游离焊盘
### renameruleconfiguration
# PCB\_Drc.renameRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
重命名设计规则配置
## Signature
```typescript
renameRuleConfiguration(originalConfigurationName: string, configurationName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
originalConfigurationName
</td><td>
string
</td><td>
原设计规则配置名称
</td></tr>
<tr><td>
configurationName
</td><td>
string
</td><td>
新设计规则配置名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
重命名是否成功
## Remarks
只有自定义配置可以重命名,系统配置不允许重命名
### saveruleconfiguration
# PCB\_Drc.saveRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
保存设计规则配置
## Signature
```typescript
saveRuleConfiguration(ruleConfiguration: {
[key: string]: any;
}, configurationName: string, allowOverwrite?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ruleConfiguration
</td><td>
\{ \[key: string\]: any; \}
</td><td>
设计规则配置
</td></tr>
<tr><td>
configurationName
</td><td>
string
</td><td>
配置名称
</td></tr>
<tr><td>
allowOverwrite
</td><td>
boolean
</td><td>
_(Optional)_ 是否允许覆写同名设计规则配置,`false` 则将在遇到同名设计规则配置时返回 `false`<!-- -->,请注意可能的数据丢失风险
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
保存是否成功
## Remarks
只有自定义配置可以覆盖保存,系统配置不允许修改和覆盖
### setasdefaultruleconfiguration
# PCB\_Drc.setAsDefaultRuleConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置为新建 PCB 默认设计规则配置
## Signature
```typescript
setAsDefaultRuleConfiguration(configurationName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
configurationName
</td><td>
string
</td><td>
配置名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
设置是否成功
## Remarks
返回值为结果导向,重复设置相同的设计规则为默认设计规则也将返回 `true`
FILE:references/classes/PCB_Event.md
# PCB\_Event class
PCB & 封装 / 事件类
## Signature
```typescript
declare class PCB_Event
```
## Remarks
注册事件回调
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addCrossProbeSelectEventListener(id, callFn)](./PCB_Event.md)
</td><td>
</td><td>
**_(BETA)_** 新增交叉选择事件监听
</td></tr>
<tr><td>
[addMouseEventListener(id, eventType, callFn, onlyOnce)](./PCB_Event.md)
</td><td>
</td><td>
**_(BETA)_** 新增鼠标事件监听
</td></tr>
<tr><td>
[addNetEventListener(id, eventType, callFn, onlyOnce)](./PCB_Event.md)
</td><td>
</td><td>
**_(BETA)_** 新增网络事件监听
</td></tr>
<tr><td>
[addPrimitiveEventListener(id, eventType, callFn, onlyOnce)](./PCB_Event.md)
</td><td>
</td><td>
**_(BETA)_** 新增图元事件监听
</td></tr>
<tr><td>
[isEventListenerAlreadyExist(id)](./PCB_Event.md)
</td><td>
</td><td>
查询事件监听是否存在
</td></tr>
<tr><td>
[removeEventListener(id)](./PCB_Event.md)
</td><td>
</td><td>
移除事件监听
</td></tr>
</tbody></table>
---
## 方法详情
### addcrossprobeselecteventlistener
# PCB\_Event.addCrossProbeSelectEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增交叉选择事件监听
## Signature
```typescript
addCrossProbeSelectEventListener(id: string, callFn: (props: any) => void | Promise<void>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
callFn
</td><td>
(props: any) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### addmouseeventlistener
# PCB\_Event.addMouseEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增鼠标事件监听
## Signature
```typescript
addMouseEventListener(id: string, eventType: 'all' | EPCB_MouseEventType, callFn: (eventType: EPCB_MouseEventType, props: [
{
primitiveId: string;
primitiveType: EPCB_PrimitiveType;
net?: string;
designator?: string;
parentComponentPrimitiveId?: string;
parentComponentDesignator?: string;
}
]) => void | Promise<void>, onlyOnce?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all' \| EPCB\_MouseEventType
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: EPCB\_MouseEventType, props: \[ { primitiveId: string; primitiveType: [EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)<!-- -->; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string; } \]) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅监听一次
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### addneteventlistener
# PCB\_Event.addNetEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增网络事件监听
## Signature
```typescript
addNetEventListener(id: string, eventType: 'all' | EPCB_NetEventType, callFn: (eventType: EPCB_NetEventType, props: [{
net: string;
}]) => void | Promise<void>, onlyOnce?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all' \| EPCB\_NetEventType
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: EPCB\_NetEventType, props: \[{ net: string; }\]) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅监听一次
</td></tr>
</tbody></table>
## Returns
void
## Remarks
网络选中事件仅
①在过滤面板选中网络选项并在画布选中网络时
②在工程设计 -<!-- -->> 网络内选中网络时
会被触发
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### addprimitiveeventlistener
# PCB\_Event.addPrimitiveEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增图元事件监听
## Signature
```typescript
addPrimitiveEventListener(id: string, eventType: 'all' | EPCB_PrimitiveEventType, callFn: (eventType: EPCB_PrimitiveEventType, props: [
{
primitiveId: string;
primitiveType: EPCB_PrimitiveType;
net?: string;
designator?: string;
parentComponentPrimitiveId?: string;
parentComponentDesignator?: string;
}
]) => void | Promise<void>, onlyOnce?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all' \| EPCB\_PrimitiveEventType
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: EPCB\_PrimitiveEventType, props: \[ { primitiveId: string; primitiveType: [EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)<!-- -->; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string; } \]) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅监听一次
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### iseventlisteneralreadyexist
# PCB\_Event.isEventListenerAlreadyExist() method
查询事件监听是否存在
## Signature
```typescript
isEventListenerAlreadyExist(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
事件监听是否存在
### removeeventlistener
# PCB\_Event.removeEventListener() method
移除事件监听
## Signature
```typescript
removeEventListener(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
是否移除指定事件监听
FILE:references/classes/PCB_Layer.md
# PCB\_Layer class
PCB & 封装 / 图层操作类
## Signature
```typescript
declare class PCB_Layer
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addCustomLayer()](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 新增自定义层
</td></tr>
<tr><td>
[getAllLayers()](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有图层的详细属性
</td></tr>
<tr><td>
[lockLayer(layer)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 锁定层
</td></tr>
<tr><td>
[modifyLayer(layer, property)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 修改图层属性
</td></tr>
<tr><td>
[removeLayer(layer)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 移除层
</td></tr>
<tr><td>
[selectLayer(layer)](./PCB_Layer.md)
</td><td>
</td><td>
选中图层
</td></tr>
<tr><td>
[setInactiveLayerDisplayMode(displayMode)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 设置非激活层展示模式
</td></tr>
<tr><td>
[setInactiveLayerTransparency(transparency)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 设置非激活层透明度
</td></tr>
<tr><td>
[setLayerColorConfiguration(colorConfiguration)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 设置层颜色配置
</td></tr>
<tr><td>
[setLayerInvisible(layer, setOtherLayerVisible)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 将层设置为不可见
</td></tr>
<tr><td>
[setLayerVisible(layer, setOtherLayerInvisible)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 将层设置为可见
</td></tr>
<tr><td>
[setPcbType(pcbType)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 设置 PCB 类型
</td></tr>
<tr><td>
[setTheNumberOfCopperLayers(numberOfLayers)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 设置铜箔层数
</td></tr>
<tr><td>
[unlockLayer(layer)](./PCB_Layer.md)
</td><td>
</td><td>
**_(BETA)_** 取消锁定层
</td></tr>
</tbody></table>
---
## 方法详情
### addcustomlayer
# PCB\_Layer.addCustomLayer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增自定义层
## Signature
```typescript
addCustomLayer(): Promise<TPCB_LayersOfCustom | undefined>;
```
## Returns
Promise<[TPCB\_LayersOfCustom](../types/TPCB_LayersOfCustom.md) \| undefined>
新增的自定义层的图层 ID,如若为 `undefined` 则为新增失败,可能是自定义层数量已达到上限
### getalllayers
# PCB\_Layer.getAllLayers() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有图层的详细属性
## Signature
```typescript
getAllLayers(): Promise<Array<IPCB_LayerItem>>;
```
## Returns
Promise<Array<[IPCB\_LayerItem](../interfaces/IPCB_LayerItem.md)<!-- -->>>
所有图层的详细属性
### locklayer
# PCB\_Layer.lockLayer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
锁定层
## Signature
```typescript
lockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
</td><td>
_(Optional)_ 层,如若不指定任何层则默认为所有层
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### modifylayer
# PCB\_Layer.modifyLayer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改图层属性
## Signature
```typescript
modifyLayer(layer: TPCB_LayersInTheSelectable, property: {
name?: string;
type?: TPCB_LayerTypesOfInnerLayer;
color?: string;
transparency?: number;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)
</td><td>
层
</td></tr>
<tr><td>
property
</td><td>
{ name?: string; type?: [TPCB\_LayerTypesOfInnerLayer](../types/TPCB_LayerTypesOfInnerLayer.md)<!-- -->; color?: string; transparency?: number; }
</td><td>
属性
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
修改后的图层属性,如若为 `undefined` 则代表修改失败或图层不存在
## Remarks
仅内层和自定义层允许修改名称;仅内层允许修改类型, 透明度仅支持0-100之间的数
### removelayer
# PCB\_Layer.removeLayer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
移除层
## Signature
```typescript
removeLayer(layer: TPCB_LayersOfCustom): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfCustom](../types/TPCB_LayersOfCustom.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
当前仅支持移除自定义层
### selectlayer
# PCB\_Layer.selectLayer() method
选中图层
## Signature
```typescript
selectLayer(layer: TPCB_LayersInTheSelectable): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)
</td><td>
层
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功,不存在指定层将返回 `false`
### setinactivelayerdisplaymode
# PCB\_Layer.setInactiveLayerDisplayMode() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置非激活层展示模式
## Signature
```typescript
setInactiveLayerDisplayMode(displayMode?: EPCB_InactiveLayerDisplayMode): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
displayMode
</td><td>
[EPCB\_InactiveLayerDisplayMode](../enums/EPCB_InactiveLayerDisplayMode.md)
</td><td>
_(Optional)_ 展示模式
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否设置成功
### setinactivelayertransparency
# PCB\_Layer.setInactiveLayerTransparency() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置非激活层透明度
## Signature
```typescript
setInactiveLayerTransparency(transparency: number): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
transparency
</td><td>
number
</td><td>
透明度,范围 `0-100`
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setlayercolorconfiguration
# PCB\_Layer.setLayerColorConfiguration() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置层颜色配置
## Signature
```typescript
setLayerColorConfiguration(colorConfiguration: EPCB_LayerColorConfiguration): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
colorConfiguration
</td><td>
[EPCB\_LayerColorConfiguration](../enums/EPCB_LayerColorConfiguration.md)
</td><td>
颜色配置
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setlayerinvisible
# PCB\_Layer.setLayerInvisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将层设置为不可见
## Signature
```typescript
setLayerInvisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerVisible?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
</td><td>
_(Optional)_ 层,如若不指定任何层则默认为所有层
</td></tr>
<tr><td>
setOtherLayerVisible
</td><td>
boolean
</td><td>
_(Optional)_ 是否将其它层设置为可见
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setlayervisible
# PCB\_Layer.setLayerVisible() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将层设置为可见
## Signature
```typescript
setLayerVisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerInvisible?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
</td><td>
_(Optional)_ 层,如若不指定任何层则默认为所有层
</td></tr>
<tr><td>
setOtherLayerInvisible
</td><td>
boolean
</td><td>
_(Optional)_ 是否将其它层设置为不可见
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setpcbtype
# PCB\_Layer.setPcbType() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置 PCB 类型
## Signature
```typescript
setPcbType(pcbType: EPCB_PcbPlateType): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
pcbType
</td><td>
[EPCB\_PcbPlateType](../enums/EPCB_PcbPlateType.md)
</td><td>
PCB 类型
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
此处主要是为了适配 FPC 软板的设计,如若将 PCB 类型设置为 FPC 软板,将会新增 FPC 补强层图层。
请注意:
1. 嘉立创暂不支持超过 2 层铜箔层的 FPC 软板生产;
2. 将 PCB 类型从 FPC 软板切换为普通板材时需要预先删除 FPC 补强层上的任何图元,否则将无法切换并返回 `false` 的结果。
### setthenumberofcopperlayers
# PCB\_Layer.setTheNumberOfCopperLayers() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置铜箔层数
## Signature
```typescript
setTheNumberOfCopperLayers(numberOfLayers: 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
numberOfLayers
</td><td>
2 \| 4 \| 6 \| 8 \| 10 \| 12 \| 14 \| 16 \| 18 \| 20 \| 22 \| 24 \| 26 \| 28 \| 30 \| 32
</td><td>
层数
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
新建的 PCB 文档默认拥有两层铜箔层
### unlocklayer
# PCB\_Layer.unlockLayer() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
取消锁定层
## Signature
```typescript
unlockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
</td><td>
_(Optional)_ 层,如若不指定任何层则默认为所有层
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
FILE:references/classes/PCB_ManufactureData.md
# PCB\_ManufactureData class
PCB & 封装 / 生产资料类
## Signature
```typescript
declare class PCB_ManufactureData
```
## Remarks
获取当前 PCB 的生产资料文件及快捷下单
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[deleteBomTemplate(template)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 删除 BOM 模板
</td></tr>
<tr><td>
[get3DFile(fileName, fileType, element, modelMode, autoGenerateModels)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 3D 模型文件
</td></tr>
<tr><td>
[get3DShellFile(fileName, fileType)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 3D 外壳文件
</td></tr>
<tr><td>
[getAltiumDesignerFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 Altium Designer 文件
</td></tr>
<tr><td>
[getAutoLayoutJsonFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取自动布局文件(JSON)
</td></tr>
<tr><td>
[getAutoRouteJsonFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取自动布线文件(JSON)
</td></tr>
<tr><td>
[getAutoRouteJsonFileForJRouter(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 JRouter 专用自动布线文件(JSON)
</td></tr>
<tr><td>
[getBomFile(fileName, fileType, template, filterOptions, statistics, property, columns)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 BOM 文件
</td></tr>
<tr><td>
[getBomTemplateFile(template)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 BOM 模板文件
</td></tr>
<tr><td>
[getBomTemplates()](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 BOM 模板列表
</td></tr>
<tr><td>
[getDsnFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取自动布线文件(DSN)
</td></tr>
<tr><td>
[getDxfFile(fileName, layers, objects)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 DXF 文件
</td></tr>
<tr><td>
[getFlyingProbeTestFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取飞针测试文件
</td></tr>
<tr><td>
[getGerberFile(fileName, colorSilkscreen, unit, digitalFormat, other, layers, objects)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 PCB 制版文件(Gerber)
</td></tr>
<tr><td>
[getIdxFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 IDX 文件
</td></tr>
<tr><td>
[getIpcD356AFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 IPC-D-356A 文件
</td></tr>
<tr><td>
[getManufactureData()](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 导出制造文件
</td></tr>
<tr><td>
[getNetlistFile(fileName, netlistType)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取网表文件(Netlist)
</td></tr>
<tr><td>
[getOpenDatabaseDoublePlusFile(fileName, unit, otherData, layers, objects)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 ODB++ 文件
</td></tr>
<tr><td>
[getPadsFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 PADS 文件
</td></tr>
<tr><td>
[getPcbInfoFile(fileName)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 PCB 信息文件
</td></tr>
<tr><td>
[getPdfFile(fileName, outputMethod, contentConfig, watermark)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 PDF 文件
</td></tr>
<tr><td>
[getPickAndPlaceFile(fileName, fileType, unit)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取坐标文件(PickAndPlace)
</td></tr>
<tr><td>
[getTestPointFile(fileName, fileType)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取测试点报告文件
</td></tr>
<tr><td>
[place3DShellOrder(interactive, ignoreWarning)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 3D 外壳下单
</td></tr>
<tr><td>
[placeComponentsOrder(interactive, ignoreWarning)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 元件下单
</td></tr>
<tr><td>
[placePcbOrder(interactive, ignoreWarning)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** PCB 下单
</td></tr>
<tr><td>
[placeSmtComponentsOrder(interactive, ignoreWarning)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** SMT 元件下单
</td></tr>
<tr><td>
[uploadBomTemplateFile(templateFile, template)](./PCB_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 上传 BOM 模板文件
</td></tr>
</tbody></table>
---
## 方法详情
### deletebomtemplate
# PCB\_ManufactureData.deleteBomTemplate() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除 BOM 模板
## Signature
```typescript
deleteBomTemplate(template: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
template
</td><td>
string
</td><td>
BOM 模板名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Example
```javascript
// 删除指定的 BOM 模板
const success = await eda.pcb_ManufactureData.deleteBomTemplate('MyCustomTemplate');
if (success) {
console.log('BOM 模板删除成功');
} else {
console.log('删除失败,可能是默认模板或模板不存在');
}
```
### get3dfile
# PCB\_ManufactureData.get3DFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 3D 模型文件
## Signature
```typescript
get3DFile(fileName?: string, fileType?: 'step' | 'obj', element?: Array<'Component Model' | 'Via' | 'Silkscreen' | 'Wire In Signal Layer'>, modelMode?: 'Outfit' | 'Parts', autoGenerateModels?: boolean): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'step' \| 'obj'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
element
</td><td>
Array<'Component Model' \| 'Via' \| 'Silkscreen' \| 'Wire In Signal Layer'>
</td><td>
_(Optional)_ 导出对象
</td></tr>
<tr><td>
modelMode
</td><td>
'Outfit' \| 'Parts'
</td><td>
_(Optional)_ 导出模式,`Outfit` = 装配体,`Parts` = 零件
</td></tr>
<tr><td>
autoGenerateModels
</td><td>
boolean
</td><td>
_(Optional)_ 是否为未绑定 3D 模型的元件自动生成 3D 模型(根据元件的"高度"属性)
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
3D 模型文件数据
## Remarks
请注意:只有以 STEP 格式导入的元件模型,才能在导出的 STEP 文件中体现
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出装配体模式的 STEP 文件(包含元件模型)
const stepFile = await eda.pcb_ManufactureData.get3DFile(
'MyBoard_3D',
'step',
['Component Model'],
'Outfit',
true
);
if (stepFile) {
await eda.sys_FileSystem.saveFile(stepFile);
}
// 导出包含多种对象的完整 3D 模型
const full3DFile = await eda.pcb_ManufactureData.get3DFile(
'Complete_3D_Model',
'step',
['Component Model', 'Via', 'Silkscreen', 'Wire In Signal Layer'],
'Outfit',
true
);
// 导出零件模式 OBJ 文件
const objFile = await eda.pcb_ManufactureData.get3DFile(
'MyBoard_OBJ',
'obj',
['Component Model'],
'Parts',
false
);
```
### get3dshellfile
# PCB\_ManufactureData.get3DShellFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 3D 外壳文件
## Signature
```typescript
get3DShellFile(fileName?: string, fileType?: 'stl' | 'step' | 'obj'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'stl' \| 'step' \| 'obj'
</td><td>
_(Optional)_ 文件类型
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
3D 外壳文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出 STL 格式 3D 外壳
const stlFile = await eda.pcb_ManufactureData.get3DShellFile('Board_Shell', 'stl');
if (stlFile) {
await eda.sys_FileSystem.saveFile(stlFile);
}
// 导出 STEP 格式 3D 外壳
const stepShellFile = await eda.pcb_ManufactureData.get3DShellFile('Board_Shell_STEP', 'step');
if (stepShellFile) {
await eda.sys_FileSystem.saveFile(stepShellFile);
}
```
### getaltiumdesignerfile
# PCB\_ManufactureData.getAltiumDesignerFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 Altium Designer 文件
## Signature
```typescript
getAltiumDesignerFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
Altium Designer 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
//获取 Altium Designer 格式文件
const adFile = await eda.pcb_ManufactureData.getAltiumDesignerFile('Converted_To_AD');
if (adFile) {
await eda.sys_FileSystem.saveFile(adFile);
}
```
### getautolayoutjsonfile
# PCB\_ManufactureData.getAutoLayoutJsonFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取自动布局文件(JSON)
## Signature
```typescript
getAutoLayoutJsonFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
自动布局 JSON 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const autoLayoutJson = await eda.pcb_ManufactureData.getAutoLayoutJsonFile('AutoLayout_Json');
if (autoLayoutJson) {
await eda.sys_FileSystem.saveFile(autoLayoutJson);
}
```
### getautoroutejsonfile
# PCB\_ManufactureData.getAutoRouteJsonFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取自动布线文件(JSON)
## Signature
```typescript
getAutoRouteJsonFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
自动布线 JSON 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const autoRouteJson = await eda.pcb_ManufactureData.getAutoRouteJsonFile('AutoRoute_Json');
if (autoRouteJson) {
await eda.sys_FileSystem.saveFile(autoRouteJson);
}
```
### getautoroutejsonfileforjrouter
# PCB\_ManufactureData.getAutoRouteJsonFileForJRouter() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 JRouter 专用自动布线文件(JSON)
## Signature
```typescript
getAutoRouteJsonFileForJRouter(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
自动布线 JSON 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### getbomfile
# PCB\_ManufactureData.getBomFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 BOM 文件
## Signature
```typescript
getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{
property: string;
includeValue: boolean | string;
}>, statistics?: Array<string>, property?: Array<string>, columns?: Array<IPCB_BomPropertiesTableColumns>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'xlsx' \| 'csv'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
template
</td><td>
string
</td><td>
_(Optional)_ 模板名称
</td></tr>
<tr><td>
filterOptions
</td><td>
Array<{ property: string; includeValue: boolean \| string; }>
</td><td>
_(Optional)_ 过滤规则,仅应包含需要启用的规则,`property` 为规则名称,`includeValue` 为匹配的值
</td></tr>
<tr><td>
statistics
</td><td>
Array<string>
</td><td>
_(Optional)_ 统计,包含所有需要启用的统计项的名称
</td></tr>
<tr><td>
property
</td><td>
Array<string>
</td><td>
_(Optional)_ 属性,包含所有需要启用的属性的名称
</td></tr>
<tr><td>
columns
</td><td>
Array<[IPCB\_BomPropertiesTableColumns](../interfaces/IPCB_BomPropertiesTableColumns.md)<!-- -->>
</td><td>
_(Optional)_ 列的属性及排序,`title`<!-- -->、`sort`<!-- -->、`group`<!-- -->、`orderWeight` 不传入则取默认值,`null` 代表 \*\*无\*\* 或 \*\*空\*\*
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
BOM 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 使用默认配置导出 BOM
const bomFile = await eda.pcb_ManufactureData.getBomFile('MyBOM', 'xlsx');
if (bomFile) {
await eda.sys_FileSystem.saveFile(bomFile);
}
// 自定义 BOM 过滤和列配置
const bomFile = await eda.pcb_ManufactureData.getBomFile(
'Custom_Production_BOM',
'xlsx',
undefined,
[
{ property: 'Add into BOM', includeValue: 'yes' },
{ property: 'Convert to PCB', includeValue: 'yes' }
],
['No.', 'Quantity', 'Comment'],
['Name', 'Device', 'Designator', 'Supplier'],
[
{ property: 'Designator', title: '位号', sort: 'asc', group: 'No', orderWeight: 10 },
{ property: 'Quantity', title: '数量', sort: 'desc', group: 'Yes', orderWeight: 9 }
]
);
// 导出 CSV 格式 BOM
const csvBomFile = await eda.pcb_ManufactureData.getBomFile(
'Simple_BOM',
'csv',
undefined,
[{ property: 'Add into BOM', includeValue: 'yes' }],
['No.', 'Quantity'],
['Designator', 'Footprint', 'Value']
);
```
### getbomtemplatefile
# PCB\_ManufactureData.getBomTemplateFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 BOM 模板文件
## Signature
```typescript
getBomTemplateFile(template: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
template
</td><td>
string
</td><td>
BOM 模板名称
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
BOM 模板文件
## Example
```javascript
// 获取指定模板的文件
const templateFile = await eda.pcb_ManufactureData.getBomTemplateFile('MyCustomTemplate');
if (templateFile) {
await eda.sys_FileSystem.saveFile(templateFile);
}
```
### getbomtemplates
# PCB\_ManufactureData.getBomTemplates() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 BOM 模板列表
## Signature
```typescript
getBomTemplates(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
BOM 模板列表
## Example
```javascript
// 获取所有可用的 BOM 模板
const templates = await eda.pcb_ManufactureData.getBomTemplates();
console.log('可用的 BOM 模板:', templates);
templates.forEach((template, index) => {
console.log(`index + 1. template`);
});
```
### getdsnfile
# PCB\_ManufactureData.getDsnFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取自动布线文件(DSN)
## Signature
```typescript
getDsnFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
自动布线 DSN 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const dsnFile = await eda.pcb_ManufactureData.getDsnFile('AutoRoute_DSN');
if (dsnFile) {
await eda.sys_FileSystem.saveFile(dsnFile);
}
```
### getdxffile
# PCB\_ManufactureData.getDxfFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 DXF 文件
## Signature
```typescript
getDxfFile(fileName?: string, layers?: Array<{
layerId: number;
mirror: boolean;
}>, objects?: Array<string>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
layers
</td><td>
Array<{ layerId: number; mirror: boolean; }>
</td><td>
_(Optional)_ 导出层
</td></tr>
<tr><td>
objects
</td><td>
Array<string>
</td><td>
_(Optional)_ 导出对象
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
DXF 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### getflyingprobetestfile
# PCB\_ManufactureData.getFlyingProbeTestFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取飞针测试文件
## Signature
```typescript
getFlyingProbeTestFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
飞针测试文件数据
## Example
```javascript
// 保存飞针测试文件到本地
const flyingProbeFile = await eda.pcb_ManufactureData.getFlyingProbeTestFile('FlyingProbe_Test');
if (flyingProbeFile) {
await eda.sys_FileSystem.saveFile(flyingProbeFile);
}
```
### getgerberfile
# PCB\_ManufactureData.getGerberFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 PCB 制版文件(Gerber)
## Signature
```typescript
getGerberFile(fileName?: string, colorSilkscreen?: boolean, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.INCH, digitalFormat?: {
integerNumber: number;
decimalNumber: number;
}, other?: {
metallicDrillingInformation: boolean;
nonMetallicDrillingInformation: boolean;
drillTable: boolean;
flyingProbeTestingFile: boolean;
}, layers?: Array<{
layerId: number;
isMirror: boolean;
}>, objects?: Array<'Pad' | 'Via' | 'Track' | 'Text' | 'Image' | 'Dimension' | 'BoardOutline' | 'BoardCutout' | 'CopperFilled' | 'SolidRegion' | 'FPCStiffener' | 'Line' | 'PlaneZone' | 'ComponentProperty' | 'ComponentSilkscreen' | 'TearDrop'>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
colorSilkscreen
</td><td>
boolean
</td><td>
_(Optional)_ 是否生成彩色丝印制造文件(嘉立创专用文件)
</td></tr>
<tr><td>
unit
</td><td>
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md)
</td><td>
_(Optional)_ 单位
</td></tr>
<tr><td>
digitalFormat
</td><td>
\{ integerNumber: number; decimalNumber: number; \}
</td><td>
_(Optional)_ 数字格式
</td></tr>
<tr><td>
other
</td><td>
\{ metallicDrillingInformation: boolean; nonMetallicDrillingInformation: boolean; drillTable: boolean; flyingProbeTestingFile: boolean; \}
</td><td>
_(Optional)_ 其它
</td></tr>
<tr><td>
layers
</td><td>
Array<{ layerId: number; isMirror: boolean; }>
</td><td>
_(Optional)_ 导出层,默认则按照嘉立创生产需求导出
</td></tr>
<tr><td>
objects
</td><td>
Array<'Pad' \| 'Via' \| 'Track' \| 'Text' \| 'Image' \| 'Dimension' \| 'BoardOutline' \| 'BoardCutout' \| 'CopperFilled' \| 'SolidRegion' \| 'FPCStiffener' \| 'Line' \| 'PlaneZone' \| 'ComponentProperty' \| 'ComponentSilkscreen' \| 'TearDrop'>
</td><td>
_(Optional)_ 导出对象,默认则按照嘉立创生产需求导出
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
PCB 制版文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出默认的 Gerber 文件
const gerberFile = await eda.pcb_ManufactureData.getGerberFile('MyBoard_Gerber');
if (gerberFile) {
console.log('Gerber 文件已生成:', gerberFile);
}
// 导出并保存到本地
const gerberFile = await eda.pcb_ManufactureData.getGerberFile(
'MyBoard_Gerber',
false,
ESYS_Unit.MILLIMETER,
{ integerNumber: 2, decimalNumber: 6 }
);
if (gerberFile) {
await eda.sys_FileSystem.saveFile(gerberFile,'Gerber.zip');
}
// 自定义导出层和对象
const gerberFile = await eda.pcb_ManufactureData.getGerberFile(
'Custom_Gerber',
false,
ESYS_Unit.INCH,
{ integerNumber: 3, decimalNumber: 5 },
{ metallicDrillingInformation: true, nonMetallicDrillingInformation: true, drillTable: false, flyingProbeTestingFile: false },
[{ layerId: 1, isMirror: false }, { layerId: 2, isMirror: false }, { layerId: 11, isMirror: false }],
['Pad', 'Via', 'Track', 'BoardOutline']
);
```
### getidxfile
# PCB\_ManufactureData.getIdxFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 IDX 文件
## Signature
```typescript
getIdxFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
IDX 文件
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const idxFile = await eda.pcb_ManufactureData.getIdxFile('Design_Exchange');
if (idxFile) {
await eda.sys_FileSystem.saveFile(idxFile);
}
```
### getipcd356afile
# PCB\_ManufactureData.getIpcD356AFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 IPC-D-356A 文件
## Signature
```typescript
getIpcD356AFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
IPC-D-356A 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const ipcFile = await eda.pcb_ManufactureData.getIpcD356AFile('IPC_D356A_Test');
if (ipcFile) {
await eda.sys_FileSystem.saveFile(ipcFile);
}
```
### getmanufacturedata
# PCB\_ManufactureData.getManufactureData() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
导出制造文件
## Signature
```typescript
getManufactureData(): Promise<File | undefined>;
```
## Returns
Promise<File \| undefined>
制造文件
## Remarks
本接口对应私有化部署版本一键导出制造文件功能
将根据前端一键导出制造文件弹窗的配置获取其文件数据
注意:本接口仅私有化部署版本有效,如若在其他版本调用将始终 `throw Error`
### getnetlistfile
# PCB\_ManufactureData.getNetlistFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取网表文件(Netlist)
## Signature
```typescript
getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
netlistType
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md)
</td><td>
_(Optional)_ 网表类型
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
网表文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出嘉立创 EDA 专业版格式网表
const netlistFile = await eda.pcb_ManufactureData.getNetlistFile(
'MyNetlist',
ESYS_NetlistType.JLCEDA_PRO
);
if (netlistFile) {
await eda.sys_FileSystem.saveFile(netlistFile);
}
// 导出 Altium Designer 格式
const altiumNetlist = await eda.pcb_ManufactureData.getNetlistFile(
'Netlist_Altium',
ESYS_NetlistType.ALTIUM_DESIGNER
);
// 导出 PADS 格式
const padsNetlist = await eda.pcb_ManufactureData.getNetlistFile(
'Netlist_PADS',
ESYS_NetlistType.PADS
);
```
### getopendatabasedoubleplusfile
# PCB\_ManufactureData.getOpenDatabaseDoublePlusFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 ODB++ 文件
## Signature
```typescript
getOpenDatabaseDoublePlusFile(fileName?: string, unit?: ESYS_Unit.INCH, otherData?: {
metallizedDrilledHoles?: boolean;
nonMetallizedDrilledHoles?: boolean;
drillTable?: boolean;
flyingProbeTestFile?: boolean;
}, layers?: Array<{
layerId: number;
mirror: boolean;
}>, objects?: Array<{
objectName: string;
}>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
unit
</td><td>
[ESYS\_Unit.INCH](../enums/ESYS_Unit.md)
</td><td>
_(Optional)_ 单位
</td></tr>
<tr><td>
otherData
</td><td>
\{ metallizedDrilledHoles?: boolean; nonMetallizedDrilledHoles?: boolean; drillTable?: boolean; flyingProbeTestFile?: boolean; \}
</td><td>
_(Optional)_ 其它
</td></tr>
<tr><td>
layers
</td><td>
Array<{ layerId: number; mirror: boolean; }>
</td><td>
_(Optional)_ 导出层,默认则按照嘉立创生产需求导出
</td></tr>
<tr><td>
objects
</td><td>
Array<{ objectName: string; }>
</td><td>
_(Optional)_ 导出对象,默认则按照嘉立创生产需求导出
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
ODB++ 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出 ODB++ 文件,自定义单位和选项
const odbFile = await eda.pcb_ManufactureData.getOpenDatabaseDoublePlusFile(
'MyBoard_ODB',
ESYS_Unit.INCH,
{
metallizedDrilledHoles: true,
nonMetallizedDrilledHoles: true,
drillTable: true,
flyingProbeTestFile: false
}
);
if (odbFile) {
await eda.sys_FileSystem.saveFile(odbFile);
}
```
### getpadsfile
# PCB\_ManufactureData.getPadsFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 PADS 文件
## Signature
```typescript
getPadsFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
PADS 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 获取 PADS 格式文件
const padsFile = await eda.pcb_ManufactureData.getPadsFile('Converted_To_PADS');
if (padsFile) {
await eda.sys_FileSystem.saveFile(padsFile);
}
```
### getpcbinfofile
# PCB\_ManufactureData.getPcbInfoFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 PCB 信息文件
## Signature
```typescript
getPcbInfoFile(fileName?: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
PCB 信息文件
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
const pcbInfoFile = await eda.pcb_ManufactureData.getPcbInfoFile('Board_Information');
if (pcbInfoFile) {
await eda.sys_FileSystem.saveFile(pcbInfoFile);
}
```
### getpdffile
# PCB\_ManufactureData.getPdfFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 PDF 文件
## Signature
```typescript
getPdfFile(fileName?: string, outputMethod?: EPCB_PdfOutputMethod, contentConfig?: {
displayAttributesAsMenu: boolean;
showOutlineOnly: boolean;
}, watermark?: {
show?: boolean;
content?: string;
styleConfig?: {
color: string;
transparency: 'Opaque' | '75%' | '50%' | '25%';
font: string;
fontSize: string;
style: {
blood: boolean;
italic: boolean;
underline: boolean;
};
slope: 0 | 45 | 90;
denseness: 'Single' | 'Sparse' | 'Std' | 'Dense';
};
}): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
outputMethod
</td><td>
[EPCB\_PdfOutputMethod](../enums/EPCB_PdfOutputMethod.md)
</td><td>
_(Optional)_ 输出方式
</td></tr>
<tr><td>
contentConfig
</td><td>
\{ displayAttributesAsMenu: boolean; showOutlineOnly: boolean; \}
</td><td>
_(Optional)_ 内容配置
</td></tr>
<tr><td>
watermark
</td><td>
{ show?: boolean; content?: string; styleConfig?: { color: string; transparency: 'Opaque' \| '75%' \| '50%' \| '25%'; font: string; fontSize: string; style: { blood: boolean; italic: boolean; underline: boolean; }; slope: 0 \| 45 \| 90; denseness: 'Single' \| 'Sparse' \| 'Std' \| 'Dense'; }; }
</td><td>
_(Optional)_ 水印
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
PDF 文件数据(或压缩包)
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
`outputMethod`<!-- -->、`contentConfig`<!-- -->、`watermark` 参数暂不可用,等待后期规划
## Example
```javascript
// 导出多页 PDF(包含所有图层)
const pdfFile = await eda.pcb_ManufactureData.getPdfFile(
'PCB_Documentation',
EPCB_PdfOutputMethod.MULTI_PAGE_PDF
);
if (pdfFile) {
await eda.sys_FileSystem.saveFile(pdfFile);
}
```
### getpickandplacefile
# PCB\_ManufactureData.getPickAndPlaceFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取坐标文件(PickAndPlace)
## Signature
```typescript
getPickAndPlaceFile(fileName?: string, fileType?: 'xlsx' | 'csv', unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.MIL): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'xlsx' \| 'csv'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
unit
</td><td>
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md)
</td><td>
_(Optional)_ 单位
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
坐标文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 导出毫米单位的 Excel 格式坐标文件
const pnpFile = await eda.pcb_ManufactureData.getPickAndPlaceFile(
'PickAndPlace',
'xlsx',
ESYS_Unit.MILLIMETER
);
if (pnpFile) {
await eda.sys_FileSystem.saveFile(pnpFile);
}
```
### gettestpointfile
# PCB\_ManufactureData.getTestPointFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取测试点报告文件
## Signature
```typescript
getTestPointFile(fileName?: string, fileType?: 'xlsx' | 'csv'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'xlsx' \| 'csv'
</td><td>
_(Optional)_ 文件类型
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
测试点报告文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
## Example
```javascript
// 保存测试点报告文件到本地
const testPointFile = await eda.pcb_ManufactureData.getTestPointFile('Test_Point_Report', 'xlsx');
if (testPointFile) {
await eda.sys_FileSystem.saveFile(testPointFile);
}
```
### place3dshellorder
# PCB\_ManufactureData.place3DShellOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
3D 外壳下单
## Signature
```typescript
place3DShellOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
## Remarks
本接口暂时只支持交互式检查,入参暂无作用,预留后续开发
### placecomponentsorder
# PCB\_ManufactureData.placeComponentsOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
元件下单
## Signature
```typescript
placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
## Remarks
本接口暂时只支持交互式检查,入参暂无作用,预留后续开发
### placepcborder
# PCB\_ManufactureData.placePcbOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
PCB 下单
## Signature
```typescript
placePcbOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
## Remarks
本接口暂时只支持交互式检查,入参暂无作用,预留后续开发
### placesmtcomponentsorder
# PCB\_ManufactureData.placeSmtComponentsOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
SMT 元件下单
## Signature
```typescript
placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
## Remarks
本接口暂时只支持交互式检查,入参暂无作用,预留后续开发
### uploadbomtemplatefile
# PCB\_ManufactureData.uploadBomTemplateFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
上传 BOM 模板文件
## Signature
```typescript
uploadBomTemplateFile(templateFile: File, template?: string): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
templateFile
</td><td>
File
</td><td>
BOM 模板文件
</td></tr>
<tr><td>
template
</td><td>
string
</td><td>
_(Optional)_ BOM 模板名称,如若为 `undefined` 则自动从 `templateFile` 中取值
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
BOM 模板名称
## Example
```javascript
// 从文件选择器读取模板文件
const templateFile = await eda.sys_FileSystem.openReadFileDialog('.xlsx');
if (templateFile) {
const templateName = await eda.pcb_ManufactureData.uploadBomTemplateFile(
templateFile,
'MyCustomTemplate'
);
if (templateName) {
console.log('模板上传成功:', templateName);
}
}
```
FILE:references/classes/PCB_MathPolygon.md
# PCB\_MathPolygon class
PCB & 封装 / 多边形数学类
## Signature
```typescript
declare class PCB_MathPolygon
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[calculateBBoxHeight(complexPolygon)](./PCB_MathPolygon.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[calculateBBoxWidth(complexPolygon)](./PCB_MathPolygon.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[convertImageToComplexPolygon(imageBlob, imageWidth, imageHeight, tolerance, simplification, smoothing, despeckling, whiteAsBackgroundColor, inversion)](./PCB_MathPolygon.md)
</td><td>
</td><td>
**_(BETA)_** 将图像转换为复杂多边形对象
</td></tr>
<tr><td>
[createComplexPolygon(complexPolygon)](./PCB_MathPolygon.md)
</td><td>
</td><td>
创建复杂多边形
</td></tr>
<tr><td>
[createPolygon(polygon)](./PCB_MathPolygon.md)
</td><td>
</td><td>
创建单多边形
</td></tr>
<tr><td>
[splitPolygon(complexPolygons)](./PCB_MathPolygon.md)
</td><td>
</td><td>
拆分单多边形
</td></tr>
</tbody></table>
---
## 方法详情
### calculatebboxheight
# PCB\_MathPolygon.calculateBBoxHeight() method
## Signature
```typescript
calculateBBoxHeight(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->>
</td><td>
</td></tr>
</tbody></table>
## Returns
number
### calculatebboxwidth
# PCB\_MathPolygon.calculateBBoxWidth() method
## Signature
```typescript
calculateBBoxWidth(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->>
</td><td>
</td></tr>
</tbody></table>
## Returns
number
### convertimagetocomplexpolygon
# PCB\_MathPolygon.convertImageToComplexPolygon() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
将图像转换为复杂多边形对象
## Signature
```typescript
convertImageToComplexPolygon(imageBlob: Blob, imageWidth: number, imageHeight: number, tolerance?: number, simplification?: number, smoothing?: number, despeckling?: number, whiteAsBackgroundColor?: boolean, inversion?: boolean): Promise<IPCB_ComplexPolygon | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
imageBlob
</td><td>
Blob
</td><td>
图像 Blob 文件,可以使用 方法从文件系统读取文件
</td></tr>
<tr><td>
imageWidth
</td><td>
number
</td><td>
图像宽度
</td></tr>
<tr><td>
imageHeight
</td><td>
number
</td><td>
图像高度
</td></tr>
<tr><td>
tolerance
</td><td>
number
</td><td>
_(Optional)_ 容差,取值范围 `0`<!-- -->-`1`
</td></tr>
<tr><td>
simplification
</td><td>
number
</td><td>
_(Optional)_ 简化,取值范围 `0`<!-- -->-`1`
</td></tr>
<tr><td>
smoothing
</td><td>
number
</td><td>
_(Optional)_ 平滑,取值范围 `0`<!-- -->-`1.33`
</td></tr>
<tr><td>
despeckling
</td><td>
number
</td><td>
_(Optional)_ 去斑,取值范围 `0`<!-- -->-`5`
</td></tr>
<tr><td>
whiteAsBackgroundColor
</td><td>
boolean
</td><td>
_(Optional)_ 是否白色作为背景色
</td></tr>
<tr><td>
inversion
</td><td>
boolean
</td><td>
_(Optional)_ 是否反相
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_ComplexPolygon](./IPCB_ComplexPolygon.md) \| undefined>
复杂多边形对象
### createcomplexpolygon
# PCB\_MathPolygon.createComplexPolygon() method
创建复杂多边形
## Signature
```typescript
createComplexPolygon(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | Array<IPCB_Polygon>): IPCB_ComplexPolygon | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->> \| [IPCB\_Polygon](./IPCB_Polygon.md) \| Array<[IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->>
</td><td>
复杂多边形数据
</td></tr>
</tbody></table>
## Returns
[IPCB\_ComplexPolygon](./IPCB_ComplexPolygon.md) \| undefined
复杂多边形对象,`undefined` 表示数据不合法
### createpolygon
# PCB\_MathPolygon.createPolygon() method
创建单多边形
## Signature
```typescript
createPolygon(polygon: TPCB_PolygonSourceArray): IPCB_Polygon | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
polygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)
</td><td>
单多边形数据
</td></tr>
</tbody></table>
## Returns
[IPCB\_Polygon](./IPCB_Polygon.md) \| undefined
单多边形对象,`undefined` 表示数据不合法
### splitpolygon
# PCB\_MathPolygon.splitPolygon() method
拆分单多边形
## Signature
```typescript
splitPolygon(...complexPolygons: Array<IPCB_ComplexPolygon>): Array<IPCB_Polygon>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
complexPolygons
</td><td>
Array<[IPCB\_ComplexPolygon](./IPCB_ComplexPolygon.md)<!-- -->>
</td><td>
复杂多边形
</td></tr>
</tbody></table>
## Returns
Array<[IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->>
单多边形数组
FILE:references/classes/PCB_Net.md
# PCB\_Net class
PCB & 封装 / 网络类
## Signature
```typescript
declare class PCB_Net
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getAllNetName()](./PCB_Net.md)
</td><td>
</td><td>
获取所有网络的网络名称
</td></tr>
<tr><td>
[getAllNets()](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有网络的详细信息
</td></tr>
<tr><td>
[getAllNetsName()](./PCB_Net.md)
</td><td>
</td><td>
获取所有网络的网络名称
</td></tr>
<tr><td>
[getAllPrimitivesByNet(net, primitiveTypes)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 获取关联指定网络的所有图元
</td></tr>
<tr><td>
[getNet(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定网络的详细信息
</td></tr>
<tr><td>
[getNetColor(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定网络的颜色
</td></tr>
<tr><td>
[getNetLength(net)](./PCB_Net.md)
</td><td>
</td><td>
获取指定网络的长度
</td></tr>
<tr><td>
[getNetlist(type)](./PCB_Net.md)
</td><td>
</td><td>
获取网表
</td></tr>
<tr><td>
[highlightNet(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 高亮网络
</td></tr>
<tr><td>
[selectNet(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 选中网络
</td></tr>
<tr><td>
[setNetColor(net, color)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 设置指定网络的颜色
</td></tr>
<tr><td>
[setNetlist(type, netlist)](./PCB_Net.md)
</td><td>
</td><td>
更新网表
</td></tr>
<tr><td>
[unhighlightAllNets()](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 取消高亮所有网络
</td></tr>
<tr><td>
[unhighlightNet(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 取消高亮网络
</td></tr>
<tr><td>
[unselectAllNets()](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 取消选中所有网络
</td></tr>
<tr><td>
[unselectNet(net)](./PCB_Net.md)
</td><td>
</td><td>
**_(BETA)_** 取消选中网络
</td></tr>
</tbody></table>
---
## 方法详情
### getallnetname
# PCB\_Net.getAllNetName() method
> Warning: This API is now obsolete.
>
> 请使用 [getAllNetsName](./PCB_Net.md) 替代
获取所有网络的网络名称
## Signature
```typescript
getAllNetName(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
网络名称数组
### getallnets
# PCB\_Net.getAllNets() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有网络的详细信息
## Signature
```typescript
getAllNets(): Promise<Array<IPCB_NetInfo>>;
```
## Returns
Promise<Array<[IPCB\_NetInfo](../interfaces/IPCB_NetInfo.md)<!-- -->>>
所有网络的详细信息
### getallnetsname
# PCB\_Net.getAllNetsName() method
获取所有网络的网络名称
## Signature
```typescript
getAllNetsName(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
网络名称数组
### getallprimitivesbynet
# PCB\_Net.getAllPrimitivesByNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取关联指定网络的所有图元
## Signature
```typescript
getAllPrimitivesByNet(net: string, primitiveTypes?: Array<EPCB_PrimitiveType>): Promise<Array<IPCB_Primitive>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
primitiveTypes
</td><td>
Array<[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)<!-- -->>
</td><td>
_(Optional)_ 图元类型数组,如若指定图元类型不存在网络属性,返回的数据将恒为空
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_Primitive](../interfaces/IPCB_Primitive.md)<!-- -->>>
图元对象数组
### getnet
# PCB\_Net.getNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取指定网络的详细信息
## Signature
```typescript
getNet(net: string): Promise<IPCB_NetInfo | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_NetInfo](../interfaces/IPCB_NetInfo.md) \| undefined>
网络的详细信息, `undefined` 为不存在该网络
### getnetcolor
# PCB\_Net.getNetColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取指定网络的颜色
## Signature
```typescript
getNetColor(net: string): Promise<IPCB_NetInfo['color'] | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_NetInfo](../interfaces/IPCB_NetInfo.md)<!-- -->\['color'\] \| undefined>
网络颜色,`undefined` 为不存在该网络
### getnetlength
# PCB\_Net.getNetLength() method
获取指定网络的长度
## Signature
```typescript
getNetLength(net: string): Promise<number | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<number \| undefined>
网络长度,`undefined` 为不存在该网络,`0` 为网络无长度
### getnetlist
# PCB\_Net.getNetlist() method
获取网表
## Signature
```typescript
getNetlist(type?: ESYS_NetlistType): Promise<string>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md)
</td><td>
_(Optional)_ 网表格式
</td></tr>
</tbody></table>
## Returns
Promise<string>
网表数据
### highlightnet
# PCB\_Net.highlightNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
高亮网络
## Signature
```typescript
highlightNet(net: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口的返回值为结果导向,如果该网络原先已高亮,也将返回 `true`
### selectnet
# PCB\_Net.selectNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
选中网络
## Signature
```typescript
selectNet(net: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetcolor
# PCB\_Net.setNetColor() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置指定网络的颜色
## Signature
```typescript
setNetColor(net: string, color: IPCB_NetInfo['color']): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
color
</td><td>
[IPCB\_NetInfo](../interfaces/IPCB_NetInfo.md)<!-- -->\['color'\]
</td><td>
网络颜色
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否设置成功, `false` 为不存在该网络
### setnetlist
# PCB\_Net.setNetlist() method
更新网表
## Signature
```typescript
setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md) \| undefined
</td><td>
网表格式
</td></tr>
<tr><td>
netlist
</td><td>
string
</td><td>
网表数据
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
### unhighlightallnets
# PCB\_Net.unhighlightAllNets() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
取消高亮所有网络
## Signature
```typescript
unhighlightAllNets(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
### unhighlightnet
# PCB\_Net.unhighlightNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
取消高亮网络
## Signature
```typescript
unhighlightNet(net: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口的返回值为结果导向,如果该网络原先未高亮,也将返回 `true`
### unselectallnets
# PCB\_Net.unselectAllNets() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
取消选中所有网络
## Signature
```typescript
unselectAllNets(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
如果希望取消选中所有图元,请使用 [PCB\_SelectControl.clearSelected()](./PCB_SelectControl.md) 接口
### unselectnet
# PCB\_Net.unselectNet() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
取消选中网络
## Signature
```typescript
unselectNet(net: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
FILE:references/classes/PCB_Primitive.md
# PCB\_Primitive class
PCB & 封装 / 图元类
## Signature
```typescript
declare class PCB_Primitive
```
## Remarks
图元的统一操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getPrimitivesBBox(primitiveIds)](./PCB_Primitive.md)
</td><td>
</td><td>
**_(BETA)_** 获取图元的 BBox
</td></tr>
</tbody></table>
---
## 方法详情
### getprimitivesbbox
# PCB\_Primitive.getPrimitivesBBox() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取图元的 BBox
## Signature
```typescript
getPrimitivesBBox(primitiveIds: Array<string | IPCB_Primitive>): Promise<{
minX: number;
minY: number;
maxX: number;
maxY: number;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string \| [IPCB\_Primitive](../interfaces/IPCB_Primitive.md)<!-- -->>
</td><td>
图元 ID 数组或图元对象数组
</td></tr>
</tbody></table>
## Returns
Promise<{ minX: number; minY: number; maxX: number; maxY: number; } \| undefined>
图元的 BBox,如若图元不存在或没有 BBox,将会返回 `undefined` 的结果
FILE:references/classes/PCB_PrimitiveArc.md
# PCB\_PrimitiveArc class
PCB & 封装 / 圆弧线图元类
## Signature
```typescript
declare class PCB_PrimitiveArc implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Remarks
直线和圆弧线均为导线,对应画布的线条走线和圆弧走线
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(net, layer, startX, startY, endX, endY, arcAngle, lineWidth, interactiveMode, primitiveLock)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 创建圆弧线
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 删除圆弧线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆弧线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆弧线
</td></tr>
<tr><td>
[getAll(net, layer, primitiveLock)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆弧线
</td></tr>
<tr><td>
[getAllPrimitiveId(net, layer, primitiveLock)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆弧线的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 修改圆弧线
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveArc.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建圆弧线
## Signature
```typescript
create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, arcAngle: number, lineWidth?: number, interactiveMode?: EPCB_PrimitiveArcInteractiveMode, primitiveLock?: boolean): Promise<IPCB_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
<tr><td>
startX
</td><td>
number
</td><td>
起始位置 X
</td></tr>
<tr><td>
startY
</td><td>
number
</td><td>
起始位置 Y
</td></tr>
<tr><td>
endX
</td><td>
number
</td><td>
终止位置 X
</td></tr>
<tr><td>
endY
</td><td>
number
</td><td>
终止位置 Y
</td></tr>
<tr><td>
arcAngle
</td><td>
number
</td><td>
圆弧角度
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
interactiveMode
</td><td>
[EPCB\_PrimitiveArcInteractiveMode](../enums/EPCB_PrimitiveArcInteractiveMode.md)
</td><td>
_(Optional)_ 交互模式
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| undefined>
圆弧线图元对象
### delete
# PCB\_PrimitiveArc.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除圆弧线
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveArc | Array<string> | Array<IPCB_PrimitiveArc>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| Array<string> \| Array<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>
</td><td>
圆弧线的图元 ID 或圆弧线图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveArc.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆弧线
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
圆弧线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| undefined>
圆弧线图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveArc.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆弧线
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveArc>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
圆弧线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
圆弧线图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveArc.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆弧线
## Signature
```typescript
getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveArc>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)<!-- -->>>
圆弧线图元对象数组
### getallprimitiveid
# PCB\_PrimitiveArc.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆弧线的图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
圆弧线的图元 ID 数组
### modify
# PCB\_PrimitiveArc.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改圆弧线
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveArc, property: {
net?: string;
layer?: TPCB_LayersOfLine;
startX?: number;
startY?: number;
endX?: number;
endY?: number;
arcAngle?: number;
lineWidth?: number;
interactiveMode?: EPCB_PrimitiveArcInteractiveMode;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ net?: string; layer?: [TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)<!-- -->; startX?: number; startY?: number; endX?: number; endY?: number; arcAngle?: number; lineWidth?: number; interactiveMode?: [EPCB\_PrimitiveArcInteractiveMode](../enums/EPCB_PrimitiveArcInteractiveMode.md)<!-- -->; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveArc](./IPCB_PrimitiveArc.md) \| undefined>
圆弧线图元对象
FILE:references/classes/PCB_PrimitiveAttribute.md
# PCB\_PrimitiveAttribute class
PCB & 封装 / 属性图元类
## Signature
```typescript
declare class PCB_PrimitiveAttribute implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
FILE:references/classes/PCB_PrimitiveComponent.md
# PCB\_PrimitiveComponent class
PCB & 封装 / 器件图元类
## Signature
```typescript
declare class PCB_PrimitiveComponent implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(component, layer, x, y, rotation, primitiveLock)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 创建器件
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 删除器件
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件
</td></tr>
<tr><td>
[getAll(layer, primitiveLock)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有器件
</td></tr>
<tr><td>
[getAllPinsByPrimitiveId(primitiveId)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件关联的所有焊盘
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, primitiveLock)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有器件的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 修改器件
</td></tr>
<tr><td>
[placeComponentWithMouse(component)](./PCB_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 使用鼠标放置器件
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveComponent.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建器件
## Signature
```typescript
create(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem | {
libraryType: ELIB_LibraryType.FOOTPRINT;
libraryUuid: string;
uuid: string;
} | ILIB_FootprintItem | ILIB_FootprintSearchItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveComponent | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md) \| { libraryType: [ELIB\_LibraryType.FOOTPRINT](../enums/ELIB_LibraryType.md)<!-- -->; libraryUuid: string; uuid: string; } \| [ILIB\_FootprintItem](../interfaces/ILIB_FootprintItem.md) \| [ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)
</td><td>
关联库器件
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
</td><td>
层
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md) \| undefined>
器件图元对象
### delete
# PCB\_PrimitiveComponent.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除器件
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveComponent | Array<string> | Array<IPCB_PrimitiveComponent>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md) \| Array<string> \| Array<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
</td><td>
器件的图元 ID 或器件图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveComponent.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveComponent | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md) \| undefined>
器件图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveComponent.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveComponent>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>>
器件图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveComponent.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有器件
## Signature
```typescript
getAll(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveComponent>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>>
器件图元对象数组
### getallpinsbyprimitiveid
# PCB\_PrimitiveComponent.getAllPinsByPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件关联的所有焊盘
## Signature
```typescript
getAllPinsByPrimitiveId(primitiveId: string): Promise<Array<IPCB_PrimitiveComponentPad> | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string
</td><td>
器件图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)<!-- -->> \| undefined>
器件焊盘图元数组
### getallprimitiveid
# PCB\_PrimitiveComponent.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有器件的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
器件的图元 ID 数组
### modify
# PCB\_PrimitiveComponent.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改器件
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveComponent, property: {
layer?: TPCB_LayersOfComponent;
x?: number;
y?: number;
rotation?: number;
primitiveLock?: boolean;
addIntoBom?: boolean;
designator?: string | null;
name?: string | null;
uniqueId?: string | null;
manufacturer?: string | null;
manufacturerId?: string | null;
supplier?: string | null;
supplierId?: string | null;
otherProperty?: {
[key: string]: any;
};
}): Promise<IPCB_PrimitiveComponent | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ layer?: [TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)<!-- -->; x?: number; y?: number; rotation?: number; primitiveLock?: boolean; addIntoBom?: boolean; designator?: string \| null; name?: string \| null; uniqueId?: string \| null; manufacturer?: string \| null; manufacturerId?: string \| null; supplier?: string \| null; supplierId?: string \| null; otherProperty?: { \[key: string\]: any; }; }
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md) \| undefined>
器件图元对象
### placecomponentwithmouse
# PCB\_PrimitiveComponent.placeComponentWithMouse() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用鼠标放置器件
## Signature
```typescript
placeComponentWithMouse(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否找到器件
## Remarks
本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布
本接口的返回时机并不会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 `true` 的结果
FILE:references/classes/PCB_PrimitiveDimension.md
# PCB\_PrimitiveDimension class
PCB & 封装 / 尺寸标注图元类
## Signature
```typescript
declare class PCB_PrimitiveDimension implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(dimensionType, coordinateSet, layer, unit, lineWidth, precision, primitiveLock)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
创建尺寸标注
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 删除尺寸标注
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 获取尺寸标注
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 获取尺寸标注
</td></tr>
<tr><td>
[getAll(layer, primitiveLock)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有尺寸标注
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, primitiveLock)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有尺寸标注的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveDimension.md)
</td><td>
</td><td>
**_(BETA)_** 修改尺寸标注
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveDimension.create() method
创建尺寸标注
## Signature
```typescript
create(dimensionType: EPCB_PrimitiveDimensionType, coordinateSet: TPCB_PrimitiveDimensionCoordinateSet, layer?: TPCB_LayersOfDimension, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL, lineWidth?: number, precision?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveDimension | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
dimensionType
</td><td>
[EPCB\_PrimitiveDimensionType](../enums/EPCB_PrimitiveDimensionType.md)
</td><td>
尺寸标注类型
</td></tr>
<tr><td>
coordinateSet
</td><td>
[TPCB\_PrimitiveDimensionCoordinateSet](../types/TPCB_PrimitiveDimensionCoordinateSet.md)
</td><td>
尺寸标注坐标集
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
unit
</td><td>
[ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.CENTIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md)
</td><td>
_(Optional)_ 单位
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
precision
</td><td>
number
</td><td>
_(Optional)_ 精度,取值范围 `0`<!-- -->-`4`
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md) \| undefined>
尺寸标注图元对象
### delete
# PCB\_PrimitiveDimension.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除尺寸标注
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveDimension | Array<string> | Array<IPCB_PrimitiveDimension>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md) \| Array<string> \| Array<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)<!-- -->>
</td><td>
尺寸标注的图元 ID 或尺寸标注图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveDimension.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取尺寸标注
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveDimension | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
尺寸标注的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md) \| undefined>
尺寸标注图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveDimension.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取尺寸标注
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveDimension>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
尺寸标注的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)<!-- -->>>
尺寸标注图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveDimension.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有尺寸标注
## Signature
```typescript
getAll(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveDimension>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)<!-- -->>>
尺寸标注图元对象数组
### getallprimitiveid
# PCB\_PrimitiveDimension.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有尺寸标注的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
尺寸标注的图元 ID 数组
### modify
# PCB\_PrimitiveDimension.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改尺寸标注
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveDimension, property: {
dimensionType?: EPCB_PrimitiveDimensionType;
coordinateSet?: TPCB_PrimitiveDimensionCoordinateSet;
layer?: TPCB_LayersOfDimension;
unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL;
lineWidth?: number;
precision?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveDimension | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ dimensionType?: [EPCB\_PrimitiveDimensionType](../enums/EPCB_PrimitiveDimensionType.md)<!-- -->; coordinateSet?: [TPCB\_PrimitiveDimensionCoordinateSet](../types/TPCB_PrimitiveDimensionCoordinateSet.md)<!-- -->; layer?: [TPCB\_LayersOfDimension](../types/TPCB_LayersOfDimension.md)<!-- -->; unit?: [ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.CENTIMETER](../enums/ESYS_Unit.md) \| [ESYS\_Unit.INCH](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MIL](../enums/ESYS_Unit.md)<!-- -->; lineWidth?: number; precision?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveDimension](./IPCB_PrimitiveDimension.md) \| undefined>
尺寸标注图元对象
FILE:references/classes/PCB_PrimitiveFill.md
# PCB\_PrimitiveFill class
PCB & 封装 / 填充图元类
## Signature
```typescript
declare class PCB_PrimitiveFill implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(layer, complexPolygon, net, fillMode, lineWidth, primitiveLock)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 创建填充
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 删除填充
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 获取填充
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 获取填充
</td></tr>
<tr><td>
[getAll(layer, net, primitiveLock)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有填充
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, net, primitiveLock)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有填充的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveFill.md)
</td><td>
</td><td>
**_(BETA)_** 修改填充
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveFill.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建填充
## Signature
```typescript
create(layer: TPCB_LayersOfFill, complexPolygon: IPCB_Polygon, net?: string, fillMode?: EPCB_PrimitiveFillMode, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveFill | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)
</td><td>
层
</td></tr>
<tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形对象
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
fillMode
</td><td>
[EPCB\_PrimitiveFillMode](../enums/EPCB_PrimitiveFillMode.md)
</td><td>
_(Optional)_ 填充模式
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| undefined>
填充图元对象
### delete
# PCB\_PrimitiveFill.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除填充
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveFill | Array<string> | Array<IPCB_PrimitiveFill>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| Array<string> \| Array<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>
</td><td>
填充的图元 ID 或填充图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveFill.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取填充
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveFill | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
填充的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| undefined>
填充图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveFill.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取填充
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveFill>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
填充的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>>
填充图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveFill.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有填充
## Signature
```typescript
getAll(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveFill>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)<!-- -->>>
填充图元对象数组
### getallprimitiveid
# PCB\_PrimitiveFill.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有填充的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
填充的图元 ID 数组
### modify
# PCB\_PrimitiveFill.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改填充
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveFill, property: {
layer?: TPCB_LayersOfFill;
complexPolygon?: IPCB_Polygon;
net?: string;
fillMode?: EPCB_PrimitiveFillMode;
lineWidth?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveFill | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ layer?: [TPCB\_LayersOfFill](../types/TPCB_LayersOfFill.md)<!-- -->; complexPolygon?: [IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->; net?: string; fillMode?: [EPCB\_PrimitiveFillMode](../enums/EPCB_PrimitiveFillMode.md)<!-- -->; lineWidth?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveFill](./IPCB_PrimitiveFill.md) \| undefined>
填充图元对象,`undefined` 表示修改失败
FILE:references/classes/PCB_PrimitiveImage.md
# PCB\_PrimitiveImage class
PCB & 封装 / 图像图元类
## Signature
```typescript
declare class PCB_PrimitiveImage implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(x, y, complexPolygon, layer, width, height, rotation, horizonMirror, primitiveLock)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
创建图像
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 删除图像
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 获取图像
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 获取图像
</td></tr>
<tr><td>
[getAll(layer, primitiveLock)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有图像
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, primitiveLock)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有图像的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveImage.md)
</td><td>
</td><td>
**_(BETA)_** 修改图像
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveImage.create() method
创建图像
## Signature
```typescript
create(x: number, y: number, complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | IPCB_ComplexPolygon, layer: TPCB_LayersOfImage, width?: number, height?: number, rotation?: number, horizonMirror?: boolean, primitiveLock?: boolean): Promise<IPCB_PrimitiveImage | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
BBox 左上点坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
BBox 左上点坐标 Y
</td></tr>
<tr><td>
complexPolygon
</td><td>
[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md) \| Array<[TPCB\_PolygonSourceArray](../types/TPCB_PolygonSourceArray.md)<!-- -->> \| [IPCB\_Polygon](./IPCB_Polygon.md) \| [IPCB\_ComplexPolygon](./IPCB_ComplexPolygon.md)
</td><td>
图像源数据(复杂多边形),可以使用 [PCB\_MathPolygon.convertImageToComplexPolygon()](./PCB_MathPolygon.md) 方法将图像文件转换为复杂多边形数据
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
层
</td></tr>
<tr><td>
width
</td><td>
number
</td><td>
_(Optional)_ 宽
</td></tr>
<tr><td>
height
</td><td>
number
</td><td>
_(Optional)_ 高
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
horizonMirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否水平镜像
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md) \| undefined>
图像图元对象
## Remarks
如需创建彩色丝印图像,请使用 [二进制内嵌对象图元类](./PCB_PrimitiveObject.md)
### delete
# PCB\_PrimitiveImage.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除图像
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveImage | Array<string> | Array<IPCB_PrimitiveImage>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md) \| Array<string> \| Array<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)<!-- -->>
</td><td>
图像的图元 ID 或图像图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveImage.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取图像
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveImage | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
图像的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md) \| undefined>
图像图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveImage.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取图像
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveImage>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
图像的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)<!-- -->>>
图像图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveImage.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有图像
## Signature
```typescript
getAll(layer?: TPCB_LayersOfImage, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveImage>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)<!-- -->>>
图像图元对象数组
### getallprimitiveid
# PCB\_PrimitiveImage.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有图像的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfImage, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
图像的图元 ID 数组
### modify
# PCB\_PrimitiveImage.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改图像
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveImage, property: {
x?: number;
y?: number;
layer?: TPCB_LayersOfImage;
width?: number;
height?: number;
rotation?: number;
horizonMirror?: boolean;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveImage | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ x?: number; y?: number; layer?: [TPCB\_LayersOfImage](../types/TPCB_LayersOfImage.md)<!-- -->; width?: number; height?: number; rotation?: number; horizonMirror?: boolean; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveImage](./IPCB_PrimitiveImage.md) \| undefined>
图像图元对象
FILE:references/classes/PCB_PrimitiveLine.md
# PCB\_PrimitiveLine class
PCB & 封装 / 直线图元类
## Signature
```typescript
declare class PCB_PrimitiveLine implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Remarks
直线和圆弧线均为导线,对应画布的线条走线和圆弧走线
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(net, layer, startX, startY, endX, endY, lineWidth, primitiveLock)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
创建直线
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 删除直线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取直线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取直线
</td></tr>
<tr><td>
[getAll(net, layer, primitiveLock)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有直线
</td></tr>
<tr><td>
[getAllPrimitiveId(net, layer, primitiveLock)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有直线的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveLine.md)
</td><td>
</td><td>
**_(BETA)_** 修改直线
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveLine.create() method
创建直线
## Signature
```typescript
create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveLine | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
<tr><td>
startX
</td><td>
number
</td><td>
起始位置 X
</td></tr>
<tr><td>
startY
</td><td>
number
</td><td>
起始位置 Y
</td></tr>
<tr><td>
endX
</td><td>
number
</td><td>
终止位置 X
</td></tr>
<tr><td>
endY
</td><td>
number
</td><td>
终止位置 Y
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| undefined>
直线图元对象
### delete
# PCB\_PrimitiveLine.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除直线
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveLine | Array<string> | Array<IPCB_PrimitiveLine>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| Array<string> \| Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)<!-- -->>
</td><td>
直线的图元 ID 或直线图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveLine.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取直线
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveLine | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
直线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| undefined>
直线图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveLine.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取直线
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveLine>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
直线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)<!-- -->>>
直线图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveLine.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有直线
## Signature
```typescript
getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveLine>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)<!-- -->>>
直线图元对象数组
### getallprimitiveid
# PCB\_PrimitiveLine.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有直线的图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
折线的图元 ID 数组
### modify
# PCB\_PrimitiveLine.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改直线
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveLine, property: {
net?: string;
layer?: TPCB_LayersOfLine;
startX?: number;
startY?: number;
endX?: number;
endY?: number;
lineWidth?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveLine | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ net?: string; layer?: [TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)<!-- -->; startX?: number; startY?: number; endX?: number; endY?: number; lineWidth?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveLine](./IPCB_PrimitiveLine.md) \| undefined>
直线图元对象
FILE:references/classes/PCB_PrimitiveObject.md
# PCB\_PrimitiveObject class
PCB & 封装 / 二进制内嵌对象图元类
## Signature
```typescript
declare class PCB_PrimitiveObject implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Remarks
彩色丝印图像属于二进制内嵌对象,需要使用二进制内嵌对象的方法创建和修改
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(layer, topLeftX, topLeftY, binaryData, width, height, rotation, mirror, fileName, primitiveLock)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 创建二进制内嵌对象
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 删除二进制内嵌对象
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 获取二进制内嵌对象
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 获取二进制内嵌对象
</td></tr>
<tr><td>
[getAll(layer, primitiveLock)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有二进制内嵌对象
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, primitiveLock)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有二进制内嵌对象的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveObject.md)
</td><td>
</td><td>
**_(BETA)_** 修改二进制内嵌对象
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveObject.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建二进制内嵌对象
## Signature
```typescript
create(layer: TPCB_LayersOfObject, topLeftX: number, topLeftY: number, binaryData: string, width: number, height: number, rotation?: number, mirror?: boolean, fileName?: string, primitiveLock?: boolean): Promise<IPCB_PrimitiveObject | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md)
</td><td>
层
</td></tr>
<tr><td>
topLeftX
</td><td>
number
</td><td>
左上点 X
</td></tr>
<tr><td>
topLeftY
</td><td>
number
</td><td>
左上点 Y
</td></tr>
<tr><td>
binaryData
</td><td>
string
</td><td>
二进制数据
</td></tr>
<tr><td>
width
</td><td>
number
</td><td>
宽
</td></tr>
<tr><td>
height
</td><td>
number
</td><td>
高
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否水平镜像
</td></tr>
<tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md) \| undefined>
- 二进制内嵌对象图元对象
### delete
# PCB\_PrimitiveObject.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除二进制内嵌对象
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveObject | Array<string> | Array<IPCB_PrimitiveObject>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md) \| Array<string> \| Array<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)<!-- -->>
</td><td>
二进制内嵌对象的图元 ID 或二进制内嵌对象图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveObject.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取二进制内嵌对象
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveObject | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
二进制内嵌对象的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md) \| undefined>
二进制内嵌对象图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveObject.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取二进制内嵌对象
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveObject>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
二进制内嵌对象的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)<!-- -->>>
二进制内嵌对象图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveObject.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有二进制内嵌对象
## Signature
```typescript
getAll(layer?: TPCB_LayersOfObject, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveObject>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)<!-- -->>>
二进制内嵌对象图元对象数组
### getallprimitiveid
# PCB\_PrimitiveObject.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有二进制内嵌对象的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfObject, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
二进制内嵌对象的图元 ID 数组
### modify
# PCB\_PrimitiveObject.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改二进制内嵌对象
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveObject, property: {
layer?: TPCB_LayersOfObject;
topLeftX?: number;
topLeftY?: number;
binaryData?: string;
width?: number;
height?: number;
rotation?: number;
mirror?: boolean;
fileName?: string;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveObject | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ layer?: [TPCB\_LayersOfObject](../types/TPCB_LayersOfObject.md)<!-- -->; topLeftX?: number; topLeftY?: number; binaryData?: string; width?: number; height?: number; rotation?: number; mirror?: boolean; fileName?: string; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveObject](./IPCB_PrimitiveObject.md) \| undefined>
二进制内嵌对象图元对象,`undefined` 表示修改失败
FILE:references/classes/PCB_PrimitivePad.md
# PCB\_PrimitivePad class
PCB & 封装 / 焊盘图元类
## Signature
```typescript
declare class PCB_PrimitivePad implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(layer, padNumber, x, y, rotation, pad, net, hole, holeOffsetX, holeOffsetY, holeRotation, metallization, padType, specialPad, solderMaskAndPasteMaskExpansion, heatWelding, primitiveLock)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
创建焊盘
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 删除焊盘
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 获取焊盘
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 获取焊盘
</td></tr>
<tr><td>
[getAll(layer, net, primitiveLock, padType)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有焊盘
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, net, primitiveLock, padType)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有焊盘的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitivePad.md)
</td><td>
</td><td>
**_(BETA)_** 修改焊盘
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitivePad.create() method
创建焊盘
## Signature
```typescript
create(layer: TPCB_LayersOfPad, padNumber: string, x: number, y: number, rotation?: number, pad?: TPCB_PrimitivePadShape, net?: string, hole?: TPCB_PrimitivePadHole | null, holeOffsetX?: number, holeOffsetY?: number, holeRotation?: number, metallization?: boolean, padType?: EPCB_PrimitivePadType, specialPad?: TPCB_PrimitiveSpecialPadShape, solderMaskAndPasteMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null, heatWelding?: IPCB_PrimitivePadHeatWelding | null, primitiveLock?: boolean): Promise<IPCB_PrimitivePad | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
</td><td>
层
</td></tr>
<tr><td>
padNumber
</td><td>
string
</td><td>
焊盘编号
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
位置 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
位置 Y
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
pad
</td><td>
[TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)
</td><td>
_(Optional)_ 焊盘外形,在特殊焊盘外形实现前,该参数必传
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
hole
</td><td>
[TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null
</td><td>
_(Optional)_ 孔,`null` 标识无孔
</td></tr>
<tr><td>
holeOffsetX
</td><td>
number
</td><td>
_(Optional)_ 孔偏移 X
</td></tr>
<tr><td>
holeOffsetY
</td><td>
number
</td><td>
_(Optional)_ 孔偏移 Y
</td></tr>
<tr><td>
holeRotation
</td><td>
number
</td><td>
_(Optional)_ 孔相对于焊盘的旋转角度
</td></tr>
<tr><td>
metallization
</td><td>
boolean
</td><td>
_(Optional)_ 是否金属化孔壁
</td></tr>
<tr><td>
padType
</td><td>
[EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
</td><td>
_(Optional)_ 焊盘类型
</td></tr>
<tr><td>
specialPad
</td><td>
[TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)
</td><td>
_(Optional)_ 特殊焊盘外形,当前暂未实现,请勿使用
</td></tr>
<tr><td>
solderMaskAndPasteMaskExpansion
</td><td>
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
</td><td>
_(Optional)_ 阻焊/助焊扩展,`null` 表示遵循规则
</td></tr>
<tr><td>
heatWelding
</td><td>
IPCB\_PrimitivePadHeatWelding \| null
</td><td>
_(Optional)_ 热焊优化参数
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md) \| undefined>
焊盘图元对象
### delete
# PCB\_PrimitivePad.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除焊盘
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitivePad | Array<string> | Array<IPCB_PrimitivePad>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md) \| Array<string> \| Array<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>
</td><td>
焊盘的图元 ID 或焊盘图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitivePad.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取焊盘
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitivePad | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
焊盘的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md) \| undefined>
焊盘图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitivePad.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取焊盘
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePad>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
焊盘的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>>
焊盘图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitivePad.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有焊盘
## Signature
```typescript
getAll(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType): Promise<Array<IPCB_PrimitivePad>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
<tr><td>
padType
</td><td>
[EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)<!-- -->>>
焊盘图元对象数组
### getallprimitiveid
# PCB\_PrimitivePad.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有焊盘的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
<tr><td>
padType
</td><td>
[EPCB\_PrimitivePadType](../enums/EPCB_PrimitivePadType.md)
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
焊盘的图元 ID 数组
### modify
# PCB\_PrimitivePad.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改焊盘
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitivePad, property: {
layer?: TPCB_LayersOfPad;
padNumber?: string;
x?: number;
y?: number;
rotation?: number;
pad?: TPCB_PrimitivePadShape;
net?: string;
hole?: TPCB_PrimitivePadHole | null;
holeOffsetX?: number;
holeOffsetY?: number;
holeRotation?: number;
metallization?: boolean;
specialPad?: TPCB_PrimitiveSpecialPadShape;
solderMaskAndPasteMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
heatWelding?: IPCB_PrimitivePadHeatWelding | null;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitivePad | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitivePad](./IPCB_PrimitivePad.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ layer?: [TPCB\_LayersOfPad](../types/TPCB_LayersOfPad.md)<!-- -->; padNumber?: string; x?: number; y?: number; rotation?: number; pad?: [TPCB\_PrimitivePadShape](../types/TPCB_PrimitivePadShape.md)<!-- -->; net?: string; hole?: [TPCB\_PrimitivePadHole](../types/TPCB_PrimitivePadHole.md) \| null; holeOffsetX?: number; holeOffsetY?: number; holeRotation?: number; metallization?: boolean; specialPad?: [TPCB\_PrimitiveSpecialPadShape](../types/TPCB_PrimitiveSpecialPadShape.md)<!-- -->; solderMaskAndPasteMaskExpansion?: [IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null; heatWelding?: IPCB\_PrimitivePadHeatWelding \| null; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePad](./IPCB_PrimitivePad.md) \| undefined>
焊盘图元对象
FILE:references/classes/PCB_PrimitivePolyline.md
# PCB\_PrimitivePolyline class
PCB & 封装 / 折线图元类
## Signature
```typescript
declare class PCB_PrimitivePolyline implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(net, layer, polygon, lineWidth, primitiveLock)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
创建折线
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 删除折线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 获取折线
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 获取折线
</td></tr>
<tr><td>
[getAll(net, layer, primitiveLock)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有折线
</td></tr>
<tr><td>
[getAllPrimitiveId(net, layer, primitiveLock)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有折线的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitivePolyline.md)
</td><td>
</td><td>
**_(BETA)_** 修改折线
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitivePolyline.create() method
创建折线
## Signature
```typescript
create(net: string, layer: TPCB_LayersOfLine, polygon: IPCB_Polygon, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitivePolyline | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
层
</td></tr>
<tr><td>
polygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
单多边形对象
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md) \| undefined>
折线图元对象
### delete
# PCB\_PrimitivePolyline.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除折线
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitivePolyline | Array<string> | Array<IPCB_PrimitivePolyline>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md) \| Array<string> \| Array<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>
</td><td>
折线的图元 ID 或折线图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitivePolyline.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取折线
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitivePolyline | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
折线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md) \| undefined>
折线图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitivePolyline.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取折线
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePolyline>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
折线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>>
折线图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitivePolyline.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有折线
## Signature
```typescript
getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<IPCB_PrimitivePolyline>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)<!-- -->>>
折线图元对象数组
### getallprimitiveid
# PCB\_PrimitivePolyline.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有折线的图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
折线的图元 ID 数组
### modify
# PCB\_PrimitivePolyline.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改折线
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitivePolyline, property: {
net?: string;
layer?: TPCB_LayersOfLine;
polygon?: IPCB_Polygon;
lineWidth?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitivePolyline | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ net?: string; layer?: [TPCB\_LayersOfLine](../types/TPCB_LayersOfLine.md)<!-- -->; polygon?: [IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->; lineWidth?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePolyline](./IPCB_PrimitivePolyline.md) \| undefined>
折线图元对象
FILE:references/classes/PCB_PrimitivePour.md
# PCB\_PrimitivePour class
PCB & 封装 / 覆铜边框图元类
## Signature
```typescript
declare class PCB_PrimitivePour implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(net, layer, complexPolygon, pourFillMethod, preserveSilos, pourName, pourPriority, lineWidth, primitiveLock)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 创建覆铜边框
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 删除覆铜边框
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 获取覆铜边框
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 获取覆铜边框
</td></tr>
<tr><td>
[getAll(net, layer, primitiveLock)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有覆铜边框图元
</td></tr>
<tr><td>
[getAllPrimitiveId(net, layer, primitiveLock)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有覆铜边框的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitivePour.md)
</td><td>
</td><td>
**_(BETA)_** 修改覆铜边框
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitivePour.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建覆铜边框
## Signature
```typescript
create(net: string, layer: TPCB_LayersOfCopper, complexPolygon: IPCB_Polygon, pourFillMethod?: EPCB_PrimitivePourFillMethod, preserveSilos?: boolean, pourName?: string, pourPriority?: number, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitivePour | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)
</td><td>
层
</td></tr>
<tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形对象
</td></tr>
<tr><td>
pourFillMethod
</td><td>
[EPCB\_PrimitivePourFillMethod](../enums/EPCB_PrimitivePourFillMethod.md)
</td><td>
_(Optional)_ 覆铜填充方法
</td></tr>
<tr><td>
preserveSilos
</td><td>
boolean
</td><td>
_(Optional)_ 是否保留孤岛
</td></tr>
<tr><td>
pourName
</td><td>
string
</td><td>
_(Optional)_ 覆铜名称
</td></tr>
<tr><td>
pourPriority
</td><td>
number
</td><td>
_(Optional)_ 覆铜优先级
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md) \| undefined>
覆铜边框图元对象
### delete
# PCB\_PrimitivePour.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除覆铜边框
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitivePour | Array<string> | Array<IPCB_PrimitivePour>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitivePour](./IPCB_PrimitivePour.md) \| Array<string> \| Array<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>
</td><td>
覆铜边框的图元 ID 或覆铜边框图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitivePour.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取覆铜边框
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitivePour | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
覆铜边框的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md) \| undefined>
覆铜边框图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitivePour.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取覆铜边框
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePour>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
覆铜边框的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>>
覆铜边框图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitivePour.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有覆铜边框图元
## Signature
```typescript
getAll(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean): Promise<Array<IPCB_PrimitivePour>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)<!-- -->>>
覆铜边框图元对象数组
### getallprimitiveid
# PCB\_PrimitivePour.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有覆铜边框的图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
layer
</td><td>
[TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
覆铜边框的图元 ID 数组
### modify
# PCB\_PrimitivePour.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改覆铜边框
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitivePour, property: {
net?: string;
layer?: TPCB_LayersOfCopper;
complexPolygon?: IPCB_Polygon;
pourFillMethod?: EPCB_PrimitivePourFillMethod;
preserveSilos?: boolean;
pourName?: string;
pourPriority?: number;
lineWidth?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitivePour | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitivePour](./IPCB_PrimitivePour.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ net?: string; layer?: [TPCB\_LayersOfCopper](../types/TPCB_LayersOfCopper.md)<!-- -->; complexPolygon?: [IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->; pourFillMethod?: [EPCB\_PrimitivePourFillMethod](../enums/EPCB_PrimitivePourFillMethod.md)<!-- -->; preserveSilos?: boolean; pourName?: string; pourPriority?: number; lineWidth?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePour](./IPCB_PrimitivePour.md) \| undefined>
覆铜边框图元对象,`undefined` 表示修改失败
FILE:references/classes/PCB_PrimitivePoured.md
# PCB\_PrimitivePoured class
PCB & 封装 / 覆铜填充图元类
## Signature
```typescript
declare class PCB_PrimitivePoured implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[delete(primitiveIds)](./PCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 删除覆铜填充
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 获取覆铜填充
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 获取覆铜填充
</td></tr>
<tr><td>
[getAll()](./PCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有覆铜填充图元
</td></tr>
<tr><td>
[getAllPrimitiveId()](./PCB_PrimitivePoured.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有覆铜填充的图元 ID
</td></tr>
</tbody></table>
---
## 方法详情
### delete
# PCB\_PrimitivePoured.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除覆铜填充
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitivePoured | Array<string> | Array<IPCB_PrimitivePoured>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitivePoured](./IPCB_PrimitivePoured.md) \| Array<string> \| Array<[IPCB\_PrimitivePoured](./IPCB_PrimitivePoured.md)<!-- -->>
</td><td>
覆铜填充的图元 ID 或覆铜填充图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitivePoured.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取覆铜填充
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitivePoured | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
覆铜填充的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitivePoured](./IPCB_PrimitivePoured.md) \| undefined>
覆铜填充图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitivePoured.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取覆铜填充
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitivePoured>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
覆铜填充的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitivePoured](./IPCB_PrimitivePoured.md)<!-- -->>>
覆铜填充图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitivePoured.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有覆铜填充图元
## Signature
```typescript
getAll(): Promise<Array<IPCB_PrimitivePoured>>;
```
## Returns
Promise<Array<[IPCB\_PrimitivePoured](./IPCB_PrimitivePoured.md)<!-- -->>>
覆铜填充图元对象数组
### getallprimitiveid
# PCB\_PrimitivePoured.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有覆铜填充的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
覆铜填充的图元 ID 数组
FILE:references/classes/PCB_PrimitiveRegion.md
# PCB\_PrimitiveRegion class
PCB & 封装 / 禁止区域和约束区域图元类
## Signature
```typescript
declare class PCB_PrimitiveRegion implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(layer, complexPolygon, ruleType, regionName, lineWidth, primitiveLock)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 创建区域
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 删除区域
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 获取区域
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 获取区域
</td></tr>
<tr><td>
[getAll(layer, ruleType, primitiveLock)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有区域
</td></tr>
<tr><td>
[getAllPrimitiveId(layer, ruleType, primitiveLock)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有区域的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveRegion.md)
</td><td>
</td><td>
**_(BETA)_** 修改区域
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveRegion.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建区域
## Signature
```typescript
create(layer: TPCB_LayersOfRegion, complexPolygon: IPCB_Polygon, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, regionName?: string, lineWidth?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveRegion | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)
</td><td>
层
</td></tr>
<tr><td>
complexPolygon
</td><td>
[IPCB\_Polygon](./IPCB_Polygon.md)
</td><td>
复杂多边形对象
</td></tr>
<tr><td>
ruleType
</td><td>
Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>
</td><td>
_(Optional)_ 区域规则类型
</td></tr>
<tr><td>
regionName
</td><td>
string
</td><td>
_(Optional)_ 区域名称
</td></tr>
<tr><td>
lineWidth
</td><td>
number
</td><td>
_(Optional)_ 线宽
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md) \| undefined>
区域图元对象
### delete
# PCB\_PrimitiveRegion.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除区域
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveRegion | Array<string> | Array<IPCB_PrimitiveRegion>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md) \| Array<string> \| Array<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>
</td><td>
区域的图元 ID 或区域图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveRegion.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取区域
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveRegion | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
区域的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md) \| undefined>
区域图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveRegion.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取区域
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveRegion>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
区域的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>>
区域图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveRegion.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有区域
## Signature
```typescript
getAll(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveRegion>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
ruleType
</td><td>
Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>
</td><td>
_(Optional)_ 区域规则类型,只会匹配所有规则类型均一致的图元
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)<!-- -->>>
区域图元对象数组
### getallprimitiveid
# PCB\_PrimitiveRegion.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有区域的图元 ID
## Signature
```typescript
getAllPrimitiveId(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
layer
</td><td>
[TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)
</td><td>
_(Optional)_ 层
</td></tr>
<tr><td>
ruleType
</td><td>
Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>
</td><td>
_(Optional)_ 区域规则类型,只会匹配所有规则类型均一致的图元
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
区域的图元 ID 数组
### modify
# PCB\_PrimitiveRegion.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改区域
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveRegion, property: {
layer?: TPCB_LayersOfRegion;
complexPolygon?: IPCB_Polygon;
ruleType?: Array<EPCB_PrimitiveRegionRuleType>;
regionName?: string;
lineWidth?: number;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveRegion | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ layer?: [TPCB\_LayersOfRegion](../types/TPCB_LayersOfRegion.md)<!-- -->; complexPolygon?: [IPCB\_Polygon](./IPCB_Polygon.md)<!-- -->; ruleType?: Array<[EPCB\_PrimitiveRegionRuleType](../enums/EPCB_PrimitiveRegionRuleType.md)<!-- -->>; regionName?: string; lineWidth?: number; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveRegion](./IPCB_PrimitiveRegion.md) \| undefined>
区域图元对象,`undefined` 表示修改失败
FILE:references/classes/PCB_PrimitiveString.md
# PCB\_PrimitiveString class
PCB & 封装 / 文本图元类
## Signature
```typescript
declare class PCB_PrimitiveString implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
FILE:references/classes/PCB_PrimitiveVia.md
# PCB\_PrimitiveVia class
PCB & 封装 / 过孔图元类
## Signature
```typescript
declare class PCB_PrimitiveVia implements IPCB_PrimitiveAPI
```
**Implements:** [IPCB\_PrimitiveAPI](../interfaces/IPCB_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(net, x, y, holeDiameter, diameter, viaType, designRuleBlindViaName, solderMaskExpansion, primitiveLock)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
创建过孔
</td></tr>
<tr><td>
[delete(primitiveIds)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 删除过孔
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 获取过孔
</td></tr>
<tr><td>
[get(primitiveIds)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 获取过孔
</td></tr>
<tr><td>
[getAll(net, primitiveLock)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有过孔
</td></tr>
<tr><td>
[getAllPrimitiveId(net, primitiveLock)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有过孔图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./PCB_PrimitiveVia.md)
</td><td>
</td><td>
**_(BETA)_** 修改过孔
</td></tr>
</tbody></table>
---
## 方法详情
### create
# PCB\_PrimitiveVia.create() method
创建过孔
## Signature
```typescript
create(net: string, x: number, y: number, holeDiameter: number, diameter: number, viaType?: EPCB_PrimitiveViaType, designRuleBlindViaName?: string | null, solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null, primitiveLock?: boolean): Promise<IPCB_PrimitiveVia | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
holeDiameter
</td><td>
number
</td><td>
孔径
</td></tr>
<tr><td>
diameter
</td><td>
number
</td><td>
外径
</td></tr>
<tr><td>
viaType
</td><td>
[EPCB\_PrimitiveViaType](../enums/EPCB_PrimitiveViaType.md)
</td><td>
_(Optional)_ 过孔类型
</td></tr>
<tr><td>
designRuleBlindViaName
</td><td>
string \| null
</td><td>
_(Optional)_ 盲埋孔设计规则项名称,定义过孔的开始层与结束层,`null` 表示非盲埋孔
</td></tr>
<tr><td>
solderMaskExpansion
</td><td>
[IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null
</td><td>
_(Optional)_ 阻焊/助焊扩展,`null` 表示跟随规则
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| undefined>
过孔图元对象
### delete
# PCB\_PrimitiveVia.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除过孔
## Signature
```typescript
delete(primitiveIds: string | IPCB_PrimitiveVia | Array<string> | Array<IPCB_PrimitiveVia>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| Array<string> \| Array<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>
</td><td>
过孔的图元 ID 或过孔图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# PCB\_PrimitiveVia.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取过孔
## Signature
```typescript
get(primitiveIds: string): Promise<IPCB_PrimitiveVia | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
过孔的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| undefined>
过孔图元对象,`undefined` 表示获取失败
### get_1
# PCB\_PrimitiveVia.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取过孔
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<IPCB_PrimitiveVia>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
过孔的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>>
过孔图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# PCB\_PrimitiveVia.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有过孔
## Signature
```typescript
getAll(net?: string, primitiveLock?: boolean): Promise<Array<IPCB_PrimitiveVia>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)<!-- -->>>
过孔图元对象数组
### getallprimitiveid
# PCB\_PrimitiveVia.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有过孔图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string, primitiveLock?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
primitiveLock
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
过孔的图元 ID 数组
### modify
# PCB\_PrimitiveVia.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改过孔
## Signature
```typescript
modify(primitiveId: string | IPCB_PrimitiveVia, property: {
net?: string;
x?: number;
y?: number;
holeDiameter?: number;
diameter?: number;
viaType?: EPCB_PrimitiveViaType;
designRuleBlindViaName?: string | null;
solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveVia | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ net?: string; x?: number; y?: number; holeDiameter?: number; diameter?: number; viaType?: [EPCB\_PrimitiveViaType](../enums/EPCB_PrimitiveViaType.md)<!-- -->; designRuleBlindViaName?: string \| null; solderMaskExpansion?: [IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion](../interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md) \| null; primitiveLock?: boolean; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[IPCB\_PrimitiveVia](./IPCB_PrimitiveVia.md) \| undefined>
过孔图元对象
FILE:references/classes/PCB_RayTracerEngine.md
# PCB\_RayTracerEngine class
PCB & 封装 / 光线追踪引擎类
## Signature
```typescript
declare class PCB_RayTracerEngine
```
## Remarks
控制光线追踪引擎的对接和交互
FILE:references/classes/PCB_SelectControl.md
# PCB\_SelectControl class
PCB & 封装 / 选择控制类
## Signature
```typescript
declare class PCB_SelectControl
```
## Remarks
获取或操作选择的元素
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[clearSelected()](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 清除选中
</td></tr>
<tr><td>
[doCrossProbeSelect(components, pins, nets, highlight, select)](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 进行交叉选择
</td></tr>
<tr><td>
[doSelectPrimitives(primitiveIds)](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 使用图元 ID 选中图元
</td></tr>
<tr><td>
[getAllSelectedPrimitives\_PrimitiveId()](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询所有已选中图元的图元 ID
</td></tr>
<tr><td>
[getAllSelectedPrimitives()](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询所有已选中图元的图元对象
</td></tr>
<tr><td>
[getCurrentMousePosition()](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前鼠标在画布上的位置
</td></tr>
<tr><td>
[getSelectedPrimitives()](./PCB_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询选中图元的所有参数
</td></tr>
</tbody></table>
---
## 方法详情
### clearselected
# PCB\_SelectControl.clearSelected() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
清除选中
## Signature
```typescript
clearSelected(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
### docrossprobeselect
# PCB\_SelectControl.doCrossProbeSelect() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
进行交叉选择
## Signature
```typescript
doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
components
</td><td>
Array<string>
</td><td>
_(Optional)_ 器件位号
</td></tr>
<tr><td>
pins
</td><td>
Array<string>
</td><td>
_(Optional)_ 器件位号\_引脚编号,格式为 \['U1\_1', 'U1\_2'\]
</td></tr>
<tr><td>
nets
</td><td>
Array<string>
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
highlight
</td><td>
boolean
</td><td>
_(Optional)_ 是否高亮
</td></tr>
<tr><td>
select
</td><td>
boolean
</td><td>
_(Optional)_ 操作是否成功
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
### doselectprimitives
# PCB\_SelectControl.doSelectPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用图元 ID 选中图元
## Signature
```typescript
doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| Array<string>
</td><td>
图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallselectedprimitives
# PCB\_SelectControl.getAllSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查询所有已选中图元的图元对象
## Signature
```typescript
getAllSelectedPrimitives(): Promise<Array<IPCB_Primitive>>;
```
## Returns
Promise<Array<[IPCB\_Primitive](../interfaces/IPCB_Primitive.md)<!-- -->>>
所有已选中图元的图元对象
### getallselectedprimitives_primitiveid
# PCB\_SelectControl.getAllSelectedPrimitives\_PrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查询所有已选中图元的图元 ID
## Signature
```typescript
getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
所有已选中图元的图元 ID
### getcurrentmouseposition
# PCB\_SelectControl.getCurrentMousePosition() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前鼠标在画布上的位置
## Signature
```typescript
getCurrentMousePosition(): Promise<{
x: number;
y: number;
} | undefined>;
```
## Returns
Promise<{ x: number; y: number; } \| undefined>
鼠标在画布上的位置,`undefined` 代表当前鼠标不在画布上
### getselectedprimitives
# PCB\_SelectControl.getSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> 请使用 [getAllSelectedPrimitives](./PCB_SelectControl.md) 替代
查询选中图元的所有参数
## Signature
```typescript
getSelectedPrimitives(): Promise<Array<Object>>;
```
## Returns
Promise<Array<Object>>
选中图元的所有参数
FILE:references/classes/PNL_Document.md
# PNL\_Document class
面板 / 文档操作类
## Signature
```typescript
declare class PNL_Document
```
## Remarks
对设计文档总体进行的操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[save()](./PNL_Document.md)
</td><td>
</td><td>
**_(BETA)_** 保存文档
</td></tr>
</tbody></table>
---
## 方法详情
### save
# PNL\_Document.save() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
保存文档
## Signature
```typescript
save(): Promise<boolean>;
```
## Returns
Promise<boolean>
保存操作是否成功,保存失败、上传失败等错误均返回 `false`
FILE:references/classes/SCH_Document.md
# SCH\_Document class
原理图 & 符号 / 文档操作类
## Signature
```typescript
declare class SCH_Document
```
## Remarks
对设计文档总体进行的操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[autoLayout(props)](./SCH_Document.md)
</td><td>
</td><td>
**_(BETA)_** 自动布局
</td></tr>
<tr><td>
[autoRouting(props)](./SCH_Document.md)
</td><td>
</td><td>
**_(BETA)_** 自动布线
</td></tr>
<tr><td>
[importChanges()](./SCH_Document.md)
</td><td>
</td><td>
从 PCB 导入变更
</td></tr>
<tr><td>
[save()](./SCH_Document.md)
</td><td>
</td><td>
保存文档
</td></tr>
</tbody></table>
---
## 方法详情
### autolayout
# SCH\_Document.autoLayout() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
自动布局
## Signature
```typescript
autoLayout(props?: {
uuids?: Array<string>;
netlist?: {
component: {
[uniqueId: string]: {
pinInfoMap: {
[key: string]: {
name: string;
number: string;
net: string;
props: {
'Pin Number': string;
};
};
};
};
};
};
designatorDeviceTypeMap?: {
[designator: string]: 'resistor' | 'capacitor' | 'inductive' | 'diode' | 'triode' | 'oscillator' | 'chip' | 'otherDevice';
};
}): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
props
</td><td>
{ uuids?: Array<string>; netlist?: { component: { \[uniqueId: string\]: { pinInfoMap: { \[key: string\]: { name: string; number: string; net: string; props: { 'Pin Number': string; }; }; }; }; }; }; designatorDeviceTypeMap?: { \[designator: string\]: 'resistor' \| 'capacitor' \| 'inductive' \| 'diode' \| 'triode' \| 'oscillator' \| 'chip' \| 'otherDevice'; }; }
</td><td>
_(Optional)_ 自动布局参数
</td></tr>
</tbody></table>
## Returns
Promise<any>
结果
### autorouting
# SCH\_Document.autoRouting() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
自动布线
## Signature
```typescript
autoRouting(props?: {
uuids?: Array<string>;
netlist?: {
component: {
[uniqueId: string]: {
pinInfoMap: {
[key: string]: {
name: string;
number: string;
net: string;
props: {
'Pin Number': string;
};
};
};
};
};
};
designatorDeviceTypeMap?: {
[designator: string]: 'resistor' | 'capacitor' | 'inductive' | 'diode' | 'triode' | 'oscillator' | 'chip' | 'otherDevice';
};
}): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
props
</td><td>
{ uuids?: Array<string>; netlist?: { component: { \[uniqueId: string\]: { pinInfoMap: { \[key: string\]: { name: string; number: string; net: string; props: { 'Pin Number': string; }; }; }; }; }; }; designatorDeviceTypeMap?: { \[designator: string\]: 'resistor' \| 'capacitor' \| 'inductive' \| 'diode' \| 'triode' \| 'oscillator' \| 'chip' \| 'otherDevice'; }; }
</td><td>
_(Optional)_ 自动布线参数
</td></tr>
</tbody></table>
## Returns
Promise<any>
结果
### importchanges
# SCH\_Document.importChanges() method
从 PCB 导入变更
## Signature
```typescript
importChanges(): Promise<boolean>;
```
## Returns
Promise<boolean>
导入操作是否成功,导入失败或游离原理图返回 `false`
### save
# SCH\_Document.save() method
保存文档
## Signature
```typescript
save(): Promise<boolean>;
```
## Returns
Promise<boolean>
保存操作是否成功,保存失败、上传失败等错误均返回 `false`
FILE:references/classes/SCH_Drc.md
# SCH\_Drc class
原理图 & 符号 / 设计规则检查(DRC)类
## Signature
```typescript
declare class SCH_Drc
```
## Remarks
检查、设定 DRC 规则
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[check(strict, userInterface, includeVerboseError)](./SCH_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 检查 DRC
</td></tr>
<tr><td>
[check(strict, userInterface, includeVerboseError)](./SCH_Drc.md)
</td><td>
</td><td>
**_(BETA)_** 检查 DRC
</td></tr>
</tbody></table>
---
## 方法详情
### check
# SCH\_Drc.check() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
检查 DRC
## Signature
```typescript
check(strict: boolean, userInterface: boolean, includeVerboseError: false): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
strict
</td><td>
boolean
</td><td>
是否严格检查,当前原理图统一为严格检查模式
</td></tr>
<tr><td>
userInterface
</td><td>
boolean
</td><td>
是否显示 UI(呼出底部 DRC 窗口)
</td></tr>
<tr><td>
includeVerboseError
</td><td>
false
</td><td>
是否在返回值中包含详细错误信息,如若为 `true`<!-- -->,则返回值将始终为数组
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
DRC 检查是否通过
### check_1
# SCH\_Drc.check() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
检查 DRC
## Signature
```typescript
check(strict: boolean, userInterface: boolean, includeVerboseError: true): Promise<Array<any>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
strict
</td><td>
boolean
</td><td>
是否严格检查,当前原理图统一为严格检查模式
</td></tr>
<tr><td>
userInterface
</td><td>
boolean
</td><td>
是否显示 UI(呼出底部 DRC 窗口)
</td></tr>
<tr><td>
includeVerboseError
</td><td>
true
</td><td>
是否在返回值中包含详细错误信息,如若为 `true`<!-- -->,则返回值将始终为数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<any>>
DRC 检查的详细结果
FILE:references/classes/SCH_Event.md
# SCH\_Event class
原理图 & 符号 / 事件类
## Signature
```typescript
declare class SCH_Event
```
## Remarks
注册事件回调
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addMouseEventListener(id, eventType, callFn, onlyOnce)](./SCH_Event.md)
</td><td>
</td><td>
新增鼠标事件监听
</td></tr>
<tr><td>
[addPrimitiveEventListener(id, eventType, callFn, onlyOnce)](./SCH_Event.md)
</td><td>
</td><td>
**_(BETA)_** 新增图元事件监听
</td></tr>
<tr><td>
[addSimulationEnginePullEventListener(id, eventType, callFn)](./SCH_Event.md)
</td><td>
</td><td>
**_(BETA)_** 注册仿真引擎拉取事件监听
</td></tr>
<tr><td>
[isEventListenerAlreadyExist(id)](./SCH_Event.md)
</td><td>
</td><td>
查询事件监听是否存在
</td></tr>
<tr><td>
[removeEventListener(id)](./SCH_Event.md)
</td><td>
</td><td>
移除事件监听
</td></tr>
</tbody></table>
---
## 方法详情
### addmouseeventlistener
# SCH\_Event.addMouseEventListener() method
新增鼠标事件监听
## Signature
```typescript
addMouseEventListener(id: string, eventType: 'all' | ESCH_MouseEventType, callFn: (eventType: ESCH_MouseEventType) => void | Promise<void>, onlyOnce?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all' \| [ESCH\_MouseEventType](../enums/ESCH_MouseEventType.md)
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: [ESCH\_MouseEventType](../enums/ESCH_MouseEventType.md)<!-- -->) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅监听一次
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### addprimitiveeventlistener
# SCH\_Event.addPrimitiveEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增图元事件监听
## Signature
```typescript
addPrimitiveEventListener(id: string, eventType: 'all' | ESCH_PrimitiveEventType, callFn: (eventType: ESCH_PrimitiveEventType, props: {
primitiveIds: Array<string>;
}) => void | Promise<void>, onlyOnce?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all' \| [ESCH\_PrimitiveEventType](../enums/ESCH_PrimitiveEventType.md)
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: [ESCH\_PrimitiveEventType](../enums/ESCH_PrimitiveEventType.md)<!-- -->, props: { primitiveIds: Array<string>; }) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
_(Optional)_ 是否仅监听一次
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### addsimulationenginepulleventlistener
# SCH\_Event.addSimulationEnginePullEventListener() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
注册仿真引擎拉取事件监听
## Signature
```typescript
addSimulationEnginePullEventListener(id: string, eventType: 'all', callFn: (eventType: ESCH_DynamicSimulationEnginePullEventType | ESCH_SpiceSimulationEnginePullEventType, props: {
[key: string]: any;
}) => void | Promise<void>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
eventType
</td><td>
'all'
</td><td>
事件类型
</td></tr>
<tr><td>
callFn
</td><td>
(eventType: [ESCH\_DynamicSimulationEnginePullEventType](../enums/ESCH_DynamicSimulationEnginePullEventType.md) \| [ESCH\_SpiceSimulationEnginePullEventType](../enums/ESCH_SpiceSimulationEnginePullEventType.md)<!-- -->, props: { \[key: string\]: any; }) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### iseventlisteneralreadyexist
# SCH\_Event.isEventListenerAlreadyExist() method
查询事件监听是否存在
## Signature
```typescript
isEventListenerAlreadyExist(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
事件监听是否存在
### removeeventlistener
# SCH\_Event.removeEventListener() method
移除事件监听
## Signature
```typescript
removeEventListener(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
是否移除指定事件监听
FILE:references/classes/SCH_ManufactureData.md
# SCH\_ManufactureData class
原理图 & 符号 / 生产资料类
## Signature
```typescript
declare class SCH_ManufactureData
```
## Remarks
获取当前原理图图页的生产资料文件及快捷下单
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getAssemblyVariantsConfigs()](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取装配体变量配置列表
</td></tr>
<tr><td>
[getBomFile(fileName, fileType, template, filterOptions, statistics, property, columns, assemblyVariantsConfig)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取 BOM 文件
</td></tr>
<tr><td>
[getExportDocumentFile(fileName, fileType, typeSpecificParams, object, objectSpecificParams)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取导出文档文件
</td></tr>
<tr><td>
[getNetlistFile(fileName, netlistType)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取网表文件(Netlist)
</td></tr>
<tr><td>
[getSimulationNetlistFile(fileName, netlistType)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 获取仿真网表文件
</td></tr>
<tr><td>
[placeComponentsOrder(interactive, ignoreWarning)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** 元件下单
</td></tr>
<tr><td>
[placeSmtComponentsOrder(interactive, ignoreWarning)](./SCH_ManufactureData.md)
</td><td>
</td><td>
**_(BETA)_** SMT 元件下单
</td></tr>
</tbody></table>
---
## 方法详情
### getassemblyvariantsconfigs
# SCH\_ManufactureData.getAssemblyVariantsConfigs() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取装配体变量配置列表
## Signature
```typescript
getAssemblyVariantsConfigs(): Promise<Array<{
text: string;
value: string;
}>>;
```
## Returns
Promise<Array<{ text: string; value: string; }>>
装配体变量配置列表
### getbomfile
# SCH\_ManufactureData.getBomFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 BOM 文件
## Signature
```typescript
getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{
property: string;
includeValue: boolean | string;
}>, statistics?: Array<string>, property?: Array<string>, columns?: Array<IPCB_BomPropertiesTableColumns>, assemblyVariantsConfig?: {
text: string;
value: string;
}): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
'xlsx' \| 'csv'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
template
</td><td>
string
</td><td>
_(Optional)_ 模板名称
</td></tr>
<tr><td>
filterOptions
</td><td>
Array<{ property: string; includeValue: boolean \| string; }>
</td><td>
_(Optional)_ 过滤规则,仅应包含需要启用的规则,`property` 为规则名称,`includeValue` 为匹配的值
</td></tr>
<tr><td>
statistics
</td><td>
Array<string>
</td><td>
_(Optional)_ 统计,包含所有需要启用的统计项的名称
</td></tr>
<tr><td>
property
</td><td>
Array<string>
</td><td>
_(Optional)_ 属性,包含所有需要启用的属性的名称
</td></tr>
<tr><td>
columns
</td><td>
Array<[IPCB\_BomPropertiesTableColumns](../interfaces/IPCB_BomPropertiesTableColumns.md)<!-- -->>
</td><td>
_(Optional)_ 列的属性及排序,`title`<!-- -->、`sort`<!-- -->、`group`<!-- -->、`orderWeight` 不传入则取默认值,`null` 代表 \*\*无\*\* 或 \*\*空\*\*
</td></tr>
<tr><td>
assemblyVariantsConfig
</td><td>
\{ text: string; value: string; \}
</td><td>
_(Optional)_ 装配体变量配置
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
BOM 文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### getexportdocumentfile
# SCH\_ManufactureData.getExportDocumentFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取导出文档文件
## Signature
```typescript
getExportDocumentFile(fileName?: string, fileType?: ESCH_ExportDocumentFileType, typeSpecificParams?: {
theme?: 'Default' | 'White on Black' | 'Black on White';
lineWidth?: 'Default' | 'Always 1px' | 'Follow the Zoom Change';
displayAttributesAsMenu?: boolean;
size?: 'Original Size' | string | {
width: number;
height: number;
unit: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER;
};
}, object?: 'All Schematic' | 'Current Schematic' | 'Current Schematic Page' | string, objectSpecificParams?: {
range?: 'All' | [number, number];
outputMethod?: 'Merged sheet' | 'Separated sheet';
}): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
fileType
</td><td>
[ESCH\_ExportDocumentFileType](../enums/ESCH_ExportDocumentFileType.md)
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
typeSpecificParams
</td><td>
{ theme?: 'Default' \| 'White on Black' \| 'Black on White'; lineWidth?: 'Default' \| 'Always 1px' \| 'Follow the Zoom Change'; displayAttributesAsMenu?: boolean; size?: 'Original Size' \| string \| { width: number; height: number; unit: [ESYS\_Unit.INCH](../enums/ESYS_Unit.md) \| [ESYS\_Unit.MILLIMETER](../enums/ESYS_Unit.md)<!-- -->; }; }
</td><td>
_(Optional)_ 类型特定参数
</td></tr>
<tr><td>
object
</td><td>
'All Schematic' \| 'Current Schematic' \| 'Current Schematic Page' \| string
</td><td>
_(Optional)_ 对象
</td></tr>
<tr><td>
objectSpecificParams
</td><td>
{ range?: 'All' \| \[number, number\]; outputMethod?: 'Merged sheet' \| 'Separated sheet'; }
</td><td>
_(Optional)_ 对象特定参数
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
导出文档文件数据(或压缩包)
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### getnetlistfile
# SCH\_ManufactureData.getNetlistFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取网表文件(Netlist)
## Signature
```typescript
getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
netlistType
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md)
</td><td>
_(Optional)_ 网表类型
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
网表文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### getsimulationnetlistfile
# SCH\_ManufactureData.getSimulationNetlistFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取仿真网表文件
## Signature
```typescript
getSimulationNetlistFile(fileName?: string, netlistType?: ESCH_SimulationNetlistType): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
netlistType
</td><td>
[ESCH\_SimulationNetlistType](../enums/ESCH_SimulationNetlistType.md)
</td><td>
_(Optional)_ 网表类型
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
仿真网表文件数据
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
### placecomponentsorder
# SCH\_ManufactureData.placeComponentsOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
元件下单
## Signature
```typescript
placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
### placesmtcomponentsorder
# SCH\_ManufactureData.placeSmtComponentsOrder() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
SMT 元件下单
## Signature
```typescript
placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
interactive
</td><td>
boolean
</td><td>
_(Optional)_ 是否启用交互式检查
如若启用,则会存在弹窗等待用户进行交互,且无法使用 `ignoreWarning` 参数忽略警告, 即 `ignoreWarning` 参数将被忽略;
如若禁用,则在调用后不会有任何 EDA 内部弹窗,程序执行静默检查, 如若达成下单条件,将返回 `true` 并在新标签页打开下单页面
</td></tr>
<tr><td>
ignoreWarning
</td><td>
boolean
</td><td>
_(Optional)_ 在非交互式检查时忽略警告
如果设置为 `true`<!-- -->,将会忽略所有检查警告项并尽可能生成下单资料;
如果设置为 `false`<!-- -->,存在任意警告将中断执行并返回 `false` 的结果
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否通过下单检查
FILE:references/classes/SCH_Net.md
# SCH\_Net class
原理图 & 符号 / 网络类
## Signature
```typescript
declare class SCH_Net
```
FILE:references/classes/SCH_Netlist.md
# SCH\_Netlist class
原理图 & 符号 / 网表类
## Signature
```typescript
declare class SCH_Netlist
```
## Remarks
获取、更新网表
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getNetlist(type)](./SCH_Netlist.md)
</td><td>
</td><td>
获取网表
</td></tr>
<tr><td>
[setNetlist(type, netlist)](./SCH_Netlist.md)
</td><td>
</td><td>
**_(BETA)_** 更新网表
</td></tr>
</tbody></table>
---
## 方法详情
### getnetlist
# SCH\_Netlist.getNetlist() method
> Warning: This API is now obsolete.
>
> 请使用 [SCH\_ManufactureData.getNetlistFile()](./SCH_ManufactureData.md) 替代
获取网表
## Signature
```typescript
getNetlist(type?: ESYS_NetlistType): Promise<string>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md)
</td><td>
_(Optional)_ 网表格式
</td></tr>
</tbody></table>
## Returns
Promise<string>
网表数据
### setnetlist
# SCH\_Netlist.setNetlist() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
更新网表
## Signature
```typescript
setNetlist(type: ESYS_NetlistType | undefined, netlist: string): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[ESYS\_NetlistType](../enums/ESYS_NetlistType.md) \| undefined
</td><td>
网表格式
</td></tr>
<tr><td>
netlist
</td><td>
string
</td><td>
网表数据
</td></tr>
</tbody></table>
## Returns
Promise<void>
FILE:references/classes/SCH_Primitive.md
# SCH\_Primitive class
原理图 & 符号 / 图元类
## Signature
```typescript
declare class SCH_Primitive
```
## Remarks
图元的统一操作
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getPrimitiveByPrimitiveId(id)](./SCH_Primitive.md)
</td><td>
</td><td>
获取指定 ID 的图元的所有属性
</td></tr>
<tr><td>
[getPrimitivesBBox(primitiveIds)](./SCH_Primitive.md)
</td><td>
</td><td>
**_(BETA)_** 获取图元的 BBox
</td></tr>
<tr><td>
[getPrimitiveTypeByPrimitiveId(id)](./SCH_Primitive.md)
</td><td>
</td><td>
**_(BETA)_** 获取指定 ID 的图元的图元类型
</td></tr>
</tbody></table>
---
## 方法详情
### getprimitivebyprimitiveid
# SCH\_Primitive.getPrimitiveByPrimitiveId() method
获取指定 ID 的图元的所有属性
## Signature
```typescript
getPrimitiveByPrimitiveId(id: string): Promise<ISCH_Primitive | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_Primitive](../interfaces/ISCH_Primitive.md) \| undefined>
图元的所有属性
### getprimitivesbbox
# SCH\_Primitive.getPrimitivesBBox() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取图元的 BBox
## Signature
```typescript
getPrimitivesBBox(primitiveIds: Array<string | ISCH_Primitive>): Promise<{
minX: number;
minY: number;
maxX: number;
maxY: number;
} | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string \| [ISCH\_Primitive](../interfaces/ISCH_Primitive.md)<!-- -->>
</td><td>
图元 ID 数组或图元对象数组
</td></tr>
</tbody></table>
## Returns
Promise<{ minX: number; minY: number; maxX: number; maxY: number; } \| undefined>
图元的 BBox,如若图元不存在或没有 BBox,将会返回 `undefined` 的结果
### getprimitivetypebyprimitiveid
# SCH\_Primitive.getPrimitiveTypeByPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取指定 ID 的图元的图元类型
## Signature
```typescript
getPrimitiveTypeByPrimitiveId(id: string): Promise<ESCH_PrimitiveType | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<[ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md) \| undefined>
图元类型
FILE:references/classes/SCH_PrimitiveArc.md
# SCH\_PrimitiveArc class
原理图 & 符号 / 圆弧图元类
## Signature
```typescript
declare class SCH_PrimitiveArc implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(startX, startY, referenceX, referenceY, endX, endY, color, fillColor, lineWidth, lineType)](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 创建圆弧
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 删除圆弧
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆弧
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆弧
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆弧
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆弧的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveArc.md)
</td><td>
</td><td>
**_(BETA)_** 修改圆弧
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveArc.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建圆弧
## Signature
```typescript
create(startX: number, startY: number, referenceX: number, referenceY: number, endX: number, endY: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
startX
</td><td>
number
</td><td>
起始点 X
</td></tr>
<tr><td>
startY
</td><td>
number
</td><td>
起始点 Y
</td></tr>
<tr><td>
referenceX
</td><td>
number
</td><td>
参考点 X
</td></tr>
<tr><td>
referenceY
</td><td>
number
</td><td>
参考点 Y
</td></tr>
<tr><td>
endX
</td><td>
number
</td><td>
终止点 X
</td></tr>
<tr><td>
endY
</td><td>
number
</td><td>
终止点 Y
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 颜色,`null` 表示默认
</td></tr>
<tr><td>
fillColor
</td><td>
string \| null
</td><td>
_(Optional)_ 填充颜色,`none` 表示无填充,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md) \| undefined>
圆弧图元对象
### delete
# SCH\_PrimitiveArc.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除圆弧
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveArc | Array<string> | Array<ISCH_PrimitiveArc>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md) \| Array<string> \| Array<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)<!-- -->>
</td><td>
圆弧的图元 ID 或圆弧图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveArc.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆弧
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
圆弧的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md) \| undefined>
圆弧图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveArc.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆弧
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveArc>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
圆弧的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)<!-- -->>>
圆弧图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveArc.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆弧
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitiveArc>>;
```
## Returns
Promise<Array<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)<!-- -->>>
圆弧图元对象数组
### getallprimitiveid
# SCH\_PrimitiveArc.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆弧的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
圆弧的图元 ID 数组
### modify
# SCH\_PrimitiveArc.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改圆弧
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveArc, property: {
startX?: number;
startY?: number;
referenceX?: number;
referenceY?: number;
endX?: number;
endY?: number;
color?: string | null;
fillColor?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
}): Promise<ISCH_PrimitiveArc | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ startX?: number; startY?: number; referenceX?: number; referenceY?: number; endX?: number; endY?: number; color?: string \| null; fillColor?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveArc](./ISCH_PrimitiveArc.md) \| undefined>
圆弧图元对象
FILE:references/classes/SCH_PrimitiveAttribute.md
# SCH\_PrimitiveAttribute class
原理图 & 符号 / 属性图元类
## Signature
```typescript
declare class SCH_PrimitiveAttribute implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[get(primitiveIds)](./SCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 获取属性
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 获取属性
</td></tr>
<tr><td>
[getAll(parentPrimitiveId)](./SCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有属性
</td></tr>
<tr><td>
[getAllPrimitiveId(parentPrimitiveId)](./SCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有属性的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveAttribute.md)
</td><td>
</td><td>
**_(BETA)_** 修改属性
</td></tr>
</tbody></table>
---
## 方法详情
### get
# SCH\_PrimitiveAttribute.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取属性
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveAttribute | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
属性的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md) \| undefined>
属性图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveAttribute.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取属性
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveAttribute>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
属性的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)<!-- -->>>
属性图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveAttribute.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有属性
## Signature
```typescript
getAll(parentPrimitiveId?: string): Promise<Array<ISCH_PrimitiveAttribute>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
parentPrimitiveId
</td><td>
string
</td><td>
_(Optional)_ 父图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)<!-- -->>>
属性图元对象数组
## Remarks
不传递父图元 ID 将拿到图页中的所有属性图元
### getallprimitiveid
# SCH\_PrimitiveAttribute.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有属性的图元 ID
## Signature
```typescript
getAllPrimitiveId(parentPrimitiveId?: string): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
parentPrimitiveId
</td><td>
string
</td><td>
_(Optional)_ 父图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
属性的图元 ID 数组
## Remarks
不传递父图元 ID 将拿到图页中的所有属性图元
### modify
# SCH\_PrimitiveAttribute.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改属性
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveAttribute, property: {
x?: number | null;
y?: number | null;
rotation?: number | null;
color?: string | null;
fontName?: string | null;
fontSize?: number | null;
bold?: boolean | null;
italic?: boolean | null;
underLine?: boolean | null;
alignMode?: ESCH_PrimitiveTextAlignMode | null;
fillColor?: string | null;
key?: string;
value?: string;
keyVisible?: boolean | null;
valueVisible?: boolean | null;
}): Promise<ISCH_PrimitiveAttribute | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ x?: number \| null; y?: number \| null; rotation?: number \| null; color?: string \| null; fontName?: string \| null; fontSize?: number \| null; bold?: boolean \| null; italic?: boolean \| null; underLine?: boolean \| null; alignMode?: [ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md) \| null; fillColor?: string \| null; key?: string; value?: string; keyVisible?: boolean \| null; valueVisible?: boolean \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveAttribute](./ISCH_PrimitiveAttribute.md) \| undefined>
属性图元对象
FILE:references/classes/SCH_PrimitiveBus.md
# SCH\_PrimitiveBus class
原理图 & 符号 / 总线图元类
## Signature
```typescript
declare class SCH_PrimitiveBus implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(busName, line, color, lineWidth, lineType)](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 创建总线
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 删除总线
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 获取总线
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 获取总线
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有总线
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有总线的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveBus.md)
</td><td>
</td><td>
**_(BETA)_** 修改总线
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveBus.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建总线
## Signature
```typescript
create(busName: string, line: Array<number> | Array<Array<number>>, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveBus | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
busName
</td><td>
string
</td><td>
总线名称
</td></tr>
<tr><td>
line
</td><td>
Array<number> \| Array<Array<number>>
</td><td>
多段线坐标组,每段都是连续的一组 `[x1, y1, x2, y2, x3, y3]` 所描述的线,如若多段线彼此无任何连接则创建将会失败
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 总线颜色,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md) \| undefined>
总线图元对象
### delete
# SCH\_PrimitiveBus.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除总线
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveBus | Array<string> | Array<ISCH_PrimitiveBus>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md) \| Array<string> \| Array<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)<!-- -->>
</td><td>
总线的图元 ID 或总线图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveBus.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取总线
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveBus | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
总线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md) \| undefined>
总线图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveBus.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取总线
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveBus>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
总线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)<!-- -->>>
总线图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveBus.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有总线
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitiveBus>>;
```
## Returns
Promise<Array<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)<!-- -->>>
总线图元对象数组
### getallprimitiveid
# SCH\_PrimitiveBus.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有总线的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
总线的图元 ID 数组
### modify
# SCH\_PrimitiveBus.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改总线
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveBus, property: {
busName?: string;
line?: Array<number> | Array<Array<number>>;
color?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
}): Promise<ISCH_PrimitiveBus | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md)
</td><td>
总线的图元 ID 或总线图元对象
</td></tr>
<tr><td>
property
</td><td>
{ busName?: string; line?: Array<number> \| Array<Array<number>>; color?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveBus](./ISCH_PrimitiveBus.md) \| undefined>
总线图元对象
FILE:references/classes/SCH_PrimitiveCircle.md
# SCH\_PrimitiveCircle class
原理图 & 符号 / 圆图元类
## Signature
```typescript
declare class SCH_PrimitiveCircle implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(centerX, centerY, radius, color, fillColor, lineWidth, lineType, fillStyle)](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 创建圆
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 删除圆
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 获取圆
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有圆的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveCircle.md)
</td><td>
</td><td>
**_(BETA)_** 修改圆
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveCircle.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建圆
## Signature
```typescript
create(centerX: number, centerY: number, radius: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null): Promise<ISCH_PrimitiveCircle>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
centerX
</td><td>
number
</td><td>
圆心 X
</td></tr>
<tr><td>
centerY
</td><td>
number
</td><td>
圆心 Y
</td></tr>
<tr><td>
radius
</td><td>
number
</td><td>
半径
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 颜色,`null` 表示默认
</td></tr>
<tr><td>
fillColor
</td><td>
string \| null
</td><td>
_(Optional)_ 填充颜色,`none` 表示无填充,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
<tr><td>
fillStyle
</td><td>
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
</td><td>
_(Optional)_ 填充样式,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->>
圆图元对象
### delete
# SCH\_PrimitiveCircle.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除圆
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveCircle | Array<string> | Array<ISCH_PrimitiveCircle>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md) \| Array<string> \| Array<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->>
</td><td>
圆的图元 ID 或圆图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveCircle.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveCircle | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
圆的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md) \| undefined>
圆图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveCircle.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取圆
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveCircle>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
圆的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->>>
圆图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveCircle.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitiveCircle>>;
```
## Returns
Promise<Array<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)<!-- -->>>
圆图元对象数组
### getallprimitiveid
# SCH\_PrimitiveCircle.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有圆的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
圆的图元 ID 数组
### modify
# SCH\_PrimitiveCircle.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改圆
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveCircle, property: {
centerX?: number;
centerY?: number;
radius?: number;
color?: string | null;
fillColor?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
fillStyle?: ESCH_PrimitiveFillStyle | null;
}): Promise<ISCH_PrimitiveCircle | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ centerX?: number; centerY?: number; radius?: number; color?: string \| null; fillColor?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; fillStyle?: [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveCircle](./ISCH_PrimitiveCircle.md) \| undefined>
圆图元对象
FILE:references/classes/SCH_PrimitiveComponent.md
# SCH\_PrimitiveComponent class
原理图 & 符号 / 器件图元类
## Signature
```typescript
declare class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(component, x, y, subPartName, rotation, mirror, addIntoBom, addIntoPcb)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 创建器件
</td></tr>
<tr><td>
[createNetFlag(identification, net, x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 创建网络标识
</td></tr>
<tr><td>
[createNetPort(direction, net, x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 创建网络端口
</td></tr>
<tr><td>
[createShortCircuitFlag(x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 创建短接标识
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 删除器件
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件
</td></tr>
<tr><td>
[getAll(componentType, allSchematicPages)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有器件
</td></tr>
<tr><td>
[getAllPinsByPrimitiveId(primitiveId)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取器件关联的所有引脚
</td></tr>
<tr><td>
[getAllPrimitiveId(componentType, allSchematicPages)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有器件的图元 ID
</td></tr>
<tr><td>
[getAllPropertyNames()](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有器件的所有属性名称集合
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 修改器件
</td></tr>
<tr><td>
[placeComponentWithMouse(component, subPartName)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 使用鼠标放置器件
</td></tr>
<tr><td>
[setNetFlagComponentUuid\_AnalogGround(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 AnalogGround 网络标识关联的器件 UUID
</td></tr>
<tr><td>
[setNetFlagComponentUuid\_Ground(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 Ground 网络标识关联的器件 UUID
</td></tr>
<tr><td>
[setNetFlagComponentUuid\_Power(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 Power 网络标识关联的器件 UUID
</td></tr>
<tr><td>
[setNetFlagComponentUuid\_ProtectGround(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 ProtectGround 网络标识关联的器件 UUID
</td></tr>
<tr><td>
[setNetPortComponentUuid\_BI(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 BI 网络端口关联的器件 UUID
</td></tr>
<tr><td>
[setNetPortComponentUuid\_IN(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 IN 网络端口关联的器件 UUID
</td></tr>
<tr><td>
[setNetPortComponentUuid\_OUT(component)](./SCH_PrimitiveComponent.md)
</td><td>
</td><td>
**_(BETA)_** 设置在扩展 API 中 OUT 网络端口关联的器件 UUID
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveComponent.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建器件
## Signature
```typescript
create(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem, x: number, y: number, subPartName?: string, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
subPartName
</td><td>
string
</td><td>
_(Optional)_ 子图块名称
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否镜像
</td></tr>
<tr><td>
addIntoBom
</td><td>
boolean
</td><td>
_(Optional)_ 是否加入 BOM
</td></tr>
<tr><td>
addIntoPcb
</td><td>
boolean
</td><td>
_(Optional)_ 是否转到 PCB
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象
### createnetflag
# SCH\_PrimitiveComponent.createNetFlag() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建网络标识
## Signature
```typescript
createNetFlag(identification: 'Power' | 'Ground' | 'AnalogGround' | 'ProtectGround', net: string, x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
identification
</td><td>
'Power' \| 'Ground' \| 'AnalogGround' \| 'ProtectGround'
</td><td>
标识类型
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否镜像
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象
### createnetport
# SCH\_PrimitiveComponent.createNetPort() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建网络端口
## Signature
```typescript
createNetPort(direction: 'IN' | 'OUT' | 'BI', net: string, x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
direction
</td><td>
'IN' \| 'OUT' \| 'BI'
</td><td>
端口方向
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否镜像
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象
### createshortcircuitflag
# SCH\_PrimitiveComponent.createShortCircuitFlag() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建短接标识
## Signature
```typescript
createShortCircuitFlag(x: number, y: number, rotation?: number, mirror?: boolean): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度
</td></tr>
<tr><td>
mirror
</td><td>
boolean
</td><td>
_(Optional)_ 是否镜像
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象
### delete
# SCH\_PrimitiveComponent.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除器件
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveComponent$1 | Array<string> | Array<ISCH_PrimitiveComponent$1>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| ISCH\_PrimitiveComponent$1 \| Array<string> \| Array<ISCH\_PrimitiveComponent$1>
</td><td>
器件的图元 ID 或器件图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveComponent.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveComponent.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveComponent$1>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
器件的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<ISCH\_PrimitiveComponent$1>>
器件图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveComponent.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有器件
## Signature
```typescript
getAll(componentType?: ESCH_PrimitiveComponentType$1, allSchematicPages?: boolean): Promise<Array<ISCH_PrimitiveComponent$1>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
componentType
</td><td>
[ESCH\_PrimitiveComponentType$1](../enums/ESCH_PrimitiveComponentType.md)
</td><td>
_(Optional)_ 器件类型
</td></tr>
<tr><td>
allSchematicPages
</td><td>
boolean
</td><td>
_(Optional)_ 是否获取所有原理图图页的器件
</td></tr>
</tbody></table>
## Returns
Promise<Array<ISCH\_PrimitiveComponent$1>>
器件图元对象数组
### getallpinsbyprimitiveid
# SCH\_PrimitiveComponent.getAllPinsByPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取器件关联的所有引脚
## Signature
```typescript
getAllPinsByPrimitiveId(primitiveId: string): Promise<Array<ISCH_PrimitiveComponentPin> | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string
</td><td>
器件图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md)<!-- -->> \| undefined>
器件引脚图元数组
### getallprimitiveid
# SCH\_PrimitiveComponent.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有器件的图元 ID
## Signature
```typescript
getAllPrimitiveId(componentType?: ESCH_PrimitiveComponentType$1, allSchematicPages?: boolean): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
componentType
</td><td>
[ESCH\_PrimitiveComponentType$1](../enums/ESCH_PrimitiveComponentType.md)
</td><td>
_(Optional)_ 器件类型
</td></tr>
<tr><td>
allSchematicPages
</td><td>
boolean
</td><td>
_(Optional)_ 是否获取所有原理图图页的器件
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
器件的图元 ID 数组
### getallpropertynames
# SCH\_PrimitiveComponent.getAllPropertyNames() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有器件的所有属性名称集合
## Signature
```typescript
getAllPropertyNames(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
所有器件的所有属性名称集合
### modify
# SCH\_PrimitiveComponent.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改器件
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveComponent$1, property: {
x?: number;
y?: number;
rotation?: number;
mirror?: boolean;
addIntoBom?: boolean;
addIntoPcb?: boolean;
designator?: string | null;
name?: string | null;
uniqueId?: string | null;
manufacturer?: string | null;
manufacturerId?: string | null;
supplier?: string | null;
supplierId?: string | null;
otherProperty?: {
[key: string]: string | number | boolean;
};
}): Promise<ISCH_PrimitiveComponent$1 | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| ISCH\_PrimitiveComponent$1
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
\{ x?: number; y?: number; rotation?: number; mirror?: boolean; addIntoBom?: boolean; addIntoPcb?: boolean; designator?: string \| null; name?: string \| null; uniqueId?: string \| null; manufacturer?: string \| null; manufacturerId?: string \| null; supplier?: string \| null; supplierId?: string \| null; otherProperty?: \{ \[key: string\]: string \| number \| boolean; \}; \}
</td><td>
</td></tr>
</tbody></table>
## Returns
Promise<ISCH\_PrimitiveComponent$1 \| undefined>
器件图元对象
## Remarks
仅当器件类型为 [COMPONENT](../enums/ESCH_PrimitiveComponentType.md) 时允许使用该方法进行修改
### placecomponentwithmouse
# SCH\_PrimitiveComponent.placeComponentWithMouse() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用鼠标放置器件
## Signature
```typescript
placeComponentWithMouse(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem, subPartName?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
<tr><td>
subPartName
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否找到器件
## Remarks
本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布
本接口的返回时机并不会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 `true` 的结果
### setnetflagcomponentuuid_analogground
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_AnalogGround() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 AnalogGround 网络标识关联的器件 UUID
## Signature
```typescript
setNetFlagComponentUuid_AnalogGround(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetflagcomponentuuid_ground
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_Ground() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 Ground 网络标识关联的器件 UUID
## Signature
```typescript
setNetFlagComponentUuid_Ground(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetflagcomponentuuid_power
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_Power() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 Power 网络标识关联的器件 UUID
## Signature
```typescript
setNetFlagComponentUuid_Power(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetflagcomponentuuid_protectground
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_ProtectGround() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 ProtectGround 网络标识关联的器件 UUID
## Signature
```typescript
setNetFlagComponentUuid_ProtectGround(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetportcomponentuuid_bi
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_BI() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 BI 网络端口关联的器件 UUID
## Signature
```typescript
setNetPortComponentUuid_BI(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetportcomponentuuid_in
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_IN() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 IN 网络端口关联的器件 UUID
## Signature
```typescript
setNetPortComponentUuid_IN(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### setnetportcomponentuuid_out
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_OUT() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
设置在扩展 API 中 OUT 网络端口关联的器件 UUID
## Signature
```typescript
setNetPortComponentUuid_OUT(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem | ILIB_DeviceSearchItem): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
component
</td><td>
{ libraryUuid: string; uuid: string; } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
</td><td>
关联库器件
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
FILE:references/classes/SCH_PrimitiveObject.md
# SCH\_PrimitiveObject class
原理图 & 符号 / 二进制内嵌对象图元类
## Signature
```typescript
declare class SCH_PrimitiveObject implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
FILE:references/classes/SCH_PrimitivePin.md
# SCH\_PrimitivePin class
原理图 & 符号 / 引脚图元类
## Signature
```typescript
declare class SCH_PrimitivePin implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Remarks
引脚图元仅符号编辑器可用,在原理图图页内,关联到符号的引脚被称为 [器件引脚图元](./ISCH_PrimitiveComponentPin.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(x, y, pinNumber, pinName, rotation, pinLength, pinColor, pinShape, pinType)](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 创建引脚
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 删除引脚
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 获取引脚
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 获取引脚
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有引脚
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有引脚的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitivePin.md)
</td><td>
</td><td>
**_(BETA)_** 修改引脚
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitivePin.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建引脚
## Signature
```typescript
create(x: number, y: number, pinNumber: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: ESCH_PrimitivePinShape, pinType?: ESCH_PrimitivePinType): Promise<ISCH_PrimitivePin | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
pinNumber
</td><td>
string
</td><td>
引脚编号
</td></tr>
<tr><td>
pinName
</td><td>
string
</td><td>
_(Optional)_ 引脚名称
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度,可选 `0` `90` `180` `270`
</td></tr>
<tr><td>
pinLength
</td><td>
number
</td><td>
_(Optional)_ 引脚长度
</td></tr>
<tr><td>
pinColor
</td><td>
string \| null
</td><td>
_(Optional)_ 引脚颜色,`null` 表示默认
</td></tr>
<tr><td>
pinShape
</td><td>
[ESCH\_PrimitivePinShape](../enums/ESCH_PrimitivePinShape.md)
</td><td>
_(Optional)_ 引脚形状
</td></tr>
<tr><td>
pinType
</td><td>
[ESCH\_PrimitivePinType](../enums/ESCH_PrimitivePinType.md)
</td><td>
_(Optional)_ 引脚类型
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| undefined>
引脚图元对象
### delete
# SCH\_PrimitivePin.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除引脚
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitivePin | Array<string> | Array<ISCH_PrimitivePin>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| Array<string> \| Array<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)<!-- -->>
</td><td>
引脚的图元 ID 或引脚图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitivePin.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取引脚
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
引脚的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| [ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md) \| undefined>
引脚图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitivePin.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取引脚
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
引脚的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| [ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md)<!-- -->>>
引脚图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitivePin.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有引脚
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitivePin>>;
```
## Returns
Promise<Array<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md)<!-- -->>>
引脚图元对象数组
### getallprimitiveid
# SCH\_PrimitivePin.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有引脚的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
引脚的图元 ID 数组
### modify
# SCH\_PrimitivePin.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改引脚
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitivePin | ISCH_PrimitiveComponentPin, property: {
x?: number;
y?: number;
pinNumber?: string;
pinName?: string;
rotation?: number;
pinLength?: number;
pinColor?: string | null;
pinShape?: ESCH_PrimitivePinShape;
pinType?: ESCH_PrimitivePinType;
}): Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| [ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ x?: number; y?: number; pinNumber?: string; pinName?: string; rotation?: number; pinLength?: number; pinColor?: string \| null; pinShape?: [ESCH\_PrimitivePinShape](../enums/ESCH_PrimitivePinShape.md)<!-- -->; pinType?: [ESCH\_PrimitivePinType](../enums/ESCH_PrimitivePinType.md)<!-- -->; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePin](./ISCH_PrimitivePin.md) \| [ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md) \| undefined>
引脚图元对象
FILE:references/classes/SCH_PrimitivePolygon.md
# SCH\_PrimitivePolygon class
原理图 & 符号 / 多边形(折线)图元类
## Signature
```typescript
declare class SCH_PrimitivePolygon implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(line, color, fillColor, lineWidth, lineType)](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 创建多边形
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 删除多边形
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 获取多边形
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 获取多边形
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有多边形
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有多边形的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitivePolygon.md)
</td><td>
</td><td>
**_(BETA)_** 修改多边形
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitivePolygon.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建多边形
## Signature
```typescript
create(line: Array<number>, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitivePolygon | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
line
</td><td>
Array<number>
</td><td>
坐标组,连续的一组 `[x1, y1, x2, y2, x3, y3]` 所描述的线
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 颜色,`null` 表示默认
</td></tr>
<tr><td>
fillColor
</td><td>
string \| null
</td><td>
_(Optional)_ 填充颜色,`none` 表示无填充,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md) \| undefined>
多边形图元对象
### delete
# SCH\_PrimitivePolygon.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除多边形
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitivePolygon | Array<string> | Array<ISCH_PrimitivePolygon>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md) \| Array<string> \| Array<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)<!-- -->>
</td><td>
多边形的图元 ID 或多边形图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitivePolygon.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取多边形
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitivePolygon | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
多边形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md) \| undefined>
多边形图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitivePolygon.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取多边形
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitivePolygon>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
多边形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)<!-- -->>>
多边形图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitivePolygon.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有多边形
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitivePolygon>>;
```
## Returns
Promise<Array<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)<!-- -->>>
多边形图元对象数组
### getallprimitiveid
# SCH\_PrimitivePolygon.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有多边形的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
多边形的图元 ID 数组
### modify
# SCH\_PrimitivePolygon.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改多边形
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitivePolygon, property: {
line?: Array<number>;
color?: string | null;
fillColor?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
}): Promise<ISCH_PrimitivePolygon | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ line?: Array<number>; color?: string \| null; fillColor?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitivePolygon](./ISCH_PrimitivePolygon.md) \| undefined>
多边形图元对象
FILE:references/classes/SCH_PrimitiveRectangle.md
# SCH\_PrimitiveRectangle class
原理图 & 符号 / 矩形图元类
## Signature
```typescript
declare class SCH_PrimitiveRectangle implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(topLeftX, topLeftY, width, height, cornerRadius, rotation, color, fillColor, lineWidth, lineType, fillStyle)](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
创建矩形
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
删除矩形
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 获取矩形
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 获取矩形
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取所有矩形
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
获取所有矩形的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveRectangle.md)
</td><td>
</td><td>
**_(BETA)_** 修改矩形
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveRectangle.create() method
创建矩形
## Signature
```typescript
create(topLeftX: number, topLeftY: number, width: number, height: number, cornerRadius?: number, rotation?: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null): Promise<ISCH_PrimitiveRectangle | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topLeftX
</td><td>
number
</td><td>
左上点 X
</td></tr>
<tr><td>
topLeftY
</td><td>
number
</td><td>
左上点 Y
</td></tr>
<tr><td>
width
</td><td>
number
</td><td>
宽
</td></tr>
<tr><td>
height
</td><td>
number
</td><td>
高
</td></tr>
<tr><td>
cornerRadius
</td><td>
number
</td><td>
_(Optional)_ 圆角半径
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度,绕左上点旋转,可选 `0` `90` `180` `270`
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 颜色,`null` 表示默认
</td></tr>
<tr><td>
fillColor
</td><td>
string \| null
</td><td>
_(Optional)_ 填充颜色,`none` 表示无填充,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
<tr><td>
fillStyle
</td><td>
[ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null
</td><td>
_(Optional)_ 填充样式,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md) \| undefined>
矩形图元对象
### delete
# SCH\_PrimitiveRectangle.delete() method
删除矩形
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveRectangle | Array<string> | Array<ISCH_PrimitiveRectangle>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md) \| Array<string> \| Array<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)<!-- -->>
</td><td>
矩形的图元 ID 或矩形图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveRectangle.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取矩形
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveRectangle | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
矩形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md) \| undefined>
矩形图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveRectangle.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取矩形
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveRectangle>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
矩形的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)<!-- -->>>
矩形图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveRectangle.getAll() method
获取所有矩形
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitiveRectangle>>;
```
## Returns
Promise<Array<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)<!-- -->>>
矩形图元对象数组
### getallprimitiveid
# SCH\_PrimitiveRectangle.getAllPrimitiveId() method
获取所有矩形的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
矩形的图元 ID 数组
### modify
# SCH\_PrimitiveRectangle.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改矩形
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveRectangle, property: {
topLeftX?: number;
topLeftY?: number;
width?: number;
height?: number;
cornerRadius?: number;
rotation?: number;
color?: string | null;
fillColor?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
fillStyle?: ESCH_PrimitiveFillStyle | null;
}): Promise<ISCH_PrimitiveRectangle | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ topLeftX?: number; topLeftY?: number; width?: number; height?: number; cornerRadius?: number; rotation?: number; color?: string \| null; fillColor?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; fillStyle?: [ESCH\_PrimitiveFillStyle](../enums/ESCH_PrimitiveFillStyle.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveRectangle](./ISCH_PrimitiveRectangle.md) \| undefined>
矩形图元对象
FILE:references/classes/SCH_PrimitiveText.md
# SCH\_PrimitiveText class
原理图 & 符号 / 文本图元类
## Signature
```typescript
declare class SCH_PrimitiveText implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(x, y, content, rotation, textColor, fontName, fontSize, bold, italic, underLine, alignMode)](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 创建文本
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 删除文本
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 获取文本
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 获取文本
</td></tr>
<tr><td>
[getAll()](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有文本
</td></tr>
<tr><td>
[getAllPrimitiveId()](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有文本的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveText.md)
</td><td>
</td><td>
**_(BETA)_** 修改文本
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveText.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建文本
## Signature
```typescript
create(x: number, y: number, content: string, rotation?: number, textColor?: string | null, fontName?: string | null, fontSize?: number | null, bold?: boolean, italic?: boolean, underLine?: boolean, alignMode?: ESCH_PrimitiveTextAlignMode): Promise<ISCH_PrimitiveText | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
x
</td><td>
number
</td><td>
坐标 X
</td></tr>
<tr><td>
y
</td><td>
number
</td><td>
坐标 Y
</td></tr>
<tr><td>
content
</td><td>
string
</td><td>
文本内容
</td></tr>
<tr><td>
rotation
</td><td>
number
</td><td>
_(Optional)_ 旋转角度,可选 `0` `90` `180` `270`
</td></tr>
<tr><td>
textColor
</td><td>
string \| null
</td><td>
_(Optional)_ 文本颜色,`null` 表示默认
</td></tr>
<tr><td>
fontName
</td><td>
string \| null
</td><td>
_(Optional)_ 字体名称,`null` 表示默认
</td></tr>
<tr><td>
fontSize
</td><td>
number \| null
</td><td>
_(Optional)_ 字体大小,`null` 表示默认
</td></tr>
<tr><td>
bold
</td><td>
boolean
</td><td>
_(Optional)_ 是否加粗
</td></tr>
<tr><td>
italic
</td><td>
boolean
</td><td>
_(Optional)_ 是否斜体
</td></tr>
<tr><td>
underLine
</td><td>
boolean
</td><td>
_(Optional)_ 是否加下划线
</td></tr>
<tr><td>
alignMode
</td><td>
[ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md)
</td><td>
_(Optional)_ 对齐模式,`0` 左顶,`1` 中顶,`2` 右顶,`3` 左中,`4` 中中,`5` 右中,`6` 左底,`7` 中底,`8` 右底
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md) \| undefined>
文本图元对象
### delete
# SCH\_PrimitiveText.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除文本
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveText | Array<string> | Array<ISCH_PrimitiveText>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveText](./ISCH_PrimitiveText.md) \| Array<string> \| Array<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)<!-- -->>
</td><td>
文本的图元 ID 或文本图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveText.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取文本
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveText | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
文本的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md) \| undefined>
文本图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveText.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取文本
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveText>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
文本的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)<!-- -->>>
文本图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveText.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有文本
## Signature
```typescript
getAll(): Promise<Array<ISCH_PrimitiveText>>;
```
## Returns
Promise<Array<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)<!-- -->>>
文本图元对象数组
### getallprimitiveid
# SCH\_PrimitiveText.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有文本的图元 ID
## Signature
```typescript
getAllPrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
文本的图元 ID 数组
### modify
# SCH\_PrimitiveText.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改文本
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveText, property: {
x?: number;
y?: number;
content?: string;
rotation?: number;
textColor?: string | null;
fontName?: string | null;
fontSize?: number | null;
bold?: boolean;
italic?: boolean;
underLine?: boolean;
alignMode?: ESCH_PrimitiveTextAlignMode;
}): Promise<ISCH_PrimitiveText | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveText](./ISCH_PrimitiveText.md)
</td><td>
图元 ID
</td></tr>
<tr><td>
property
</td><td>
{ x?: number; y?: number; content?: string; rotation?: number; textColor?: string \| null; fontName?: string \| null; fontSize?: number \| null; bold?: boolean; italic?: boolean; underLine?: boolean; alignMode?: [ESCH\_PrimitiveTextAlignMode](../enums/ESCH_PrimitiveTextAlignMode.md)<!-- -->; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveText](./ISCH_PrimitiveText.md) \| undefined>
文本图元对象
FILE:references/classes/SCH_PrimitiveWire.md
# SCH\_PrimitiveWire class
原理图 & 符号 / 导线图元类
## Signature
```typescript
declare class SCH_PrimitiveWire implements ISCH_PrimitiveAPI
```
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create(line, net, color, lineWidth, lineType)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 创建导线
</td></tr>
<tr><td>
[delete(primitiveIds)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 删除导线
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 获取导线
</td></tr>
<tr><td>
[get(primitiveIds)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 获取导线
</td></tr>
<tr><td>
[getAll(net)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有导线
</td></tr>
<tr><td>
[getAllPrimitiveId(net)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 获取所有导线的图元 ID
</td></tr>
<tr><td>
[modify(primitiveId, property)](./SCH_PrimitiveWire.md)
</td><td>
</td><td>
**_(BETA)_** 修改导线
</td></tr>
</tbody></table>
---
## 方法详情
### create
# SCH\_PrimitiveWire.create() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建导线
## Signature
```typescript
create(line: Array<number> | Array<Array<number>>, net?: string, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null): Promise<ISCH_PrimitiveWire | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
line
</td><td>
Array<number> \| Array<Array<number>>
</td><td>
多段线坐标组,每段都是连续的一组 `[x1, y1, x2, y2, x3, y3]` 所描述的线,如若多段线彼此无任何连接则创建将会失败
</td></tr>
<tr><td>
net
</td><td>
string
</td><td>
_(Optional)_ 网络名称,如若未指定,则遵循: 1. 没有坐标落在任何图元上,则默认为空网络; 2. 有一个坐标点在某个网络的图元上,则跟随该图元的网络; 3. 有多个坐标点在多个不同网络的图元上,则创建失败
如若已指定,则遵循: 1. 有一个或多个坐标点在其他网络的图元上,且其他图元并未显式(通常指的是包含网络标签或网络端口)指定网络,则其他图元跟随指定的网络; 2. 如若其他图元指定了网络,则创建失败
</td></tr>
<tr><td>
color
</td><td>
string \| null
</td><td>
_(Optional)_ 导线颜色,`null` 表示默认
</td></tr>
<tr><td>
lineWidth
</td><td>
number \| null
</td><td>
_(Optional)_ 线宽,范围 `1-10`<!-- -->,`null` 表示默认
</td></tr>
<tr><td>
lineType
</td><td>
[ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null
</td><td>
_(Optional)_ 线型,`null` 表示默认
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md) \| undefined>
导线图元对象
### delete
# SCH\_PrimitiveWire.delete() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除导线
## Signature
```typescript
delete(primitiveIds: string | ISCH_PrimitiveWire | Array<string> | Array<ISCH_PrimitiveWire>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| [ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md) \| Array<string> \| Array<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)<!-- -->>
</td><td>
导线的图元 ID 或导线图元对象
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### get
# SCH\_PrimitiveWire.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取导线
## Signature
```typescript
get(primitiveIds: string): Promise<ISCH_PrimitiveWire | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string
</td><td>
导线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md) \| undefined>
导线图元对象,`undefined` 表示获取失败
### get_1
# SCH\_PrimitiveWire.get() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取导线
## Signature
```typescript
get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveWire>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
Array<string>
</td><td>
导线的图元 ID,可以为字符串或字符串数组,如若为数组,则返回的也是数组
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)<!-- -->>>
导线图元对象,空数组表示获取失败
## Remarks
如若传入多个图元 ID,任意图元 ID 未匹配到不影响其它图元的返回,即可能返回少于传入的图元 ID 数量的图元对象
### getall
# SCH\_PrimitiveWire.getAll() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有导线
## Signature
```typescript
getAll(net?: string | Array<string>): Promise<Array<ISCH_PrimitiveWire>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string \| Array<string>
</td><td>
_(Optional)_ 网络名称
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)<!-- -->>>
导线图元对象数组
### getallprimitiveid
# SCH\_PrimitiveWire.getAllPrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取所有导线的图元 ID
## Signature
```typescript
getAllPrimitiveId(net?: string | Array<string>): Promise<Array<string>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
net
</td><td>
string \| Array<string>
</td><td>
_(Optional)_ 网络名称
</td></tr>
</tbody></table>
## Returns
Promise<Array<string>>
导线的图元 ID 数组
### modify
# SCH\_PrimitiveWire.modify() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改导线
## Signature
```typescript
modify(primitiveId: string | ISCH_PrimitiveWire, property: {
line?: Array<number> | Array<Array<number>>;
net?: string;
color?: string | null;
lineWidth?: number | null;
lineType?: ESCH_PrimitiveLineType | null;
}): Promise<ISCH_PrimitiveWire | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveId
</td><td>
string \| [ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md)
</td><td>
导线的图元 ID 或导线图元对象
</td></tr>
<tr><td>
property
</td><td>
{ line?: Array<number> \| Array<Array<number>>; net?: string; color?: string \| null; lineWidth?: number \| null; lineType?: [ESCH\_PrimitiveLineType](../enums/ESCH_PrimitiveLineType.md) \| null; }
</td><td>
修改参数
</td></tr>
</tbody></table>
## Returns
Promise<[ISCH\_PrimitiveWire](./ISCH_PrimitiveWire.md) \| undefined>
导线图元对象
FILE:references/classes/SCH_SelectControl.md
# SCH\_SelectControl class
原理图 & 符号 / 选择控制类
## Signature
```typescript
declare class SCH_SelectControl
```
## Remarks
获取或操作选择的元素
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[clearSelected()](./SCH_SelectControl.md)
</td><td>
</td><td>
清除选中
</td></tr>
<tr><td>
[doCrossProbeSelect(components, pins, nets, highlight, select)](./SCH_SelectControl.md)
</td><td>
</td><td>
进行交叉选择
</td></tr>
<tr><td>
[doSelectPrimitives(primitiveIds)](./SCH_SelectControl.md)
</td><td>
</td><td>
使用图元 ID 选中图元
</td></tr>
<tr><td>
[getAllSelectedPrimitives\_PrimitiveId()](./SCH_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询所有已选中图元的图元 ID
</td></tr>
<tr><td>
[getAllSelectedPrimitives()](./SCH_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询所有已选中图元的图元对象
</td></tr>
<tr><td>
[getCurrentMousePosition()](./SCH_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 获取当前鼠标在画布上的位置
</td></tr>
<tr><td>
[getSelectedPrimitives\_PrimitiveId()](./SCH_SelectControl.md)
</td><td>
</td><td>
查询选中图元的图元 ID
</td></tr>
<tr><td>
[getSelectedPrimitives()](./SCH_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 查询选中图元的所有参数
</td></tr>
<tr><td>
[refactorGetAllSelectedPrimitives()](./SCH_SelectControl.md)
</td><td>
</td><td>
**_(BETA)_** 3.0版:查询所有已选中图元的图元对象
</td></tr>
</tbody></table>
---
## 方法详情
### clearselected
# SCH\_SelectControl.clearSelected() method
清除选中
## Signature
```typescript
clearSelected(): boolean;
```
## Returns
boolean
操作是否成功
### docrossprobeselect
# SCH\_SelectControl.doCrossProbeSelect() method
进行交叉选择
## Signature
```typescript
doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
components
</td><td>
Array<string>
</td><td>
_(Optional)_ 器件位号
</td></tr>
<tr><td>
pins
</td><td>
Array<string>
</td><td>
_(Optional)_ 器件位号\_引脚编号,格式为 \['U1\_1', 'U1\_2'\]
</td></tr>
<tr><td>
nets
</td><td>
Array<string>
</td><td>
_(Optional)_ 网络名称
</td></tr>
<tr><td>
highlight
</td><td>
boolean
</td><td>
_(Optional)_ 是否高亮
</td></tr>
<tr><td>
select
</td><td>
boolean
</td><td>
_(Optional)_ 是否选中
</td></tr>
</tbody></table>
## Returns
boolean
操作是否成功
### doselectprimitives
# SCH\_SelectControl.doSelectPrimitives() method
使用图元 ID 选中图元
## Signature
```typescript
doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
primitiveIds
</td><td>
string \| Array<string>
</td><td>
图元 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
### getallselectedprimitives
# SCH\_SelectControl.getAllSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查询所有已选中图元的图元对象
## Signature
```typescript
getAllSelectedPrimitives(): Promise<Array<ISCH_Primitive>>;
```
## Returns
Promise<Array<[ISCH\_Primitive](../interfaces/ISCH_Primitive.md)<!-- -->>>
所有已选中图元的图元对象
### getallselectedprimitives_primitiveid
# SCH\_SelectControl.getAllSelectedPrimitives\_PrimitiveId() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查询所有已选中图元的图元 ID
## Signature
```typescript
getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
所有已选中图元的图元 ID
### getcurrentmouseposition
# SCH\_SelectControl.getCurrentMousePosition() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取当前鼠标在画布上的位置
## Signature
```typescript
getCurrentMousePosition(): Promise<{
x: number;
y: number;
} | undefined>;
```
## Returns
Promise<{ x: number; y: number; } \| undefined>
鼠标在画布上的位置,`undefined` 代表当前鼠标不在画布上
### getselectedprimitives
# SCH\_SelectControl.getSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
> Warning: This API is now obsolete.
>
> 请使用 [getAllSelectedPrimitives](./SCH_SelectControl.md) 替代
查询选中图元的所有参数
## Signature
```typescript
getSelectedPrimitives(): Promise<Array<Object>>;
```
## Returns
Promise<Array<Object>>
选中图元的所有参数
### getselectedprimitives_primitiveid
# SCH\_SelectControl.getSelectedPrimitives\_PrimitiveId() method
> Warning: This API is now obsolete.
>
> 请使用 [getAllSelectedPrimitives\_PrimitiveId](./SCH_SelectControl.md) 替代
查询选中图元的图元 ID
## Signature
```typescript
getSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
选中图元的图元 ID
### refactorgetallselectedprimitives
# SCH\_SelectControl.refactorGetAllSelectedPrimitives() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
3.0版:查询所有已选中图元的图元对象
## Signature
```typescript
refactorGetAllSelectedPrimitives(): Promise<Array<ISCH_Primitive>>;
```
## Returns
Promise<Array<[ISCH\_Primitive](../interfaces/ISCH_Primitive.md)<!-- -->>>
所有已选中图元的图元对象
FILE:references/classes/SCH_SimulationEngine.md
# SCH\_SimulationEngine class
原理图 & 符号 / 仿真引擎类
## Signature
```typescript
declare class SCH_SimulationEngine
```
## Remarks
控制仿真引擎的对接和交互
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[pushData(eventType, props)](./SCH_SimulationEngine.md)
</td><td>
</td><td>
向仿真内核发送数据
</td></tr>
</tbody></table>
---
## 方法详情
### pushdata
# SCH\_SimulationEngine.pushData() method
向仿真内核发送数据
## Signature
```typescript
pushData(eventType: ESCH_DynamicSimulationEnginePushEventType | ESCH_SpiceSimulationEnginePushEventType, props: {
[key: string]: any;
}): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
eventType
</td><td>
[ESCH\_DynamicSimulationEnginePushEventType](../enums/ESCH_DynamicSimulationEnginePushEventType.md) \| [ESCH\_SpiceSimulationEnginePushEventType](../enums/ESCH_SpiceSimulationEnginePushEventType.md)
</td><td>
事件类型
</td></tr>
<tr><td>
props
</td><td>
\{ \[key: string\]: any; \}
</td><td>
数据
</td></tr>
</tbody></table>
## Returns
void
FILE:references/classes/SCH_Utils.md
# SCH\_Utils class
原理图 & 符号 / 工具类
## Signature
```typescript
declare class SCH_Utils
```
FILE:references/classes/SYS_ClientUrl.md
# SYS\_ClientUrl class
系统 / 外部请求类
## Signature
```typescript
declare class SYS_ClientUrl
```
## Remarks
向外部服务器发起安全的 cURL 请求
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[request(url, method, data, options, succeedCallFn)](./SYS_ClientUrl.md)
</td><td>
</td><td>
发起即时请求
</td></tr>
</tbody></table>
---
## 方法详情
### request
# SYS\_ClientUrl.request() method
发起即时请求
## Signature
```typescript
request(url: string, method?: 'GET' | 'POST' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH', data?: string | Blob | FormData | URLSearchParams, options?: {
headers?: {
[header: string]: any;
};
integrity?: string;
}, succeedCallFn?: (data: Response) => void | Promise<void>): Promise<Response>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
url
</td><td>
string
</td><td>
请求地址
</td></tr>
<tr><td>
method
</td><td>
'GET' \| 'POST' \| 'HEAD' \| 'PUT' \| 'DELETE' \| 'PATCH'
</td><td>
_(Optional)_ 请求方法
</td></tr>
<tr><td>
data
</td><td>
string \| Blob \| FormData \| URLSearchParams
</td><td>
_(Optional)_ 请求发送的数据,可以是直接数据或 [URLSearchParams](https://developer.mozilla.org/docs/Web/API/URLSearchParams) 对象,如果 method 为 `HEAD` 或 `GET`<!-- -->,本参数将被忽略
</td></tr>
<tr><td>
options
</td><td>
\{ headers?: \{ \[header: string\]: any; \}; integrity?: string; \}
</td><td>
_(Optional)_ 请求参数
</td></tr>
<tr><td>
succeedCallFn
</td><td>
(data: Response) => void \| Promise<void>
</td><td>
_(Optional)_ 请求成功后回调的函数
</td></tr>
</tbody></table>
## Returns
Promise<Response>
Fetch 的返回结果
## Remarks
请注意,需要在被请求的站点上允许跨源资源共享(CORS),否则接口将始终返回错误结果。
更多信息,请查阅 [跨源资源共享 (CORS) - MDN](https://developer.mozilla.org/docs/Web/HTTP/CORS)<!-- -->。
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
FILE:references/classes/SYS_Dialog.md
# SYS\_Dialog class
系统 / 对话框类
## Signature
```typescript
declare class SYS_Dialog
```
## Remarks
生成对话框窗口
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[showConfirmationMessage(content, title, mainButtonTitle, buttonTitle, callbackFn)](./SYS_Dialog.md)
</td><td>
</td><td>
弹出确认窗口
</td></tr>
<tr><td>
[showInformationMessage(content, title, buttonTitle)](./SYS_Dialog.md)
</td><td>
</td><td>
弹出消息窗口
</td></tr>
<tr><td>
[showInputDialog(beforeContent, afterContent, title, type, value, otherProperty, callbackFn)](./SYS_Dialog.md)
</td><td>
</td><td>
**_(BETA)_** 弹出输入窗口
</td></tr>
<tr><td>
[showSelectDialog(options, beforeContent, afterContent, title, defaultOption, multiple, callbackFn)](./SYS_Dialog.md)
</td><td>
</td><td>
**_(BETA)_** 弹出选择窗口
</td></tr>
<tr><td>
[showSelectDialog(options, beforeContent, afterContent, title, defaultOption, multiple, callbackFn)](./SYS_Dialog.md)
</td><td>
</td><td>
**_(BETA)_** 弹出多选窗口
</td></tr>
</tbody></table>
---
## 方法详情
### showconfirmationmessage
# SYS\_Dialog.showConfirmationMessage() method
弹出确认窗口
## Signature
```typescript
showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
content
</td><td>
string
</td><td>
消息文本,支持使用 `\n` 换行
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 弹出窗口标题
</td></tr>
<tr><td>
mainButtonTitle
</td><td>
string
</td><td>
_(Optional)_ 主要按钮标题
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 主要按钮标题
</td></tr>
<tr><td>
callbackFn
</td><td>
(mainButtonClicked: boolean) => void
</td><td>
_(Optional)_ 回调函数
</td></tr>
</tbody></table>
## Returns
void
## Remarks
显示一个拥有确认和取消按钮的窗口
### showinformationmessage
# SYS\_Dialog.showInformationMessage() method
弹出消息窗口
## Signature
```typescript
showInformationMessage(content: string, title?: string, buttonTitle?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
content
</td><td>
string
</td><td>
消息文本,支持使用 `\n` 换行
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 弹出窗口标题
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 按钮标题,为空则不显示按钮
</td></tr>
</tbody></table>
## Returns
void
## Remarks
显示一个文字消息窗口
### showinputdialog
# SYS\_Dialog.showInputDialog() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
弹出输入窗口
## Signature
```typescript
showInputDialog(beforeContent?: string, afterContent?: string, title?: string, type?: 'color' | 'date' | 'datetime-local' | 'email' | 'mouth' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week', value?: string | number, otherProperty?: {
max?: number;
maxlength?: number;
min?: number;
minlength?: number;
multiple?: boolean;
pattern?: RegExp;
placeholder?: string;
readonly?: boolean;
step?: number;
}, callbackFn?: (value: any) => void): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
beforeContent
</td><td>
string
</td><td>
_(Optional)_ 输入框上方文字
</td></tr>
<tr><td>
afterContent
</td><td>
string
</td><td>
_(Optional)_ 输入框下方文字
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 弹出窗口标题
</td></tr>
<tr><td>
type
</td><td>
'color' \| 'date' \| 'datetime-local' \| 'email' \| 'mouth' \| 'number' \| 'password' \| 'tel' \| 'text' \| 'time' \| 'url' \| 'week'
</td><td>
_(Optional)_ 输入框类型
</td></tr>
<tr><td>
value
</td><td>
string \| number
</td><td>
_(Optional)_ 输入框默认值
</td></tr>
<tr><td>
otherProperty
</td><td>
\{ max?: number; maxlength?: number; min?: number; minlength?: number; multiple?: boolean; pattern?: RegExp; placeholder?: string; readonly?: boolean; step?: number; \}
</td><td>
_(Optional)_ 其它参数,可参考 [The HTML Input element](https://developer.mozilla.org/docs/Web/HTML/Element/input#attributes)
</td></tr>
<tr><td>
callbackFn
</td><td>
(value: any) => void
</td><td>
_(Optional)_ 回调函数
</td></tr>
</tbody></table>
## Returns
void
用户输入的值,始终为 `string` 类型,除非用户点击了 \*\*取消\*\* 按钮
### showselectdialog
# SYS\_Dialog.showSelectDialog() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
弹出选择窗口
## Signature
```typescript
showSelectDialog(options: Array<string> | Array<{
value: string;
displayContent: string;
}>, beforeContent?: string, afterContent?: string, title?: string, defaultOption?: string, multiple?: false, callbackFn?: (value: string) => void | Promise<void>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
options
</td><td>
Array<string> \| Array<{ value: string; displayContent: string; }>
</td><td>
选项列表,可以为字符串数组或对象数组,在未指定 `defaultOption` 时,默认值为列表的第一项;
如若为字符串数组,则选项的值和选项的展示内容将保持一致;
如若为对象数组,则 `value` 表示选项的值,`displayContent` 表示选项的展示内容
</td></tr>
<tr><td>
beforeContent
</td><td>
string
</td><td>
_(Optional)_ 选择框上方文字
</td></tr>
<tr><td>
afterContent
</td><td>
string
</td><td>
_(Optional)_ 选择框下方文字
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 选择框标题
</td></tr>
<tr><td>
defaultOption
</td><td>
string
</td><td>
_(Optional)_ 默认选项,以选项的值作为匹配参数,如若 `multiple` 参数为 `true`<!-- -->,则此处需要传入字符串数组
</td></tr>
<tr><td>
multiple
</td><td>
false
</td><td>
_(Optional)_ 是否支持多选,默认为单选框
</td></tr>
<tr><td>
callbackFn
</td><td>
(value: string) => void \| Promise<void>
</td><td>
_(Optional)_ 回调函数
</td></tr>
</tbody></table>
## Returns
void
用户选择的值,对应传入的 `options` 中的 `value` 字段
### showselectdialog_1
# SYS\_Dialog.showSelectDialog() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
弹出多选窗口
## Signature
```typescript
showSelectDialog(options: Array<string> | Array<{
value: string;
displayContent: string;
}>, beforeContent?: string, afterContent?: string, title?: string, defaultOption?: Array<string>, multiple?: true, callbackFn?: (value: Array<string>) => void | Promise<void>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
options
</td><td>
Array<string> \| Array<{ value: string; displayContent: string; }>
</td><td>
选项列表,可以为字符串数组或对象数组,在未指定 `defaultOption` 时,默认值为列表的第一项;
如若为字符串数组,则选项的值和选项的展示内容将保持一致;
如若为对象数组,则 `value` 表示选项的值,`displayContent` 表示选项的展示内容
</td></tr>
<tr><td>
beforeContent
</td><td>
string
</td><td>
_(Optional)_ 多选框上方文字
</td></tr>
<tr><td>
afterContent
</td><td>
string
</td><td>
_(Optional)_ 多选框下方文字
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 多选框标题
</td></tr>
<tr><td>
defaultOption
</td><td>
Array<string>
</td><td>
_(Optional)_ 默认选项数组,以选项的值作为匹配参数
</td></tr>
<tr><td>
multiple
</td><td>
true
</td><td>
_(Optional)_ 是否支持多选
</td></tr>
<tr><td>
callbackFn
</td><td>
(value: Array<string>) => void \| Promise<void>
</td><td>
_(Optional)_ 回调函数
</td></tr>
</tbody></table>
## Returns
void
用户选择的值的集合数组,对应传入的 `options` 中的 `value` 字段
FILE:references/classes/SYS_Environment.md
# SYS\_Environment class
系统 / 运行环境类
## Signature
```typescript
declare class SYS_Environment
```
## Remarks
获取嘉立创 EDA 专业版运行环境参数
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getEditorCompliedDate()](./SYS_Environment.md)
</td><td>
</td><td>
获取编辑器编译日期
</td></tr>
<tr><td>
[getEditorCurrentVersion()](./SYS_Environment.md)
</td><td>
</td><td>
获取编辑器当前版本
</td></tr>
<tr><td>
[getUserInfo()](./SYS_Environment.md)
</td><td>
</td><td>
获取用户信息
</td></tr>
<tr><td>
[isClient()](./SYS_Environment.md)
</td><td>
</td><td>
是否处于客户端环境
</td></tr>
<tr><td>
[isEasyEDAProEdition()](./SYS_Environment.md)
</td><td>
</td><td>
是否为 EasyEDA Pro 版本
</td></tr>
<tr><td>
[isHalfOfflineMode()](./SYS_Environment.md)
</td><td>
</td><td>
是否为半离线模式
</td></tr>
<tr><td>
[isJLCEDAProEdition()](./SYS_Environment.md)
</td><td>
</td><td>
是否为 嘉立创EDA 专业版本
</td></tr>
<tr><td>
[isOfflineMode()](./SYS_Environment.md)
</td><td>
</td><td>
是否为全离线模式
</td></tr>
<tr><td>
[isOnlineMode()](./SYS_Environment.md)
</td><td>
</td><td>
是否为在线模式
</td></tr>
<tr><td>
[isProPrivateEdition()](./SYS_Environment.md)
</td><td>
</td><td>
是否为私有化部署版本
</td></tr>
<tr><td>
[isWeb()](./SYS_Environment.md)
</td><td>
</td><td>
是否处于浏览器环境
</td></tr>
</tbody></table>
---
## 方法详情
### geteditorcomplieddate
# SYS\_Environment.getEditorCompliedDate() method
获取编辑器编译日期
## Signature
```typescript
getEditorCompliedDate(): string;
```
## Returns
string
编辑器编译日期
### geteditorcurrentversion
# SYS\_Environment.getEditorCurrentVersion() method
获取编辑器当前版本
## Signature
```typescript
getEditorCurrentVersion(): string;
```
## Returns
string
编辑器当前版本
### getuserinfo
# SYS\_Environment.getUserInfo() method
获取用户信息
## Signature
```typescript
getUserInfo(): {
username?: string;
nickname?: string;
avatar?: string;
uuid?: string;
customerCode?: string;
};
```
## Returns
\{ username?: string; nickname?: string; avatar?: string; uuid?: string; customerCode?: string; \}
用户信息
### isclient
# SYS\_Environment.isClient() method
是否处于客户端环境
## Signature
```typescript
isClient(): boolean;
```
## Returns
boolean
是否处于客户端环境
### iseasyedaproedition
# SYS\_Environment.isEasyEDAProEdition() method
是否为 EasyEDA Pro 版本
## Signature
```typescript
isEasyEDAProEdition(): boolean;
```
## Returns
boolean
是否为 EasyEDA Pro 版本
### ishalfofflinemode
# SYS\_Environment.isHalfOfflineMode() method
是否为半离线模式
## Signature
```typescript
isHalfOfflineMode(): boolean;
```
## Returns
boolean
是否为半离线模式
### isjlcedaproedition
# SYS\_Environment.isJLCEDAProEdition() method
是否为 嘉立创EDA 专业版本
## Signature
```typescript
isJLCEDAProEdition(): boolean;
```
## Returns
boolean
是否为嘉立创EDA 专业版本
### isofflinemode
# SYS\_Environment.isOfflineMode() method
是否为全离线模式
## Signature
```typescript
isOfflineMode(): boolean;
```
## Returns
boolean
是否为全离线模式
### isonlinemode
# SYS\_Environment.isOnlineMode() method
是否为在线模式
## Signature
```typescript
isOnlineMode(): boolean;
```
## Returns
boolean
是否为在线模式
### isproprivateedition
# SYS\_Environment.isProPrivateEdition() method
是否为私有化部署版本
## Signature
```typescript
isProPrivateEdition(): boolean;
```
## Returns
boolean
是否为私有化部署版本
### isweb
# SYS\_Environment.isWeb() method
是否处于浏览器环境
## Signature
```typescript
isWeb(): boolean;
```
## Returns
boolean
是否处于浏览器环境
FILE:references/classes/SYS_FileManager.md
# SYS\_FileManager class
系统 / 文件管理类
## Signature
```typescript
declare class SYS_FileManager
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[extractLibInfo(data)](./SYS_FileManager.md)
</td><td>
</td><td>
提取文件内的库配置信息
</td></tr>
<tr><td>
[extractProjectInfo(data)](./SYS_FileManager.md)
</td><td>
</td><td>
提取文件内的工程配置信息
</td></tr>
<tr><td>
[getCbbFileByCbbUuid(cbbUuid, libraryUuid, props)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用复用模块 UUID 获取复用模块文件
</td></tr>
<tr><td>
[getDeviceFileByDeviceUuid(deviceUuid, libraryUuid, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
使用器件 UUID 获取器件文件
</td></tr>
<tr><td>
[getDocumentFile(fileName, password, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
获取文档文件
</td></tr>
<tr><td>
[getDocumentFootprintSources()](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 获取文档封装源码
</td></tr>
<tr><td>
[getDocumentSource()](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 获取文档源码
</td></tr>
<tr><td>
[getFootprintFileByFootprintUuid(footprintUuid, libraryUuid, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用封装 UUID 获取封装文件
</td></tr>
<tr><td>
[getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid, libraryUuid, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用面板库 UUID 获取面板库文件
</td></tr>
<tr><td>
[getProjectFile(fileName, password, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
获取工程文件
</td></tr>
<tr><td>
[getProjectFileByProjectUuid(projectUuid, fileName, password, fileType)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用工程 UUID 获取工程文件
</td></tr>
<tr><td>
[importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用工程文件导入工程
</td></tr>
<tr><td>
[importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 使用工程文件导入工程
</td></tr>
<tr><td>
[setDocumentSource(source)](./SYS_FileManager.md)
</td><td>
</td><td>
**_(BETA)_** 修改文档源码
</td></tr>
</tbody></table>
---
## 方法详情
### extractlibinfo
# SYS\_FileManager.extractLibInfo() method
提取文件内的库配置信息
## Signature
```typescript
extractLibInfo(data: File | Array<File>): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
data
</td><td>
File \| Array<File>
</td><td>
库文件
</td></tr>
</tbody></table>
## Returns
Promise<any>
库配置信息
### extractprojectinfo
# SYS\_FileManager.extractProjectInfo() method
提取文件内的工程配置信息
## Signature
```typescript
extractProjectInfo(data: File): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
data
</td><td>
File
</td><td>
工程文件
</td></tr>
</tbody></table>
## Returns
Promise<any>
工程配置信息
### getcbbfilebycbbuuid
# SYS\_FileManager.getCbbFileByCbbUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用复用模块 UUID 获取复用模块文件
## Signature
```typescript
getCbbFileByCbbUuid(cbbUuid: string, libraryUuid?: string, props?: {
fileName?: string;
password?: string;
fileType?: 'epro' | 'epro2';
templateSchematicUuid?: string;
templatePcbUuid?: string;
}): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
cbbUuid
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
props
</td><td>
{ fileName?: string; password?: string; fileType?: 'epro' \| 'epro2'; templateSchematicUuid?: string; templatePcbUuid?: string; }
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
复用模块文件数据,`undefined` 表示数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*团队模块 > 下载模块\*\* 权限,没有权限调用将始终 `throw Error`
### getdevicefilebydeviceuuid
# SYS\_FileManager.getDeviceFileByDeviceUuid() method
使用器件 UUID 获取器件文件
## Signature
```typescript
getDeviceFileByDeviceUuid(deviceUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
deviceUuid
</td><td>
string \| Array<string>
</td><td>
器件 UUID 或器件 UUID 列表
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取,如若不传入,则为系统库
</td></tr>
<tr><td>
fileType
</td><td>
'elibz' \| 'elibz2'
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
器件文件数据,`undefined` 表示数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*团队库 > 下载库\*\* 权限,没有权限调用将始终 `throw Error`
### getdocumentfile
# SYS\_FileManager.getDocumentFile() method
获取文档文件
## Signature
```typescript
getDocumentFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
password
</td><td>
string
</td><td>
_(Optional)_ 加密密码
</td></tr>
<tr><td>
fileType
</td><td>
'epro' \| 'epro2'
</td><td>
_(Optional)_ 文件格式
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
文档文件数据,`undefined` 表示当前未打开文档或数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*工程设计图 > 文件导出\*\* 权限,没有权限调用将始终 `throw Error`
### getdocumentfootprintsources
# SYS\_FileManager.getDocumentFootprintSources() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取文档封装源码
## Signature
```typescript
getDocumentFootprintSources(): Promise<Array<{
footprintUuid: string;
documentSource: string;
}>>;
```
## Returns
Promise<Array<{ footprintUuid: string; documentSource: string; }>>
文档封装源码数据,数据获取失败将返回空数组
### getdocumentsource
# SYS\_FileManager.getDocumentSource() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取文档源码
## Signature
```typescript
getDocumentSource(): Promise<string | undefined>;
```
## Returns
Promise<string \| undefined>
文档源码数据,`undefined` 表示当前未打开文档或数据获取失败
### getfootprintfilebyfootprintuuid
# SYS\_FileManager.getFootprintFileByFootprintUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用封装 UUID 获取封装文件
## Signature
```typescript
getFootprintFileByFootprintUuid(footprintUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
footprintUuid
</td><td>
string \| Array<string>
</td><td>
封装 UUID 或封装 UUID 列表
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
fileType
</td><td>
'elibz' \| 'elibz2'
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
封装文件数据,`undefined` 表示数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*团队库 > 下载库\*\* 权限,没有权限调用将始终 `throw Error`
### getpanellibraryfilebypanellibraryuuid
# SYS\_FileManager.getPanelLibraryFileByPanelLibraryUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用面板库 UUID 获取面板库文件
## Signature
```typescript
getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid: string | Array<string>, libraryUuid?: string, fileType?: 'elibz' | 'elibz2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
panelLibraryUuid
</td><td>
string \| Array<string>
</td><td>
面板库 UUID 或面板库 UUID 列表
</td></tr>
<tr><td>
libraryUuid
</td><td>
string
</td><td>
_(Optional)_ 库 UUID,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
</td></tr>
<tr><td>
fileType
</td><td>
'elibz' \| 'elibz2'
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
面板库文件数据,`undefined` 表示数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*团队库 > 下载库\*\* 权限,没有权限调用将始终 `throw Error`
### getprojectfile
# SYS\_FileManager.getProjectFile() method
获取工程文件
## Signature
```typescript
getProjectFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
password
</td><td>
string
</td><td>
_(Optional)_ 加密密码
</td></tr>
<tr><td>
fileType
</td><td>
'epro' \| 'epro2'
</td><td>
_(Optional)_ 文件格式
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
工程文件数据,`undefined` 表示当前未打开工程或数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*工程管理 > 下载工程\*\* 权限,没有权限调用将始终 `throw Error`
### getprojectfilebyprojectuuid
# SYS\_FileManager.getProjectFileByProjectUuid() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用工程 UUID 获取工程文件
## Signature
```typescript
getProjectFileByProjectUuid(projectUuid: string, fileName?: string, password?: string, fileType?: 'epro' | 'epro2'): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectUuid
</td><td>
string
</td><td>
工程 UUID
</td></tr>
<tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名
</td></tr>
<tr><td>
password
</td><td>
string
</td><td>
_(Optional)_ 加密密码
</td></tr>
<tr><td>
fileType
</td><td>
'epro' \| 'epro2'
</td><td>
_(Optional)_ 文件格式
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
工程文件数据,`undefined` 表示当前未打开工程或数据获取失败
## Remarks
可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
注意:本接口需要启用 \*\*工程管理 > 下载工程\*\* 权限,没有权限调用将始终 `throw Error`
### importprojectbyprojectfile
# SYS\_FileManager.importProjectByProjectFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用工程文件导入工程
## Signature
```typescript
importProjectByProjectFile(projectFile: File, fileType?: 'JLCEDA' | 'JLCEDA Pro' | 'EasyEDA' | 'EasyEDA Pro' | 'Allegro' | 'OrCAD' | 'EAGLE' | 'KiCad' | 'PADS' | 'LTspice', props?: {
importOption?: ESYS_ImportProjectImportOption;
schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle;
associateFootprint?: boolean;
associate3DModel?: boolean;
importFootprintNotesLayer?: boolean;
}, saveTo?: {
operation: 'New Project';
newProjectOwnerTeamUuid: IDMT_TeamItem['uuid'];
newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid'];
newProjectName?: string;
newProjectFriendlyName?: string;
newProjectDescription?: string;
newProjectCollaborationMode?: EDMT_ProjectCollaborationMode;
} | {
operation: 'Existing Project';
existingProjectUuid: IDMT_BriefProjectItem['uuid'];
}, librariesImportSetting?: {
ownerTeamUuid: IDMT_TeamItem['uuid'];
createDeviceForSingleSymbol?: boolean;
}): Promise<IDMT_BriefProjectItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectFile
</td><td>
File
</td><td>
工程文件
</td></tr>
<tr><td>
fileType
</td><td>
'JLCEDA' \| 'JLCEDA Pro' \| 'EasyEDA' \| 'EasyEDA Pro' \| 'Allegro' \| 'OrCAD' \| 'EAGLE' \| 'KiCad' \| 'PADS' \| 'LTspice'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
props
</td><td>
{ importOption?: [ESYS\_ImportProjectImportOption](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; schematicObjectStyle?: [ESYS\_ImportProjectSchematicObjectStyle](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean; }
</td><td>
_(Optional)_ 导入参数,参考 EDA 前端 \*\*导入\*\* 窗口内的配置项
</td></tr>
<tr><td>
saveTo
</td><td>
{ operation: 'New Project'; newProjectOwnerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; newProjectOwnerFolderUuid?: [IDMT\_FolderItem](../interfaces/IDMT_FolderItem.md)<!-- -->\['uuid'\]; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: [EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md)<!-- -->; } \| { operation: 'Existing Project'; existingProjectUuid: [IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md)<!-- -->\['uuid'\]; }
</td><td>
_(Optional)_ 保存到工程参数
</td></tr>
<tr><td>
librariesImportSetting
</td><td>
{ ownerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; createDeviceForSingleSymbol?: boolean; }
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined>
导入的工程的简略工程属性
## Remarks
暂不支持提取库的相关配置,如果需求提取库,将会按照默认配置提取
### importprojectbyprojectfile_1
# SYS\_FileManager.importProjectByProjectFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用工程文件导入工程
## Signature
```typescript
importProjectByProjectFile(projectFile: File, fileType?: 'Altium Designer' | 'Protel', props?: {
importOption?: ESYS_ImportProjectImportOption;
viaSolderMaskExpansion?: ESYS_ImportProjectViaSolderMaskExpansion;
boardOutlineSource?: ESYS_ImportProjectBoardOutlineSource;
schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle;
associateFootprint?: boolean;
associate3DModel?: boolean;
importFootprintNotesLayer?: boolean;
}, saveTo?: {
operation: 'New Project';
newProjectOwnerTeamUuid: IDMT_TeamItem['uuid'];
newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid'];
newProjectName?: string;
newProjectFriendlyName?: string;
newProjectDescription?: string;
newProjectCollaborationMode?: EDMT_ProjectCollaborationMode;
} | {
operation: 'Existing Project';
existingProjectUuid: IDMT_BriefProjectItem['uuid'];
}, librariesImportSetting?: {
ownerTeamUuid: IDMT_TeamItem['uuid'];
createDeviceForSingleSymbol?: boolean;
}): Promise<IDMT_BriefProjectItem | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
projectFile
</td><td>
File
</td><td>
工程文件
</td></tr>
<tr><td>
fileType
</td><td>
'Altium Designer' \| 'Protel'
</td><td>
_(Optional)_ 文件类型
</td></tr>
<tr><td>
props
</td><td>
{ importOption?: [ESYS\_ImportProjectImportOption](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; viaSolderMaskExpansion?: [ESYS\_ImportProjectViaSolderMaskExpansion](../enums/ESYS_ImportProjectViaSolderMaskExpansion.md)<!-- -->; boardOutlineSource?: [ESYS\_ImportProjectBoardOutlineSource](../enums/ESYS_ImportProjectBoardOutlineSource.md)<!-- -->; schematicObjectStyle?: [ESYS\_ImportProjectSchematicObjectStyle](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean; }
</td><td>
_(Optional)_ 导入参数,参考 EDA 前端 \*\*导入\*\* 窗口内的配置项
</td></tr>
<tr><td>
saveTo
</td><td>
{ operation: 'New Project'; newProjectOwnerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; newProjectOwnerFolderUuid?: [IDMT\_FolderItem](../interfaces/IDMT_FolderItem.md)<!-- -->\['uuid'\]; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: [EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md)<!-- -->; } \| { operation: 'Existing Project'; existingProjectUuid: [IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md)<!-- -->\['uuid'\]; }
</td><td>
_(Optional)_ 保存到工程参数
</td></tr>
<tr><td>
librariesImportSetting
</td><td>
{ ownerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; createDeviceForSingleSymbol?: boolean; }
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined>
导入的工程的简略工程属性
## Remarks
暂不支持提取库的相关配置,如果需求提取库,将会按照默认配置提取
### setdocumentsource
# SYS\_FileManager.setDocumentSource() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改文档源码
## Signature
```typescript
setDocumentSource(source: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
source
</td><td>
string
</td><td>
文档源码
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
是否修改成功,如果输入的文档源码格式错误,将返回 `false` 的结果
FILE:references/classes/SYS_FileSystem.md
# SYS\_FileSystem class
系统 / 文件系统交互类
## Signature
```typescript
declare class SYS_FileSystem
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[deleteFileInFileSystem(uri, force)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 删除文件系统内的文件
</td></tr>
<tr><td>
[getDocumentsPath()](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 获取文档目录路径
</td></tr>
<tr><td>
[getEdaPath()](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 获取 EDA 文档目录路径
</td></tr>
<tr><td>
[getExtensionFile(uri)](./SYS_FileSystem.md)
</td><td>
</td><td>
获取扩展内的文件
</td></tr>
<tr><td>
[getLibrariesPaths()](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 获取库目录路径
</td></tr>
<tr><td>
[getProjectsPaths()](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 获取工程目录路径
</td></tr>
<tr><td>
[listFilesOfFileSystem(folderPath, recursive)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 查看文件系统路径下的文件列表
</td></tr>
<tr><td>
[openReadFileDialog(filenameExtensions, multiFiles)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 打开读入文件窗口
</td></tr>
<tr><td>
[openReadFileDialog(filenameExtensions, multiFiles)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 打开读入文件窗口
</td></tr>
<tr><td>
[readFileFromFileSystem(uri)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 从文件系统读取文件
</td></tr>
<tr><td>
[saveFile(fileData, fileName)](./SYS_FileSystem.md)
</td><td>
</td><td>
保存文件
</td></tr>
<tr><td>
[saveFileToFileSystem(uri, fileData, fileName, force)](./SYS_FileSystem.md)
</td><td>
</td><td>
**_(BETA)_** 向文件系统写入文件
</td></tr>
</tbody></table>
---
## 方法详情
### deletefileinfilesystem
# SYS\_FileSystem.deleteFileInFileSystem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
删除文件系统内的文件
## Signature
```typescript
deleteFileInFileSystem(uri: string, force?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uri
</td><td>
string
</td><td>
文件资源定位符
如若结尾为斜杠 `/`<!-- -->(Windows 为反斜杠 `\`<!-- -->),则识别为文件夹;
如若结尾非斜杠,则识别为完整文件名,此时 `fileName` 参数将被忽略
</td></tr>
<tr><td>
force
</td><td>
boolean
</td><td>
_(Optional)_ 强制删除文件夹(当欲删除的是文件夹且文件夹内有文件时,是否强制删除该文件夹)
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
## Remarks
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### getdocumentspath
# SYS\_FileSystem.getDocumentsPath() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取文档目录路径
## Signature
```typescript
getDocumentsPath(): Promise<string>;
```
## Returns
Promise<string>
文档目录路径
## Remarks
返回的路径中,结尾不包含斜杠 `/`<!-- -->(或反斜杠 `\`<!-- -->)
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### getedapath
# SYS\_FileSystem.getEdaPath() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 EDA 文档目录路径
## Signature
```typescript
getEdaPath(): Promise<string>;
```
## Returns
Promise<string>
EDA 文档目录路径
## Remarks
返回的路径中,结尾不包含斜杠 `/`<!-- -->(或反斜杠 `\`<!-- -->)
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### getextensionfile
# SYS\_FileSystem.getExtensionFile() method
获取扩展内的文件
## Signature
```typescript
getExtensionFile(uri: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uri
</td><td>
string
</td><td>
文件路径
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
File 格式文件
### getlibrariespaths
# SYS\_FileSystem.getLibrariesPaths() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取库目录路径
## Signature
```typescript
getLibrariesPaths(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
库目录路径数组
## Remarks
注意 1:本接口仅全离线客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### getprojectspaths
# SYS\_FileSystem.getProjectsPaths() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取工程目录路径
## Signature
```typescript
getProjectsPaths(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
工程目录路径数组
## Remarks
注意 1:本接口仅半、全离线客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### listfilesoffilesystem
# SYS\_FileSystem.listFilesOfFileSystem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查看文件系统路径下的文件列表
## Signature
```typescript
listFilesOfFileSystem(folderPath: string, recursive?: boolean): Promise<Array<ISYS_FileSystemFileList>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
folderPath
</td><td>
string
</td><td>
目录路径
</td></tr>
<tr><td>
recursive
</td><td>
boolean
</td><td>
_(Optional)_ 是否递归获取所有子文件
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISYS\_FileSystemFileList](../interfaces/ISYS_FileSystemFileList.md)<!-- -->>>
当前目录下的文件列表
## Remarks
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### openreadfiledialog
# SYS\_FileSystem.openReadFileDialog() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
打开读入文件窗口
## Signature
```typescript
openReadFileDialog(filenameExtensions?: string | Array<string>, multiFiles?: true): Promise<Array<File> | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
filenameExtensions
</td><td>
string \| Array<string>
</td><td>
_(Optional)_ 文件扩展名
</td></tr>
<tr><td>
multiFiles
</td><td>
true
</td><td>
_(Optional)_ 是否允许读取多文件
</td></tr>
</tbody></table>
## Returns
Promise<Array<File> \| undefined>
File 格式文件数组
### openreadfiledialog_1
# SYS\_FileSystem.openReadFileDialog() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
打开读入文件窗口
## Signature
```typescript
openReadFileDialog(filenameExtensions?: string | Array<string>, multiFiles?: false): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
filenameExtensions
</td><td>
string \| Array<string>
</td><td>
_(Optional)_ 文件扩展名
</td></tr>
<tr><td>
multiFiles
</td><td>
false
</td><td>
_(Optional)_ 是否允许读取多文件
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
File 格式文件
### readfilefromfilesystem
# SYS\_FileSystem.readFileFromFileSystem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
从文件系统读取文件
## Signature
```typescript
readFileFromFileSystem(uri: string): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uri
</td><td>
string
</td><td>
文件资源定位符,需要包含完整的文件名称的绝对路径
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
File 格式文件
## Remarks
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### savefile
# SYS\_FileSystem.saveFile() method
保存文件
## Signature
```typescript
saveFile(fileData: File | Blob, fileName?: string): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fileData
</td><td>
File \| Blob
</td><td>
文件数据
</td></tr>
<tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名称
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
调用浏览器下载接口或 Electron 保存文件接口,将传入的文件流保存到本地
### savefiletofilesystem
# SYS\_FileSystem.saveFileToFileSystem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
向文件系统写入文件
## Signature
```typescript
saveFileToFileSystem(uri: string, fileData: File | Blob, fileName?: string, force?: boolean): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uri
</td><td>
string
</td><td>
文件资源定位符
如若结尾为斜杠 `/`<!-- -->(Windows 为反斜杠 `\`<!-- -->),则识别为文件夹;
如若结尾非斜杠,则识别为完整文件名,此时 `fileName` 参数将被忽略
</td></tr>
<tr><td>
fileData
</td><td>
File \| Blob
</td><td>
文件数据
</td></tr>
<tr><td>
fileName
</td><td>
string
</td><td>
_(Optional)_ 文件名称
</td></tr>
<tr><td>
force
</td><td>
boolean
</td><td>
_(Optional)_ 强制写入(文件存在则覆盖文件)
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
写入操作是否成功,如若不允许覆盖但文件已存在将返回 `false` 的结果
## Remarks
注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 `throw Error`
注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
FILE:references/classes/SYS_FontManager.md
# SYS\_FontManager class
系统 / 字体管理类
## Signature
```typescript
declare class SYS_FontManager
```
## Remarks
配置嘉立创 EDA 专业版允许调用的系统字体列表
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addFont(fontName)](./SYS_FontManager.md)
</td><td>
</td><td>
添加字体到字体列表
</td></tr>
<tr><td>
[deleteFont(fontName)](./SYS_FontManager.md)
</td><td>
</td><td>
删除字体列表内的指定字体
</td></tr>
<tr><td>
[getFontsList()](./SYS_FontManager.md)
</td><td>
</td><td>
获取当前已经配置的字体列表
</td></tr>
</tbody></table>
---
## 方法详情
### addfont
# SYS\_FontManager.addFont() method
添加字体到字体列表
## Signature
```typescript
addFont(fontName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontName
</td><td>
string
</td><td>
字体名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
添加操作是否成功
### deletefont
# SYS\_FontManager.deleteFont() method
删除字体列表内的指定字体
## Signature
```typescript
deleteFont(fontName: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
fontName
</td><td>
string
</td><td>
字体名称
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
删除操作是否成功
### getfontslist
# SYS\_FontManager.getFontsList() method
获取当前已经配置的字体列表
## Signature
```typescript
getFontsList(): Promise<Array<string>>;
```
## Returns
Promise<Array<string>>
字体列表
FILE:references/classes/SYS_FormatConversion.md
# SYS\_FormatConversion class
系统 / 格式转换(Chameleon)类
## Signature
```typescript
declare class SYS_FormatConversion
```
## Remarks
与其它板级 EDA 软件进行交叉文件格式转换
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[convertAltiumDesignerLibrariesToEasyEDAMultiFiles(file)](./SYS_FormatConversion.md)
</td><td>
</td><td>
**_(BETA)_** 转换 Altium Designer 库到多个嘉立创库文件(每个器件一个文件)
</td></tr>
<tr><td>
[convertAltiumDesignerLibrariesToEasyEDASingleFile(file)](./SYS_FormatConversion.md)
</td><td>
</td><td>
**_(BETA)_** 转换 Altium Designer 库到单个嘉立创库文件
</td></tr>
<tr><td>
[convertDisaLibrariesToEasyEDAMultiFiles(file)](./SYS_FormatConversion.md)
</td><td>
</td><td>
**_(BETA)_** 转换 T/DISA 4001 库到多个嘉立创库文件(每个器件一个文件)
</td></tr>
<tr><td>
[convertDisaLibrariesToEasyEDASingleFile(file)](./SYS_FormatConversion.md)
</td><td>
</td><td>
**_(BETA)_** 转换 T/DISA 4001 库到单个嘉立创库文件
</td></tr>
</tbody></table>
---
## 方法详情
### convertaltiumdesignerlibrariestoeasyedamultifiles
# SYS\_FormatConversion.convertAltiumDesignerLibrariesToEasyEDAMultiFiles() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换 Altium Designer 库到多个嘉立创库文件(每个器件一个文件)
## Signature
```typescript
convertAltiumDesignerLibrariesToEasyEDAMultiFiles(file: File | Array<File>): Promise<Array<File>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
file
</td><td>
File \| Array<File>
</td><td>
Altium Designer 库文件
</td></tr>
</tbody></table>
## Returns
Promise<Array<File>>
多个嘉立创库文件
### convertaltiumdesignerlibrariestoeasyedasinglefile
# SYS\_FormatConversion.convertAltiumDesignerLibrariesToEasyEDASingleFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换 Altium Designer 库到单个嘉立创库文件
## Signature
```typescript
convertAltiumDesignerLibrariesToEasyEDASingleFile(file: File | Array<File>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
file
</td><td>
File \| Array<File>
</td><td>
Altium Designer 库文件
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
嘉立创库文件
### convertdisalibrariestoeasyedamultifiles
# SYS\_FormatConversion.convertDisaLibrariesToEasyEDAMultiFiles() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换 T/DISA 4001 库到多个嘉立创库文件(每个器件一个文件)
## Signature
```typescript
convertDisaLibrariesToEasyEDAMultiFiles(file: File | Array<File>): Promise<Array<File>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
file
</td><td>
File \| Array<File>
</td><td>
T/DISA 4001 库文件
</td></tr>
</tbody></table>
## Returns
Promise<Array<File>>
多个嘉立创库文件
### convertdisalibrariestoeasyedasinglefile
# SYS\_FormatConversion.convertDisaLibrariesToEasyEDASingleFile() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
转换 T/DISA 4001 库到单个嘉立创库文件
## Signature
```typescript
convertDisaLibrariesToEasyEDASingleFile(file: File | Array<File>): Promise<File | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
file
</td><td>
File \| Array<File>
</td><td>
T/DISA 4001 库文件
</td></tr>
</tbody></table>
## Returns
Promise<File \| undefined>
嘉立创库文件
FILE:references/classes/SYS_HeaderMenu.md
# SYS\_HeaderMenu class
系统 / 顶部菜单类
## Signature
```typescript
declare class SYS_HeaderMenu
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[insertHeaderMenus(headerMenus)](./SYS_HeaderMenu.md)
</td><td>
</td><td>
导入顶部菜单数据
</td></tr>
<tr><td>
[insertSystemHeaderMenuItem(env, id, props)](./SYS_HeaderMenu.md)
</td><td>
</td><td>
**_(BETA)_** 在指定位置插入系统顶部菜单项
</td></tr>
<tr><td>
[removeHeaderMenus()](./SYS_HeaderMenu.md)
</td><td>
</td><td>
移除顶部菜单数据
</td></tr>
<tr><td>
[removeSystemHeaderMenuItem(id, props)](./SYS_HeaderMenu.md)
</td><td>
</td><td>
**_(BETA)_** 移除系统顶部菜单项
</td></tr>
<tr><td>
[replaceHeaderMenus(headerMenus)](./SYS_HeaderMenu.md)
</td><td>
</td><td>
替换顶部菜单数据
</td></tr>
</tbody></table>
---
## 方法详情
### insertheadermenus
# SYS\_HeaderMenu.insertHeaderMenus() method
导入顶部菜单数据
## Signature
```typescript
insertHeaderMenus(headerMenus: ISYS_HeaderMenus): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
headerMenus
</td><td>
[ISYS\_HeaderMenus](../interfaces/ISYS_HeaderMenus.md)
</td><td>
顶部菜单数据
</td></tr>
</tbody></table>
## Returns
Promise<void>
### insertsystemheadermenuitem
# SYS\_HeaderMenu.insertSystemHeaderMenuItem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
在指定位置插入系统顶部菜单项
## Signature
```typescript
insertSystemHeaderMenuItem(env: ESYS_HeaderMenuEnvironment, id: Array<string>, props: {
title: string;
registerFn?: string;
menuItems?: Array<ISYS_HeaderMenuSub1MenuItem | ISYS_HeaderMenuSub2MenuItem | null>;
insertDividerBefore?: boolean;
insertDividerAfter?: boolean;
insertBefore?: string;
crossDividerWhenInsert?: boolean;
}): Promise<string | undefined>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
env
</td><td>
[ESYS\_HeaderMenuEnvironment](../enums/ESYS_HeaderMenuEnvironment.md)
</td><td>
环境
</td></tr>
<tr><td>
id
</td><td>
Array<string>
</td><td>
菜单项 ID 树,将会按照数组顺序按层级匹配菜单项,并将数组最后一位作为插入的菜单项的 ID
</td></tr>
<tr><td>
props
</td><td>
{ title: string; registerFn?: string; menuItems?: Array<[ISYS\_HeaderMenuSub1MenuItem](../interfaces/ISYS_HeaderMenuSub1MenuItem.md) \| [ISYS\_HeaderMenuSub2MenuItem](../interfaces/ISYS_HeaderMenuSub2MenuItem.md) \| null>; insertDividerBefore?: boolean; insertDividerAfter?: boolean; insertBefore?: string; crossDividerWhenInsert?: boolean; }
</td><td>
其它参数
</td></tr>
</tbody></table>
## Returns
Promise<string \| undefined>
顶部菜单项的 ID 数组,分隔线是否插入并不会影响操作结果的返回值
## Remarks
系统顶部菜单一旦新增无法有效删除,需要重启嘉立创 EDA 软件才可以恢复
本接口需要在系统已有的系统一级菜单下新增子菜单,无法新增和修改一级菜单,`id` 数组请至少传递 `2` 个值
本接口将会强制新建的系统顶部菜单的 ID 包含扩展 UUID,例如输入的 `id = 'example'`<!-- -->,将会被自动重写为 `e143d88179874e7f851cc890cd22fc71|example`<!-- -->,后续如需移除该菜单,请输入重写后的名称
本接口不能在 \*\*高级\*\* 菜单下新增任何子菜单
本接口新增的子菜单将默认排列在原菜单的结尾,除非指定了 `props.insertBefore` 参数
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知
### removeheadermenus
# SYS\_HeaderMenu.removeHeaderMenus() method
移除顶部菜单数据
## Signature
```typescript
removeHeaderMenus(): void;
```
## Returns
void
### removesystemheadermenuitem
# SYS\_HeaderMenu.removeSystemHeaderMenuItem() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
移除系统顶部菜单项
## Signature
```typescript
removeSystemHeaderMenuItem(id: Array<string>, props?: {
removeTheBeforeDivider?: boolean;
removeTheAfterDivider?: boolean;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
Array<string>
</td><td>
菜单项 ID 树,将会按照数组顺序按层级匹配菜单项,并移除数组最后一位对应的菜单项
</td></tr>
<tr><td>
props
</td><td>
\{ removeTheBeforeDivider?: boolean; removeTheAfterDivider?: boolean; \}
</td><td>
_(Optional)_ 其它参数,是否移除菜单项之前、之后的分隔线
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
移除操作是否成功,菜单已移除但分隔线未找到也会返回 `true` 的结果
## Remarks
一旦菜单被移除,需要重启嘉立创 EDA 软件才可以恢复
本接口无法移除 接口导入的系统顶部菜单项
本接口无法移除第一级菜单,`id` 数组请至少传递 `2` 个值
本接口无法移除 \*\*高级\*\* 菜单下的任何子菜单
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知
### replaceheadermenus
# SYS\_HeaderMenu.replaceHeaderMenus() method
替换顶部菜单数据
## Signature
```typescript
replaceHeaderMenus(headerMenus: ISYS_HeaderMenus): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
headerMenus
</td><td>
[ISYS\_HeaderMenus](../interfaces/ISYS_HeaderMenus.md)
</td><td>
顶部菜单数据
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
本接口相当于同时执行了 [移除](./SYS_HeaderMenu.md) 和 [导入](./SYS_HeaderMenu.md) 操作
FILE:references/classes/SYS_I18n.md
# SYS\_I18n class
系统 / 多语言类
## Signature
```typescript
declare class SYS_I18n
```
## Remarks
使用多语言系统展示多语言文本
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addLanguageChangedEventListener(id, callFn, onlyOnce)](./SYS_I18n.md)
</td><td>
</td><td>
新增语言切换事件监听
</td></tr>
<tr><td>
[getAllSupportedLanguages()](./SYS_I18n.md)
</td><td>
</td><td>
查询所有支持的语言
</td></tr>
<tr><td>
[getCurrentLanguage()](./SYS_I18n.md)
</td><td>
</td><td>
获取当前语言环境
</td></tr>
<tr><td>
[importMultilingual(language, source)](./SYS_I18n.md)
</td><td>
</td><td>
导入多语言
</td></tr>
<tr><td>
[importMultilingualLanguage(namespace, language, source)](./SYS_I18n.md)
</td><td>
</td><td>
导入多语言:指定命名空间和语言
</td></tr>
<tr><td>
[importMultilingualNamespace(namespace, source)](./SYS_I18n.md)
</td><td>
</td><td>
导入多语言:指定命名空间
</td></tr>
<tr><td>
[isEventListenerAlreadyExist(id)](./SYS_I18n.md)
</td><td>
</td><td>
查询事件监听是否存在
</td></tr>
<tr><td>
[isLanguageSupported(language)](./SYS_I18n.md)
</td><td>
</td><td>
检查语言是否受支持
</td></tr>
<tr><td>
[removeEventListener(id)](./SYS_I18n.md)
</td><td>
</td><td>
移除事件监听
</td></tr>
<tr><td>
[text(tag, namespace, language, args)](./SYS_I18n.md)
</td><td>
</td><td>
输出语言文本
</td></tr>
</tbody></table>
---
## 方法详情
### addlanguagechangedeventlistener
# SYS\_I18n.addLanguageChangedEventListener() method
新增语言切换事件监听
## Signature
```typescript
addLanguageChangedEventListener(id: string, callFn: (newLanguage: string, lastLanguage: string) => void | Promise<void>, onlyOnce: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID,用以防止重复注册事件
</td></tr>
<tr><td>
callFn
</td><td>
(newLanguage: string, lastLanguage: string) => void \| Promise<void>
</td><td>
事件触发时的回调函数
</td></tr>
<tr><td>
onlyOnce
</td><td>
boolean
</td><td>
</td></tr>
</tbody></table>
## Returns
void
### getallsupportedlanguages
# SYS\_I18n.getAllSupportedLanguages() method
查询所有支持的语言
## Signature
```typescript
getAllSupportedLanguages(): Array<string>;
```
## Returns
Array<string>
所有支持的语言列表
### getcurrentlanguage
# SYS\_I18n.getCurrentLanguage() method
获取当前语言环境
## Signature
```typescript
getCurrentLanguage(): Promise<string>;
```
## Returns
Promise<string>
语言
## Remarks
能够获取到的语言受 EDA 当前支持语言限制,其它 API 支持的语言需要显式指定 `language` 参数才能使用
### importmultilingual
# SYS\_I18n.importMultilingual() method
导入多语言
## Signature
```typescript
importMultilingual(language: string, source: ISYS_LanguageKeyValuePairs): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
language
</td><td>
string
</td><td>
语言
</td></tr>
<tr><td>
source
</td><td>
[ISYS\_LanguageKeyValuePairs](../interfaces/ISYS_LanguageKeyValuePairs.md)
</td><td>
欲导入的多语言数据对象
</td></tr>
</tbody></table>
## Returns
boolean
导入是否成功
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### importmultilinguallanguage
# SYS\_I18n.importMultilingualLanguage() method
导入多语言:指定命名空间和语言
## Signature
```typescript
importMultilingualLanguage(namespace: string, language: string, source: ISYS_LanguageKeyValuePairs): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
namespace
</td><td>
string
</td><td>
命名空间
</td></tr>
<tr><td>
language
</td><td>
string
</td><td>
语言
</td></tr>
<tr><td>
source
</td><td>
[ISYS\_LanguageKeyValuePairs](../interfaces/ISYS_LanguageKeyValuePairs.md)
</td><td>
欲导入的多语言数据对象
</td></tr>
</tbody></table>
## Returns
boolean
导入是否成功
### importmultilingualnamespace
# SYS\_I18n.importMultilingualNamespace() method
导入多语言:指定命名空间
## Signature
```typescript
importMultilingualNamespace(namespace: string, source: ISYS_MultilingualLanguagesData): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
namespace
</td><td>
string
</td><td>
命名空间
</td></tr>
<tr><td>
source
</td><td>
[ISYS\_MultilingualLanguagesData](../interfaces/ISYS_MultilingualLanguagesData.md)
</td><td>
欲导入的多语言数据对象
</td></tr>
</tbody></table>
## Returns
boolean
导入是否成功
### iseventlisteneralreadyexist
# SYS\_I18n.isEventListenerAlreadyExist() method
查询事件监听是否存在
## Signature
```typescript
isEventListenerAlreadyExist(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
事件监听是否存在
### islanguagesupported
# SYS\_I18n.isLanguageSupported() method
检查语言是否受支持
## Signature
```typescript
isLanguageSupported(language: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
language
</td><td>
string
</td><td>
语言
</td></tr>
</tbody></table>
## Returns
boolean
是否受支持
### removeeventlistener
# SYS\_I18n.removeEventListener() method
移除事件监听
## Signature
```typescript
removeEventListener(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
事件 ID
</td></tr>
</tbody></table>
## Returns
boolean
是否移除指定事件监听
### text
# SYS\_I18n.text() method
输出语言文本
## Signature
```typescript
text(tag: string, namespace?: string, language?: string, ...args: Array<any>): string;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tag
</td><td>
string
</td><td>
文本标签,对应多语言文件键值对中的键
</td></tr>
<tr><td>
namespace
</td><td>
string
</td><td>
_(Optional)_ 文本命名空间,在扩展运行环境内默认为扩展的 UUID,否则为系统默认命名空间
</td></tr>
<tr><td>
language
</td><td>
string
</td><td>
_(Optional)_ 语言,`undefined` 为 EDA 当前的显示语言
</td></tr>
<tr><td>
args
</td><td>
Array<any>
</td><td>
语言文本中替换占位符的参数
</td></tr>
</tbody></table>
## Returns
string
语言文本
## Remarks
可以使用 `1` 格式的占位符表示参数;
语言优先级:当前显示语言 > 系统默认语言 > 数据集中第一个搜索到的包含该文本标签的语言 > 文本标签(tag)
FILE:references/classes/SYS_IFrame.md
# SYS\_IFrame class
系统 / 内联框架窗口类
## Signature
```typescript
declare class SYS_IFrame
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[closeIFrame(id)](./SYS_IFrame.md)
</td><td>
</td><td>
**_(BETA)_** 关闭内联框架窗口
</td></tr>
<tr><td>
[hideIFrame(id)](./SYS_IFrame.md)
</td><td>
</td><td>
**_(BETA)_** 隐藏内联框架窗口
</td></tr>
<tr><td>
[openIFrame(htmlFileName, width, height, id, props)](./SYS_IFrame.md)
</td><td>
</td><td>
**_(BETA)_** 打开内联框架窗口
</td></tr>
<tr><td>
[showIFrame(id)](./SYS_IFrame.md)
</td><td>
</td><td>
**_(BETA)_** 显示内联框架窗口
</td></tr>
</tbody></table>
---
## 方法详情
### closeiframe
# SYS\_IFrame.closeIFrame() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
关闭内联框架窗口
## Signature
```typescript
closeIFrame(id?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
_(Optional)_ 内联框架窗口 ID,如若传入 `undefined`<!-- -->,将关闭由本扩展打开的所有内联框架窗口
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
关闭指定 ID 的内联框架窗口
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### hideiframe
# SYS\_IFrame.hideIFrame() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
隐藏内联框架窗口
## Signature
```typescript
hideIFrame(id?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
_(Optional)_ 内联框架窗口 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口为结果导向的: 如若未找到指定内联框架窗口,接口将会返回 `false`<!-- -->; 如若在执行操作前该内联框架窗口已处于隐藏状态,接口将会返回 `true`
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### openiframe
# SYS\_IFrame.openIFrame() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
打开内联框架窗口
## Signature
```typescript
openIFrame(htmlFileName: string, width?: number, height?: number, id?: string, props?: {
maximizeButton?: boolean;
minimizeButton?: boolean;
minimizeStyle?: 'collapsed' | 'constricted';
buttonCallbackFn?: (button: 'close' | 'minimize' | 'maximize') => void | Promise<void>;
onBeforeCloseCallFn?: () => boolean | undefined | Promise<boolean | undefined>;
grayscaleMask?: boolean;
title?: string;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
htmlFileName
</td><td>
string
</td><td>
需要加载的 HTML 文件在扩展包内的路径,从扩展根目录起始,例如 `/iframe/index.html`
</td></tr>
<tr><td>
width
</td><td>
number
</td><td>
_(Optional)_ 内联框架窗口的宽度
</td></tr>
<tr><td>
height
</td><td>
number
</td><td>
_(Optional)_ 内联框架窗口的高度
</td></tr>
<tr><td>
id
</td><td>
string
</td><td>
_(Optional)_ 内联框架窗口 ID,用于关闭内联框架窗口
</td></tr>
<tr><td>
props
</td><td>
{ maximizeButton?: boolean; minimizeButton?: boolean; minimizeStyle?: 'collapsed' \| 'constricted'; buttonCallbackFn?: (button: 'close' \| 'minimize' \| 'maximize') => void \| Promise<void>; onBeforeCloseCallFn?: () => boolean \| undefined \| Promise<boolean \| undefined>; grayscaleMask?: boolean; title?: string; }
</td><td>
_(Optional)_ 其它参数
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口仅扩展包允许调用,用户需要在扩展包内包含用于内联的 HTML 文件;
本接口调用后将会打开一个 Dialog 窗口,该 Dialog 窗口的标题为 HTML 文件的 `<title>`<!-- -->,标题栏有关闭按钮;
正文部分为内联框架,`width` 和 `height` 均为正文部分内联框架的宽高;
内联框架需要展示 `htmlFileName` 的内容,该 HTML 从扩展包内获取,并已在安装时被存储至 IndexedDB 中
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### showiframe
# SYS\_IFrame.showIFrame() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
显示内联框架窗口
## Signature
```typescript
showIFrame(id?: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
_(Optional)_ 内联框架窗口 ID
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
本接口为结果导向的: 如若未找到指定内联框架窗口,接口将会返回 `false`<!-- -->; 如若在执行操作前该内联框架窗口已处于显示状态,接口将会返回 `true`
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
FILE:references/classes/SYS_LoadingAndProgressBar.md
# SYS\_LoadingAndProgressBar class
系统 / 加载与进度条类
## Signature
```typescript
declare class SYS_LoadingAndProgressBar
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[destroyLoading()](./SYS_LoadingAndProgressBar.md)
</td><td>
</td><td>
销毁无进度加载覆盖
</td></tr>
<tr><td>
[destroyProgressBar()](./SYS_LoadingAndProgressBar.md)
</td><td>
</td><td>
销毁进度条
</td></tr>
<tr><td>
[showLoading()](./SYS_LoadingAndProgressBar.md)
</td><td>
</td><td>
显示无进度加载覆盖
</td></tr>
<tr><td>
[showProgressBar(progress, title)](./SYS_LoadingAndProgressBar.md)
</td><td>
</td><td>
显示进度条或设置进度条进度
</td></tr>
</tbody></table>
---
## 方法详情
### destroyloading
# SYS\_LoadingAndProgressBar.destroyLoading() method
销毁无进度加载覆盖
## Signature
```typescript
destroyLoading(): void;
```
## Returns
void
### destroyprogressbar
# SYS\_LoadingAndProgressBar.destroyProgressBar() method
销毁进度条
## Signature
```typescript
destroyProgressBar(): void;
```
## Returns
void
### showloading
# SYS\_LoadingAndProgressBar.showLoading() method
显示无进度加载覆盖
## Signature
```typescript
showLoading(): void;
```
## Returns
void
## Remarks
没有进度指示,但会存在与进度条一致的灰色覆盖,阻止用户进一步操作
### showprogressbar
# SYS\_LoadingAndProgressBar.showProgressBar() method
显示进度条或设置进度条进度
## Signature
```typescript
showProgressBar(progress?: number, title?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
progress
</td><td>
number
</td><td>
_(Optional)_ 进度值,取值范围 `0-100`
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 进度条标题
</td></tr>
</tbody></table>
## Returns
void
## Remarks
当进度达到 `100` 时,进度条将自动销毁
FILE:references/classes/SYS_Log.md
# SYS\_Log class
系统 / 日志类
## Signature
```typescript
declare class SYS_Log
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[add(message, type)](./SYS_Log.md)
</td><td>
</td><td>
添加日志条目
</td></tr>
<tr><td>
[clear()](./SYS_Log.md)
</td><td>
</td><td>
清空日志
</td></tr>
<tr><td>
[export(types)](./SYS_Log.md)
</td><td>
</td><td>
导出日志
</td></tr>
<tr><td>
[find(message, types)](./SYS_Log.md)
</td><td>
</td><td>
查找条目
</td></tr>
<tr><td>
[sort(types)](./SYS_Log.md)
</td><td>
</td><td>
筛选并获取日志条目
</td></tr>
</tbody></table>
---
## 方法详情
### add
# SYS\_Log.add() method
添加日志条目
## Signature
```typescript
add(message: string, type?: ESYS_LogType): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
message
</td><td>
string
</td><td>
日志内容
</td></tr>
<tr><td>
type
</td><td>
[ESYS\_LogType](../enums/ESYS_LogType.md)
</td><td>
_(Optional)_ 日志类型
</td></tr>
</tbody></table>
## Returns
void
### clear
# SYS\_Log.clear() method
清空日志
## Signature
```typescript
clear(): void;
```
## Returns
void
### export
# SYS\_Log.export() method
导出日志
## Signature
```typescript
export(types?: ESYS_LogType | Array<ESYS_LogType>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
types
</td><td>
[ESYS\_LogType](../enums/ESYS_LogType.md) \| Array<[ESYS\_LogType](../enums/ESYS_LogType.md)<!-- -->>
</td><td>
_(Optional)_ 日志类型
</td></tr>
</tbody></table>
## Returns
void
### find
# SYS\_Log.find() method
查找条目
## Signature
```typescript
find(message: string | Array<string | {
text: string;
attr?: {
id?: string;
path?: string;
sheet?: string;
pcbid?: string;
type?: string;
};
}>, types?: ESYS_LogType | Array<ESYS_LogType>): Promise<Array<ISYS_LogLine>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
message
</td><td>
string \| Array<string \| { text: string; attr?: { id?: string; path?: string; sheet?: string; pcbid?: string; type?: string; }; }>
</td><td>
查找内容
</td></tr>
<tr><td>
types
</td><td>
[ESYS\_LogType](../enums/ESYS_LogType.md) \| Array<[ESYS\_LogType](../enums/ESYS_LogType.md)<!-- -->>
</td><td>
_(Optional)_ 日志类型数组,可以在指定的日志类型内查找
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISYS\_LogLine](../interfaces/ISYS_LogLine.md)<!-- -->>>
符合查找条件的日志条目数组
## Remarks
如果日志面板处于打开状态,查找操作会同时在前端展现
### sort
# SYS\_Log.sort() method
筛选并获取日志条目
## Signature
```typescript
sort(types?: ESYS_LogType | Array<ESYS_LogType>): Promise<Array<ISYS_LogLine>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
types
</td><td>
[ESYS\_LogType](../enums/ESYS_LogType.md) \| Array<[ESYS\_LogType](../enums/ESYS_LogType.md)<!-- -->>
</td><td>
_(Optional)_ 日志类型数组,可以同时指定多种日志类型,如若不指定则为全部类型
</td></tr>
</tbody></table>
## Returns
Promise<Array<[ISYS\_LogLine](../interfaces/ISYS_LogLine.md)<!-- -->>>
符合筛选条件的日志条目数组
## Remarks
如果日志面板处于打开状态,筛选操作会同时在前端展现
FILE:references/classes/SYS_Message.md
# SYS\_Message class
系统 / 消息通知类
## Signature
```typescript
declare class SYS_Message
```
## Remarks
生成各种对用户的非侵入式提醒
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[removeFollowMouseTip(tip)](./SYS_Message.md)
</td><td>
</td><td>
**_(BETA)_** 移除跟随鼠标的提示
</td></tr>
<tr><td>
[showFollowMouseTip(tip, msTimeout)](./SYS_Message.md)
</td><td>
</td><td>
**_(BETA)_** 展示跟随鼠标的提示
</td></tr>
<tr><td>
[showToastMessage(message, messageType, timer, bottomPanel, buttonTitle, buttonCallbackFn)](./SYS_Message.md)
</td><td>
</td><td>
显示吐司消息
</td></tr>
</tbody></table>
---
## 方法详情
### removefollowmousetip
# SYS\_Message.removeFollowMouseTip() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
移除跟随鼠标的提示
## Signature
```typescript
removeFollowMouseTip(tip?: string): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tip
</td><td>
string
</td><td>
_(Optional)_ 提示内容,如若传入,则仅当当前提示为指定内容时才移除
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
移除当前或指定的跟随鼠标的提示
### showfollowmousetip
# SYS\_Message.showFollowMouseTip() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
展示跟随鼠标的提示
## Signature
```typescript
showFollowMouseTip(tip: string, msTimeout?: number): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tip
</td><td>
string
</td><td>
提示内容
</td></tr>
<tr><td>
msTimeout
</td><td>
number
</td><td>
_(Optional)_ 展示时间,以毫秒(ms)为单位,如若不传入则持续展示,直到调用 [removeFollowMouseTip](./SYS_Message.md) 或被其它提示覆盖
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
同一时间只能展示一条提示,如果展示新的提示,则之前的提示将被自动移除
### showtoastmessage
# SYS\_Message.showToastMessage() method
显示吐司消息
## Signature
```typescript
showToastMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
message
</td><td>
string
</td><td>
消息内容
</td></tr>
<tr><td>
messageType
</td><td>
[ESYS\_ToastMessageType](../enums/ESYS_ToastMessageType.md)
</td><td>
_(Optional)_ 消息类型
</td></tr>
<tr><td>
timer
</td><td>
number
</td><td>
_(Optional)_ 自动关闭倒计时秒数,`0` 为不自动关闭
</td></tr>
<tr><td>
bottomPanel
</td><td>
[ESYS\_BottomPanelTab](../enums/ESYS_BottomPanelTab.md)
</td><td>
_(Optional)_ 展开底部信息面板
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 回调按钮标题
</td></tr>
<tr><td>
buttonCallbackFn
</td><td>
string
</td><td>
_(Optional)_ 回调函数内容,字符串形式,会被自动解析并执行
</td></tr>
</tbody></table>
## Returns
void
FILE:references/classes/SYS_MessageBox.md
# SYS\_MessageBox class
> Warning: This API is now obsolete.
>
> 已更名为 [SYS\_Dialog](./SYS_Dialog.md)
系统 / 消息框类
## Signature
```typescript
declare class SYS_MessageBox
```
## Remarks
生成消息提示框
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[showConfirmationMessage(content, title, mainButtonTitle, buttonTitle, callbackFn)](./SYS_MessageBox.md)
</td><td>
</td><td>
显示确认框
</td></tr>
<tr><td>
[showInformationMessage(content, title, buttonTitle)](./SYS_MessageBox.md)
</td><td>
</td><td>
显示消息框
</td></tr>
</tbody></table>
---
## 方法详情
### showconfirmationmessage
# SYS\_MessageBox.showConfirmationMessage() method
> Warning: This API is now obsolete.
>
> 请使用 [SYS\_Dialog.showConfirmationMessage()](./SYS_Dialog.md) 替代
显示确认框
## Signature
```typescript
showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
content
</td><td>
string
</td><td>
消息文本,支持使用 `\n` 换行
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 确认框标题
</td></tr>
<tr><td>
mainButtonTitle
</td><td>
string
</td><td>
_(Optional)_ 主要按钮标题
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 主要按钮标题
</td></tr>
<tr><td>
callbackFn
</td><td>
(mainButtonClicked: boolean) => void
</td><td>
_(Optional)_ 回调函数,如需调用扩展内的函数,请在函数名前加上扩展的唯一 ID,以西文句号 `.` 分隔
</td></tr>
</tbody></table>
## Returns
void
## Remarks
显示一个拥有确认和取消按钮的确认框
### showinformationmessage
# SYS\_MessageBox.showInformationMessage() method
> Warning: This API is now obsolete.
>
> 请使用 [SYS\_Dialog.showInformationMessage()](./SYS_Dialog.md) 替代
显示消息框
## Signature
```typescript
showInformationMessage(content: string, title?: string, buttonTitle?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
content
</td><td>
string
</td><td>
消息文本,支持使用 `\n` 换行
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
_(Optional)_ 消息框标题
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 按钮标题,为空则不显示按钮
</td></tr>
</tbody></table>
## Returns
void
## Remarks
显示一个文字消息提示框
FILE:references/classes/SYS_MessageBus.md
# SYS\_MessageBus class
系统 / 消息总线类
## Signature
```typescript
declare class SYS_MessageBus
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createPrivateMessageBus()](./SYS_MessageBus.md)
</td><td>
</td><td>
创建私有消息总线
</td></tr>
<tr><td>
[publish(topic, message)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:发布消息
</td></tr>
<tr><td>
[publishPublic(topic, message)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:发布消息
</td></tr>
<tr><td>
[pull(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:拉消息
</td></tr>
<tr><td>
[pullAsync(topic)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:拉消息 Promise 版本
</td></tr>
<tr><td>
[pullAsyncPublic(topic)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:拉消息 Promise 版本
</td></tr>
<tr><td>
[pullPublic(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:拉消息
</td></tr>
<tr><td>
[push(topic, message)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:推消息
</td></tr>
<tr><td>
[pushPublic(topic, message)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:推消息
</td></tr>
<tr><td>
[removePrivateMessageBus()](./SYS_MessageBus.md)
</td><td>
</td><td>
移除私有消息总线
</td></tr>
<tr><td>
[rpcCall(topic, message, timeout)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:调用 RPC 服务
</td></tr>
<tr><td>
[rpcCallPublic(topic, message, timeout)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:调用 RPC 服务
</td></tr>
<tr><td>
[rpcService(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:注册 RPC 服务
</td></tr>
<tr><td>
[rpcServicePublic(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:注册 RPC 服务
</td></tr>
<tr><td>
[subscribe(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:订阅消息
</td></tr>
<tr><td>
[subscribeOnce(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
私有消息总线:订阅单次消息
</td></tr>
<tr><td>
[subscribeOncePublic(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:订阅单次消息
</td></tr>
<tr><td>
[subscribePublic(topic, callbackFn)](./SYS_MessageBus.md)
</td><td>
</td><td>
公共消息总线:订阅消息
</td></tr>
</tbody></table>
---
## 方法详情
### createprivatemessagebus
# SYS\_MessageBus.createPrivateMessageBus() method
创建私有消息总线
## Signature
```typescript
createPrivateMessageBus(): void;
```
## Returns
void
## Remarks
一般无需调用该方法,在进行监听或发送消息时会自动创建私有消息总线
### publish
# SYS\_MessageBus.publish() method
私有消息总线:发布消息
## Signature
```typescript
publish(topic: string, message: any): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
消息
</td></tr>
</tbody></table>
## Returns
void
## Remarks
将消息广播给每一个 Subscriber
### publishpublic
# SYS\_MessageBus.publishPublic() method
公共消息总线:发布消息
## Signature
```typescript
publishPublic(topic: string, message: any): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
消息
</td></tr>
</tbody></table>
## Returns
void
## Remarks
将消息广播给每一个 Subscriber
### pull
# SYS\_MessageBus.pull() method
私有消息总线:拉消息
## Signature
```typescript
pull(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
拉到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
## Remarks
每次只能拉一个消息
### pullasync
# SYS\_MessageBus.pullAsync() method
私有消息总线:拉消息 Promise 版本
## Signature
```typescript
pullAsync(topic: string): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
</tbody></table>
## Returns
Promise<any>
拉取到的消息
## Remarks
每次只能拉一个消息,可以使用 `await` 等待消息拉取
### pullasyncpublic
# SYS\_MessageBus.pullAsyncPublic() method
公共消息总线:拉消息 Promise 版本
## Signature
```typescript
pullAsyncPublic(topic: string): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
</tbody></table>
## Returns
Promise<any>
拉取到的消息
## Remarks
每次只能拉一个消息,可以使用 `await` 等待消息拉取
### pullpublic
# SYS\_MessageBus.pullPublic() method
公共消息总线:拉消息
## Signature
```typescript
pullPublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
拉到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
## Remarks
每次只能拉一个消息
### push
# SYS\_MessageBus.push() method
私有消息总线:推消息
## Signature
```typescript
push(topic: string, message: any): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
消息
</td></tr>
</tbody></table>
## Returns
void
## Remarks
每个消息只有一个 Puller 可以收到
### pushpublic
# SYS\_MessageBus.pushPublic() method
公共消息总线:推消息
## Signature
```typescript
pushPublic(topic: string, message: any): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
消息
</td></tr>
</tbody></table>
## Returns
void
## Remarks
每个消息只有一个 Puller 可以收到
### removeprivatemessagebus
# SYS\_MessageBus.removePrivateMessageBus() method
移除私有消息总线
## Signature
```typescript
removePrivateMessageBus(): void;
```
## Returns
void
## Remarks
一般无需调用该方法,除非你知道自己在做什么
### rpccall
# SYS\_MessageBus.rpcCall() method
私有消息总线:调用 RPC 服务
## Signature
```typescript
rpcCall(topic: string, message?: any, timeout?: number): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
_(Optional)_ 消息
</td></tr>
<tr><td>
timeout
</td><td>
number
</td><td>
_(Optional)_ 超时
</td></tr>
</tbody></table>
## Returns
Promise<any>
RPC 服务返回
### rpccallpublic
# SYS\_MessageBus.rpcCallPublic() method
公共消息总线:调用 RPC 服务
## Signature
```typescript
rpcCallPublic(topic: string, message?: any, timeout?: number): Promise<any>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
message
</td><td>
any
</td><td>
_(Optional)_ 消息
</td></tr>
<tr><td>
timeout
</td><td>
number
</td><td>
_(Optional)_ 超时
</td></tr>
</tbody></table>
## Returns
Promise<any>
RPC 服务返回
### rpcservice
# SYS\_MessageBus.rpcService() method
私有消息总线:注册 RPC 服务
## Signature
```typescript
rpcService(topic: string, callbackFn: (...args: Array<any>) => any | Promise<any>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(...args: Array<any>) => any \| Promise<any>
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
void
### rpcservicepublic
# SYS\_MessageBus.rpcServicePublic() method
公共消息总线:注册 RPC 服务
## Signature
```typescript
rpcServicePublic(topic: string, callbackFn: (...args: Array<any>) => any | Promise<any>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(...args: Array<any>) => any \| Promise<any>
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
void
### subscribe
# SYS\_MessageBus.subscribe() method
私有消息总线:订阅消息
## Signature
```typescript
subscribe(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
## Remarks
持久性订阅消息
### subscribeonce
# SYS\_MessageBus.subscribeOnce() method
私有消息总线:订阅单次消息
## Signature
```typescript
subscribeOnce(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
### subscribeoncepublic
# SYS\_MessageBus.subscribeOncePublic() method
公共消息总线:订阅单次消息
## Signature
```typescript
subscribeOncePublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
### subscribepublic
# SYS\_MessageBus.subscribePublic() method
公共消息总线:订阅消息
## Signature
```typescript
subscribePublic(topic: string, callbackFn: (message: any) => void): ISYS_MessageBusTask;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
topic
</td><td>
string
</td><td>
主题
</td></tr>
<tr><td>
callbackFn
</td><td>
(message: any) => void
</td><td>
接收到消息后的回调
</td></tr>
</tbody></table>
## Returns
[ISYS\_MessageBusTask](../interfaces/ISYS_MessageBusTask.md)
消息总线任务
## Remarks
持久性订阅消息
FILE:references/classes/SYS_PanelControl.md
# SYS\_PanelControl class
系统 / 面板控制类
## Signature
```typescript
declare class SYS_PanelControl
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[closeBottomPanel()](./SYS_PanelControl.md)
</td><td>
</td><td>
关闭底部面板
</td></tr>
<tr><td>
[closeLeftPanel()](./SYS_PanelControl.md)
</td><td>
</td><td>
关闭左侧面板
</td></tr>
<tr><td>
[closeRightPanel()](./SYS_PanelControl.md)
</td><td>
</td><td>
关闭右侧面板
</td></tr>
<tr><td>
[isBottomPanelLocked()](./SYS_PanelControl.md)
</td><td>
</td><td>
查询底部面板是否已锁定
</td></tr>
<tr><td>
[isLeftPanelLocked()](./SYS_PanelControl.md)
</td><td>
</td><td>
查询左侧面板是否已锁定
</td></tr>
<tr><td>
[isRightPanelLocked()](./SYS_PanelControl.md)
</td><td>
</td><td>
查询右侧面板是否已锁定
</td></tr>
<tr><td>
[openBottomPanel(tab)](./SYS_PanelControl.md)
</td><td>
</td><td>
打开底部面板
</td></tr>
<tr><td>
[openLeftPanel(tab)](./SYS_PanelControl.md)
</td><td>
</td><td>
打开左侧面板
</td></tr>
<tr><td>
[openRightPanel(tab)](./SYS_PanelControl.md)
</td><td>
</td><td>
打开右侧面板
</td></tr>
<tr><td>
[toggleBottomPanelLockState(state)](./SYS_PanelControl.md)
</td><td>
</td><td>
切换底部面板锁定状态
</td></tr>
<tr><td>
[toggleLeftPanelLockState(state)](./SYS_PanelControl.md)
</td><td>
</td><td>
切换左侧面板锁定状态
</td></tr>
<tr><td>
[toggleRightPanelLockState(state)](./SYS_PanelControl.md)
</td><td>
</td><td>
切换右侧面板锁定状态
</td></tr>
</tbody></table>
---
## 方法详情
### closebottompanel
# SYS\_PanelControl.closeBottomPanel() method
关闭底部面板
## Signature
```typescript
closeBottomPanel(): void;
```
## Returns
void
### closeleftpanel
# SYS\_PanelControl.closeLeftPanel() method
关闭左侧面板
## Signature
```typescript
closeLeftPanel(): void;
```
## Returns
void
### closerightpanel
# SYS\_PanelControl.closeRightPanel() method
关闭右侧面板
## Signature
```typescript
closeRightPanel(): void;
```
## Returns
void
### isbottompanellocked
# SYS\_PanelControl.isBottomPanelLocked() method
查询底部面板是否已锁定
## Signature
```typescript
isBottomPanelLocked(): Promise<boolean>;
```
## Returns
Promise<boolean>
是否已锁定
### isleftpanellocked
# SYS\_PanelControl.isLeftPanelLocked() method
查询左侧面板是否已锁定
## Signature
```typescript
isLeftPanelLocked(): Promise<boolean>;
```
## Returns
Promise<boolean>
是否已锁定
### isrightpanellocked
# SYS\_PanelControl.isRightPanelLocked() method
查询右侧面板是否已锁定
## Signature
```typescript
isRightPanelLocked(): Promise<boolean>;
```
## Returns
Promise<boolean>
是否已锁定
### openbottompanel
# SYS\_PanelControl.openBottomPanel() method
打开底部面板
## Signature
```typescript
openBottomPanel(tab?: ESYS_BottomPanelTab): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tab
</td><td>
[ESYS\_BottomPanelTab](../enums/ESYS_BottomPanelTab.md)
</td><td>
_(Optional)_ 标签页,如若不指定则不切换标签页
</td></tr>
</tbody></table>
## Returns
void
### openleftpanel
# SYS\_PanelControl.openLeftPanel() method
打开左侧面板
## Signature
```typescript
openLeftPanel(tab?: ESYS_LeftPanelTab): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tab
</td><td>
[ESYS\_LeftPanelTab](../enums/ESYS_LeftPanelTab.md)
</td><td>
_(Optional)_ 标签页,如若不指定则不切换标签页
</td></tr>
</tbody></table>
## Returns
void
### openrightpanel
# SYS\_PanelControl.openRightPanel() method
打开右侧面板
## Signature
```typescript
openRightPanel(tab?: ESYS_RightPanelTab): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
tab
</td><td>
[ESYS\_RightPanelTab](../enums/ESYS_RightPanelTab.md)
</td><td>
_(Optional)_ 标签页,如若不指定则不切换标签页
</td></tr>
</tbody></table>
## Returns
void
### togglebottompanellockstate
# SYS\_PanelControl.toggleBottomPanelLockState() method
切换底部面板锁定状态
## Signature
```typescript
toggleBottomPanelLockState(state?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
state
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定,如若不指定则反置当前状态
</td></tr>
</tbody></table>
## Returns
void
### toggleleftpanellockstate
# SYS\_PanelControl.toggleLeftPanelLockState() method
切换左侧面板锁定状态
## Signature
```typescript
toggleLeftPanelLockState(state?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
state
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定,如若不指定则反置当前状态
</td></tr>
</tbody></table>
## Returns
void
### togglerightpanellockstate
# SYS\_PanelControl.toggleRightPanelLockState() method
切换右侧面板锁定状态
## Signature
```typescript
toggleRightPanelLockState(state?: boolean): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
state
</td><td>
boolean
</td><td>
_(Optional)_ 是否锁定,如若不指定则反置当前状态
</td></tr>
</tbody></table>
## Returns
void
FILE:references/classes/SYS_RightClickMenu.md
# SYS\_RightClickMenu class
系统 / 右键菜单类
## Signature
```typescript
declare class SYS_RightClickMenu
```
## Remarks
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[changeMenu(menuId, menuItems)](./SYS_RightClickMenu.md)
</td><td>
</td><td>
**_(BETA)_** 修改右键菜单
</td></tr>
</tbody></table>
---
## 方法详情
### changemenu
# SYS\_RightClickMenu.changeMenu() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
修改右键菜单
## Signature
```typescript
changeMenu(menuId: string, menuItems: Array<ISYS_RightClickMenuItem | null>): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
menuId
</td><td>
string
</td><td>
菜单 ID
</td></tr>
<tr><td>
menuItems
</td><td>
Array<[ISYS\_RightClickMenuItem](../interfaces/ISYS_RightClickMenuItem.md) \| null>
</td><td>
菜单项,`null` 代表分隔符
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
当前仅支持 \*\*底部菜单器件列表项目右击\*\*、\*\*底部菜单符号列表项目右击\*\*、\*\*底部菜单封装列表项目右击\*\*、\*\*底部菜单复用模块列表项目右击\*\* 的右键菜单修改
如若希望重新排序、移除部分菜单项,在 `menuItems` 内只需传入菜单项 ID,其它属性将自动保持不变
如若需要注册新的右键菜单,需要传入完整的 [ISYS\_RightClickMenuItem](../interfaces/ISYS_RightClickMenuItem.md) 数据
本接口将会强制新建的右键菜单的 ID 包含扩展 UUID,例如输入的 `id = 'example'`<!-- -->,将会被自动重写为 `e143d88179874e7f851cc890cd22fc71|example`
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知
FILE:references/classes/SYS_Setting.md
# SYS\_Setting class
系统 / 设置类
## Signature
```typescript
declare class SYS_Setting
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[restoreDefault()](./SYS_Setting.md)
</td><td>
</td><td>
**_(BETA)_** 全局恢复默认设置
</td></tr>
</tbody></table>
---
## 方法详情
### restoredefault
# SYS\_Setting.restoreDefault() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
全局恢复默认设置
## Signature
```typescript
restoreDefault(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
将所有 EDA 设置恢复到默认状态,本操作将会丢失所有设置项,在调用时请特别注意
FILE:references/classes/SYS_ShortcutKey.md
# SYS\_ShortcutKey class
系统 / 快捷键类
## Signature
```typescript
declare class SYS_ShortcutKey
```
## Remarks
注册与管理系统快捷键
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getShortcutKeys(includeSystem)](./SYS_ShortcutKey.md)
</td><td>
</td><td>
**_(BETA)_** 查询快捷键列表
</td></tr>
<tr><td>
[registerShortcutKey(shortcutKey, title, callbackFn, documentType, scene)](./SYS_ShortcutKey.md)
</td><td>
</td><td>
**_(BETA)_** 注册快捷键
</td></tr>
<tr><td>
[unregisterShortcutKey(shortcutKey)](./SYS_ShortcutKey.md)
</td><td>
</td><td>
**_(BETA)_** 反注册快捷键
</td></tr>
</tbody></table>
---
## 方法详情
### getshortcutkeys
# SYS\_ShortcutKey.getShortcutKeys() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
查询快捷键列表
## Signature
```typescript
getShortcutKeys(includeSystem?: boolean): Promise<Array<{
shortcutKey: TSYS_ShortcutKeys;
title: string;
documentType: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>;
scene: Array<ESYS_ShortcutKeyEffectiveEditorScene>;
}>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
includeSystem
</td><td>
boolean
</td><td>
_(Optional)_ 是否包含系统快捷键
</td></tr>
</tbody></table>
## Returns
Promise<Array<{ shortcutKey: [TSYS\_ShortcutKeys](../types/TSYS_ShortcutKeys.md)<!-- -->; title: string; documentType: Array<[ESYS\_ShortcutKeyEffectiveEditorDocumentType](../enums/ESYS_ShortcutKeyEffectiveEditorDocumentType.md)<!-- -->>; scene: Array<[ESYS\_ShortcutKeyEffectiveEditorScene](../enums/ESYS_ShortcutKeyEffectiveEditorScene.md)<!-- -->>; }>>
快捷键列表
### registershortcutkey
# SYS\_ShortcutKey.registerShortcutKey() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
注册快捷键
## Signature
```typescript
registerShortcutKey(shortcutKey: TSYS_ShortcutKeys, title: string, callbackFn: (shortcutKey: TSYS_ShortcutKeys) => void | Promise<void>, documentType?: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>, scene?: Array<ESYS_ShortcutKeyEffectiveEditorScene>): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
shortcutKey
</td><td>
[TSYS\_ShortcutKeys](../types/TSYS_ShortcutKeys.md)
</td><td>
快捷键,数组中包含多个元素则解析为组合快捷键,将按规则排序后存入缓存
</td></tr>
<tr><td>
title
</td><td>
string
</td><td>
快捷键标题,快捷键的友好名称
</td></tr>
<tr><td>
callbackFn
</td><td>
(shortcutKey: [TSYS\_ShortcutKeys](../types/TSYS_ShortcutKeys.md)<!-- -->) => void \| Promise<void>
</td><td>
回调函数
</td></tr>
<tr><td>
documentType
</td><td>
Array<[ESYS\_ShortcutKeyEffectiveEditorDocumentType](../enums/ESYS_ShortcutKeyEffectiveEditorDocumentType.md)<!-- -->>
</td><td>
_(Optional)_
</td></tr>
<tr><td>
scene
</td><td>
Array<[ESYS\_ShortcutKeyEffectiveEditorScene](../enums/ESYS_ShortcutKeyEffectiveEditorScene.md)<!-- -->>
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
注册操作是否成功
### unregistershortcutkey
# SYS\_ShortcutKey.unregisterShortcutKey() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
反注册快捷键
## Signature
```typescript
unregisterShortcutKey(shortcutKey: TSYS_ShortcutKeys): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
shortcutKey
</td><td>
[TSYS\_ShortcutKeys](../types/TSYS_ShortcutKeys.md)
</td><td>
快捷键,不区分传入的排列顺序,将自动排序并查询匹配的快捷键
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
反注册操作是否成功
FILE:references/classes/SYS_Storage.md
# SYS\_Storage class
系统 / 存储类
## Signature
```typescript
declare class SYS_Storage
```
## Remarks
可以进行扩展的用户配置存储、浏览器本地存储的操作接口
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[clearExtensionAllUserConfigs()](./SYS_Storage.md)
</td><td>
</td><td>
清除扩展所有用户配置
</td></tr>
<tr><td>
[deleteExtensionUserConfig(key)](./SYS_Storage.md)
</td><td>
</td><td>
删除扩展用户配置
</td></tr>
<tr><td>
[getExtensionAllUserConfigs()](./SYS_Storage.md)
</td><td>
</td><td>
获取扩展所有用户配置
</td></tr>
<tr><td>
[getExtensionUserConfig(key)](./SYS_Storage.md)
</td><td>
</td><td>
获取扩展用户配置
</td></tr>
<tr><td>
[setExtensionAllUserConfigs(configs)](./SYS_Storage.md)
</td><td>
</td><td>
设置扩展所有用户配置
</td></tr>
<tr><td>
[setExtensionUserConfig(key, value)](./SYS_Storage.md)
</td><td>
</td><td>
设置扩展用户配置
</td></tr>
</tbody></table>
---
## 方法详情
### clearextensionalluserconfigs
# SYS\_Storage.clearExtensionAllUserConfigs() method
清除扩展所有用户配置
## Signature
```typescript
clearExtensionAllUserConfigs(): Promise<boolean>;
```
## Returns
Promise<boolean>
操作是否成功
## Remarks
此举会删除当前扩展的所有用户配置信息,请谨慎操作
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### deleteextensionuserconfig
# SYS\_Storage.deleteExtensionUserConfig() method
删除扩展用户配置
## Signature
```typescript
deleteExtensionUserConfig(key: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
配置项
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### getextensionalluserconfigs
# SYS\_Storage.getExtensionAllUserConfigs() method
获取扩展所有用户配置
## Signature
```typescript
getExtensionAllUserConfigs(): {
[key: string]: any;
};
```
## Returns
\{ \[key: string\]: any; \}
扩展所有用户配置信息
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### getextensionuserconfig
# SYS\_Storage.getExtensionUserConfig() method
获取扩展用户配置
## Signature
```typescript
getExtensionUserConfig(key: string): any | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
配置项
</td></tr>
</tbody></table>
## Returns
any \| undefined
配置项对应的值,不存在将返回 `undefined`
## Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### setextensionalluserconfigs
# SYS\_Storage.setExtensionAllUserConfigs() method
设置扩展所有用户配置
## Signature
```typescript
setExtensionAllUserConfigs(configs: {
[key: string]: any;
}): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
configs
</td><td>
\{ \[key: string\]: any; \}
</td><td>
扩展所有用户配置
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
此举会覆盖当前扩展的所有用户配置信息,请谨慎操作
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
### setextensionuserconfig
# SYS\_Storage.setExtensionUserConfig() method
设置扩展用户配置
## Signature
```typescript
setExtensionUserConfig(key: string, value: any): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
配置项
</td></tr>
<tr><td>
value
</td><td>
any
</td><td>
值
</td></tr>
</tbody></table>
## Returns
Promise<boolean>
操作是否成功
## Remarks
新建扩展用户配置也使用本接口,在设置时如果不存在将会自动新建
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 `throw Error`
FILE:references/classes/SYS_Timer.md
# SYS\_Timer class
系统 / 定时器类
## Signature
```typescript
declare class SYS_Timer
```
## Remarks
设置定时器
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[clearIntervalTimer(id)](./SYS_Timer.md)
</td><td>
</td><td>
清除指定循环定时器
</td></tr>
<tr><td>
[clearTimeoutTimer(id)](./SYS_Timer.md)
</td><td>
</td><td>
清除指定单次定时器
</td></tr>
<tr><td>
[setIntervalTimer(id, timeout, callFn, args)](./SYS_Timer.md)
</td><td>
</td><td>
设置循环定时器
</td></tr>
<tr><td>
[setTimeoutTimer(id, timeout, callFn, args)](./SYS_Timer.md)
</td><td>
</td><td>
设置单次定时器
</td></tr>
</tbody></table>
---
## 方法详情
### clearintervaltimer
# SYS\_Timer.clearIntervalTimer() method
清除指定循环定时器
## Signature
```typescript
clearIntervalTimer(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
定时器 ID
</td></tr>
</tbody></table>
## Returns
boolean
定时器是否清除成功
### cleartimeouttimer
# SYS\_Timer.clearTimeoutTimer() method
清除指定单次定时器
## Signature
```typescript
clearTimeoutTimer(id: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
定时器 ID
</td></tr>
</tbody></table>
## Returns
boolean
定时器是否清除成功
### setintervaltimer
# SYS\_Timer.setIntervalTimer() method
设置循环定时器
## Signature
```typescript
setIntervalTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
定时器 ID,用于定位&删除定时器
</td></tr>
<tr><td>
timeout
</td><td>
number
</td><td>
定时时间,单位 ms
</td></tr>
<tr><td>
callFn
</td><td>
(...args: any) => void
</td><td>
定时调用函数
</td></tr>
<tr><td>
args
</td><td>
any
</td><td>
传给定时调用函数的参数
</td></tr>
</tbody></table>
## Returns
boolean
定时器是否设置成功
## Remarks
如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
### settimeouttimer
# SYS\_Timer.setTimeoutTimer() method
设置单次定时器
## Signature
```typescript
setTimeoutTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
定时器 ID
</td></tr>
<tr><td>
timeout
</td><td>
number
</td><td>
定时时间,单位 ms
</td></tr>
<tr><td>
callFn
</td><td>
(...args: any) => void
</td><td>
定时调用函数
</td></tr>
<tr><td>
args
</td><td>
any
</td><td>
传给定时调用函数的参数
</td></tr>
</tbody></table>
## Returns
boolean
定时器是否设置成功
## Remarks
如果遇到 ID 重复的定时器,则之前设置的定时器将被清除
FILE:references/classes/SYS_ToastMessage.md
# SYS\_ToastMessage class
> Warning: This API is now obsolete.
>
> 即将移除吐司消息类,合并入 [消息通知类](./SYS_Message.md)
系统 / 吐司消息类
## Signature
```typescript
declare class SYS_ToastMessage
```
## Remarks
在屏幕的边缘弹出简短的消息提醒,会在一定时间后自动消除
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[showMessage(message, messageType, timer, bottomPanel, buttonTitle, buttonCallbackFn)](./SYS_ToastMessage.md)
</td><td>
</td><td>
显示吐司消息
</td></tr>
</tbody></table>
---
## 方法详情
### showmessage
# SYS\_ToastMessage.showMessage() method
> Warning: This API is now obsolete.
>
> 请使用 [SYS\_Message.showToastMessage()](./SYS_Message.md) 方法替代
显示吐司消息
## Signature
```typescript
showMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
message
</td><td>
string
</td><td>
消息内容
</td></tr>
<tr><td>
messageType
</td><td>
[ESYS\_ToastMessageType](../enums/ESYS_ToastMessageType.md)
</td><td>
_(Optional)_ 消息类型
</td></tr>
<tr><td>
timer
</td><td>
number
</td><td>
_(Optional)_ 自动关闭倒计时秒数,`0` 为不自动关闭
</td></tr>
<tr><td>
bottomPanel
</td><td>
[ESYS\_BottomPanelTab](../enums/ESYS_BottomPanelTab.md)
</td><td>
_(Optional)_ 展开底部信息面板
</td></tr>
<tr><td>
buttonTitle
</td><td>
string
</td><td>
_(Optional)_ 回调按钮标题
</td></tr>
<tr><td>
buttonCallbackFn
</td><td>
string
</td><td>
_(Optional)_ 回调函数内容,字符串形式,会被自动解析并执行
</td></tr>
</tbody></table>
## Returns
void
FILE:references/classes/SYS_Tool.md
# SYS\_Tool class
系统 / 工具类
## Signature
```typescript
declare class SYS_Tool
```
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[netlistComparison(netlist1, netlist2)](./SYS_Tool.md)
</td><td>
</td><td>
**_(BETA)_** 网表对比
</td></tr>
</tbody></table>
---
## 方法详情
### netlistcomparison
# SYS\_Tool.netlistComparison() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
网表对比
## Signature
```typescript
netlistComparison(netlist1: string | {
projectUuid: string;
documentUuid: string;
} | File, netlist2: string | {
projectUuid: string;
documentUuid: string;
} | File): Promise<Array<{
type: 'Net' | 'Component';
object: string;
netlist1Name: Array<string>;
netlist2Name: Array<string>;
}>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
netlist1
</td><td>
string \| { projectUuid: string; documentUuid: string; } \| File
</td><td>
网表 1,可以为:①当前工程内的原理图、PCB 的 UUID;②其它工程的工程 UUID 和原理图、PCB UUID;③原理图、PCB 文件数据
</td></tr>
<tr><td>
netlist2
</td><td>
string \| { projectUuid: string; documentUuid: string; } \| File
</td><td>
网表 2,可以为:①当前工程内的原理图、PCB 的 UUID;②其它工程的工程 UUID 和原理图、PCB UUID;③原理图、PCB 文件数据
</td></tr>
</tbody></table>
## Returns
Promise<Array<{ type: 'Net' \| 'Component'; object: string; netlist1Name: Array<string>; netlist2Name: Array<string>; }>>
网表对比结果
FILE:references/classes/SYS_Unit.md
# SYS\_Unit class
系统 / 单位类
## Signature
```typescript
declare class SYS_Unit
```
## Remarks
控制系统数据单位与单位转换基础函数,当前原理图数据单位跨度等效为 `10mil` 或 `0.01inch`<!-- -->,PCB 数据单位跨度等效为 `mil`
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getFrontendDataUnit()](./SYS_Unit.md)
</td><td>
</td><td>
**_(BETA)_** 获取 EDA 前端数据单位跨度
</td></tr>
<tr><td>
[inchToMil(inch, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:英寸到密尔
</td></tr>
<tr><td>
[inchToMm(inch, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:英寸到毫米
</td></tr>
<tr><td>
[milToInch(mil, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:密尔到英寸
</td></tr>
<tr><td>
[milToMm(mil, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:密尔到毫米
</td></tr>
<tr><td>
[mmToInch(mm, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:毫米到英寸
</td></tr>
<tr><td>
[mmToMil(mm, numberOfDecimals)](./SYS_Unit.md)
</td><td>
</td><td>
单位转换:毫米到密尔
</td></tr>
</tbody></table>
---
## 方法详情
### getfrontenddataunit
# SYS\_Unit.getFrontendDataUnit() method
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取 EDA 前端数据单位跨度
## Signature
```typescript
getFrontendDataUnit(): Promise<ESYS_Unit | undefined>;
```
## Returns
Promise<[ESYS\_Unit](../enums/ESYS_Unit.md) \| undefined>
单位
## Remarks
此处指的是前端用户可以切换的单位,需要同时兼容原理图和 PCB 画布
### inchtomil
# SYS\_Unit.inchToMil() method
单位转换:英寸到密尔
## Signature
```typescript
inchToMil(inch: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
inch
</td><td>
number
</td><td>
输入英寸数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出密尔数
### inchtomm
# SYS\_Unit.inchToMm() method
单位转换:英寸到毫米
## Signature
```typescript
inchToMm(inch: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
inch
</td><td>
number
</td><td>
输入英寸数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出毫米数
### miltoinch
# SYS\_Unit.milToInch() method
单位转换:密尔到英寸
## Signature
```typescript
milToInch(mil: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mil
</td><td>
number
</td><td>
输入密尔数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出英寸数
### miltomm
# SYS\_Unit.milToMm() method
单位转换:密尔到毫米
## Signature
```typescript
milToMm(mil: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mil
</td><td>
number
</td><td>
输入密尔数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出毫米数
### mmtoinch
# SYS\_Unit.mmToInch() method
单位转换:毫米到英寸
## Signature
```typescript
mmToInch(mm: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mm
</td><td>
number
</td><td>
输入毫米数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出英寸数
### mmtomil
# SYS\_Unit.mmToMil() method
单位转换:毫米到密尔
## Signature
```typescript
mmToMil(mm: number, numberOfDecimals?: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
mm
</td><td>
number
</td><td>
输入毫米数
</td></tr>
<tr><td>
numberOfDecimals
</td><td>
number
</td><td>
_(Optional)_ 保留小数位数,默认为 `4`
</td></tr>
</tbody></table>
## Returns
number
输出密尔数
FILE:references/classes/SYS_WebSocket.md
# SYS\_WebSocket class
系统 / WebSocket 类
## Signature
```typescript
declare class SYS_WebSocket
```
## Remarks
与 WebSocket 服务器交互
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[close(id, code, reason, extensionUuid)](./SYS_WebSocket.md)
</td><td>
</td><td>
关闭 WebSocket 连接
</td></tr>
<tr><td>
[register(id, serviceUri, receiveMessageCallFn, connectedCallFn, protocols)](./SYS_WebSocket.md)
</td><td>
</td><td>
注册 WebSocket 连接
</td></tr>
<tr><td>
[send(id, data, extensionUuid)](./SYS_WebSocket.md)
</td><td>
</td><td>
向 WebSocket 服务器发送数据
</td></tr>
</tbody></table>
---
## 方法详情
### close
# SYS\_WebSocket.close() method
关闭 WebSocket 连接
## Signature
```typescript
close(id: string, code?: number, reason?: string, extensionUuid?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
自定义的 WebSocket ID
</td></tr>
<tr><td>
code
</td><td>
number
</td><td>
_(Optional)_ 数字状态码,对应 [WebSocket.CloseEvent](https://developer.mozilla.org/docs/Web/API/CloseEvent/code) 内允许的状态码
</td></tr>
<tr><td>
reason
</td><td>
string
</td><td>
_(Optional)_ 一个人类可读的字符串,解释连接关闭的原因
</td></tr>
<tr><td>
extensionUuid
</td><td>
string
</td><td>
_(Optional)_ 扩展 UUID,一般不需要指定,仅当需要操作其它扩展建立的 WebSocket 连接时才需要指定为其它扩展的 UUID
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### register
# SYS\_WebSocket.register() method
注册 WebSocket 连接
## Signature
```typescript
register(id: string, serviceUri: string, receiveMessageCallFn?: (event: MessageEvent<any>) => void | Promise<void>, connectedCallFn?: () => void | Promise<void>, protocols?: string | Array<string>): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
自定义 WebSocket ID
</td></tr>
<tr><td>
serviceUri
</td><td>
string
</td><td>
WebSocket 服务地址
</td></tr>
<tr><td>
receiveMessageCallFn
</td><td>
(event: MessageEvent<any>) => void \| Promise<void>
</td><td>
_(Optional)_ 接收到消息时的回调函数
</td></tr>
<tr><td>
connectedCallFn
</td><td>
() => void \| Promise<void>
</td><td>
_(Optional)_ 连接建立时的回调函数
</td></tr>
<tr><td>
protocols
</td><td>
string \| Array<string>
</td><td>
_(Optional)_ 子协议
</td></tr>
</tbody></table>
## Returns
void
## Remarks
可以用来执行前检测 WebSocket 连接是否正常,但需要注意 \*\*不要尝试相同 ID 不同参数的连接\*\*,这会造成混乱: 如果存在指定 ID 且处于活跃状态中的 WebSocket 连接,那么其余参数的变更将不会被应用
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
### send
# SYS\_WebSocket.send() method
向 WebSocket 服务器发送数据
## Signature
```typescript
send(id: string, data: string | ArrayBuffer | Blob | ArrayBufferView, extensionUuid?: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
string
</td><td>
自定义的 WebSocket ID
</td></tr>
<tr><td>
data
</td><td>
string \| ArrayBuffer \| Blob \| ArrayBufferView
</td><td>
发送的数据
</td></tr>
<tr><td>
extensionUuid
</td><td>
string
</td><td>
_(Optional)_ 扩展 UUID,一般不需要指定,仅当需要操作其它扩展建立的 WebSocket 连接时才需要指定为其它扩展的 UUID
</td></tr>
</tbody></table>
## Returns
void
## Remarks
注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 `throw Error`
FILE:references/classes/SYS_Window.md
# SYS\_Window class
系统 / 窗口类
## Signature
```typescript
declare class SYS_Window
```
## Remarks
为了保证安全性,仅提供有限的窗口跳转与监听支持,更多操作请使用内联框架窗口 [SYS\_IFrame](./SYS_IFrame.md)
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addEventListener(type, listener, options)](./SYS_Window.md)
</td><td>
</td><td>
新增事件监听
</td></tr>
<tr><td>
[getCurrentTheme()](./SYS_Window.md)
</td><td>
</td><td>
获取当前主题
</td></tr>
<tr><td>
[getUrlAnchor()](./SYS_Window.md)
</td><td>
</td><td>
获取 URL 锚点
</td></tr>
<tr><td>
[getUrlParam(key)](./SYS_Window.md)
</td><td>
</td><td>
获取 URL 参数
</td></tr>
<tr><td>
[open(url, target)](./SYS_Window.md)
</td><td>
</td><td>
打开资源窗口
</td></tr>
<tr><td>
[openUI(uiName, args)](./SYS_Window.md)
</td><td>
</td><td>
打开 UI 窗口
</td></tr>
<tr><td>
[removeEventListener(removableObject)](./SYS_Window.md)
</td><td>
</td><td>
移除事件监听
</td></tr>
<tr><td>
[urlPushState(url)](./SYS_Window.md)
</td><td>
</td><td>
追加新的 URL 历史记录栈信息
</td></tr>
<tr><td>
[urlReplaceState(url)](./SYS_Window.md)
</td><td>
</td><td>
修改当前的 URL 历史记录栈信息
</td></tr>
</tbody></table>
---
## 方法详情
### addeventlistener
# SYS\_Window.addEventListener() method
新增事件监听
## Signature
```typescript
addEventListener(type: ESYS_WindowEventType, listener: (ev: any) => any, options?: {
capture?: boolean;
once?: boolean;
passive?: boolean;
signal?: AbortSignal;
}): ISYS_WindowEventListenerRemovableObject | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[ESYS\_WindowEventType](../enums/ESYS_WindowEventType.md)
</td><td>
事件类型,当前支持 `blur` `focus`
</td></tr>
<tr><td>
listener
</td><td>
(ev: any) => any
</td><td>
事件监听回调
</td></tr>
<tr><td>
options
</td><td>
\{ capture?: boolean; once?: boolean; passive?: boolean; signal?: AbortSignal; \}
</td><td>
_(Optional)_ 可选参数
</td></tr>
</tbody></table>
## Returns
[ISYS\_WindowEventListenerRemovableObject](../interfaces/ISYS_WindowEventListenerRemovableObject.md) \| undefined
事件监听方法,用于移除事件监听,如若为 `undefined` 则表示创建事件监听失败
### getcurrenttheme
# SYS\_Window.getCurrentTheme() method
获取当前主题
## Signature
```typescript
getCurrentTheme(): Promise<ESYS_Theme>;
```
## Returns
Promise<[ESYS\_Theme](../enums/ESYS_Theme.md)<!-- -->>
当前主题
## Remarks
获取当前 EDA 主题,\*\*浅色\*\* 或 \*\*深色\*\*
### geturlanchor
# SYS\_Window.getUrlAnchor() method
获取 URL 锚点
## Signature
```typescript
getUrlAnchor(): string;
```
## Returns
string
URL 锚点值
### geturlparam
# SYS\_Window.getUrlParam() method
获取 URL 参数
## Signature
```typescript
getUrlParam(key: string): string | null;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
key
</td><td>
string
</td><td>
参数名
</td></tr>
</tbody></table>
## Returns
string \| null
参数值
### open
# SYS\_Window.open() method
打开资源窗口
## Signature
```typescript
open(url: string, target?: ESYS_WindowOpenTarget): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
url
</td><td>
string
</td><td>
欲加载资源的 URL 或路径
</td></tr>
<tr><td>
target
</td><td>
[ESYS\_WindowOpenTarget](../enums/ESYS_WindowOpenTarget.md)
</td><td>
_(Optional)_ 上下文目标
</td></tr>
</tbody></table>
## Returns
void
### openui
# SYS\_Window.openUI() method
打开 UI 窗口
## Signature
```typescript
openUI(uiName: string, args?: {
[key: string]: any;
}): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
uiName
</td><td>
string
</td><td>
UI 名称
</td></tr>
<tr><td>
args
</td><td>
\{ \[key: string\]: any; \}
</td><td>
_(Optional)_ 可选参数对象
</td></tr>
</tbody></table>
## Returns
Promise<void>
## Remarks
非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知
### removeeventlistener
# SYS\_Window.removeEventListener() method
移除事件监听
## Signature
```typescript
removeEventListener(removableObject: ISYS_WindowEventListenerRemovableObject): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
removableObject
</td><td>
[ISYS\_WindowEventListenerRemovableObject](../interfaces/ISYS_WindowEventListenerRemovableObject.md)
</td><td>
窗口事件监听可移除对象
</td></tr>
</tbody></table>
## Returns
void
### urlpushstate
# SYS\_Window.urlPushState() method
追加新的 URL 历史记录栈信息
## Signature
```typescript
urlPushState(url: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
url
</td><td>
string
</td><td>
URL
</td></tr>
</tbody></table>
## Returns
void
### urlreplacestate
# SYS\_Window.urlReplaceState() method
修改当前的 URL 历史记录栈信息
## Signature
```typescript
urlReplaceState(url: string): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
url
</td><td>
string
</td><td>
URL
</td></tr>
</tbody></table>
## Returns
void
FILE:references/enums/EDMT_EditorDocumentType.md
# EDMT\_EditorDocumentType enum
编辑器文档类型
## Signature
```typescript
declare enum EDMT_EditorDocumentType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLANK
</td><td>
`0`
</td><td>
空白页
</td></tr>
<tr><td>
FOOTPRINT
</td><td>
`4`
</td><td>
封装
</td></tr>
<tr><td>
HOME
</td><td>
`-1`
</td><td>
开始页
</td></tr>
<tr><td>
PANEL
</td><td>
`26`
</td><td>
面板
</td></tr>
<tr><td>
PANEL\_3D\_PREVIEW
</td><td>
`27`
</td><td>
面板 3D 预览
</td></tr>
<tr><td>
PANEL\_LIBRARY
</td><td>
`29`
</td><td>
面板库
</td></tr>
<tr><td>
PCB
</td><td>
`3`
</td><td>
PCB
</td></tr>
<tr><td>
PCB\_2D\_PREVIEW
</td><td>
`12`
</td><td>
PCB 2D 预览
</td></tr>
<tr><td>
PCB\_3D\_PREVIEW
</td><td>
`15`
</td><td>
PCB 3D 预览
</td></tr>
<tr><td>
SCHEMATIC\_PAGE
</td><td>
`1`
</td><td>
原理图图页
</td></tr>
<tr><td>
SYMBOL\_CBB
</td><td>
`17`
</td><td>
复用模块符号
</td></tr>
<tr><td>
SYMBOL\_COMPONENT
</td><td>
`2`
</td><td>
元件符号
</td></tr>
<tr><td>
SYMBOL\_DRAWING
</td><td>
`20`
</td><td>
图纸符号
</td></tr>
<tr><td>
SYMBOL\_NET\_FLAG
</td><td>
`18`
</td><td>
网络标识符号
</td></tr>
<tr><td>
SYMBOL\_NET\_PORT
</td><td>
`19`
</td><td>
网络端口符号
</td></tr>
<tr><td>
SYMBOL\_NON\_ELECTRICAL
</td><td>
`21`
</td><td>
无电气符号
</td></tr>
<tr><td>
SYMBOL\_SHORT\_CIRCUIT\_FLAG
</td><td>
`22`
</td><td>
短接标识符号
</td></tr>
</tbody></table>
FILE:references/enums/EDMT_EditorSplitScreenDirection.md
# EDMT\_EditorSplitScreenDirection enum
编辑器分屏方向
## Signature
```typescript
declare enum EDMT_EditorSplitScreenDirection
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
HORIZONTAL
</td><td>
`"horizontal"`
</td><td>
水平
</td></tr>
<tr><td>
VERTICAL
</td><td>
`"vertical"`
</td><td>
垂直
</td></tr>
</tbody></table>
FILE:references/enums/EDMT_IndicatorMarkerType.md
# EDMT\_IndicatorMarkerType enum
指示标记类型
## Signature
```typescript
declare enum EDMT_IndicatorMarkerType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ARC
</td><td>
`"arc"`
</td><td>
圆弧
</td></tr>
<tr><td>
CIRCLE
</td><td>
`"circle"`
</td><td>
圆形
</td></tr>
<tr><td>
LINE
</td><td>
`"line"`
</td><td>
线段
</td></tr>
<tr><td>
POINT
</td><td>
`"point"`
</td><td>
点
</td></tr>
<tr><td>
RECTANGLE
</td><td>
`"rectangle"`
</td><td>
矩形
</td></tr>
</tbody></table>
FILE:references/enums/EDMT_ItemType.md
# EDMT\_ItemType enum
文档树项目类型
## Signature
```typescript
declare enum EDMT_ItemType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BOARD
</td><td>
`"Board"`
</td><td>
板子
</td></tr>
<tr><td>
CBB\_PCB
</td><td>
`"CBB PCB"`
</td><td>
复用模块 PCB
</td></tr>
<tr><td>
CBB\_PROJECT
</td><td>
`"CBB Project"`
</td><td>
复用模块工程
</td></tr>
<tr><td>
CBB\_SCHEMATIC
</td><td>
`"CBB Schematic"`
</td><td>
复用模块原理图
</td></tr>
<tr><td>
FOLDER
</td><td>
`"Folder"`
</td><td>
文件夹
</td></tr>
<tr><td>
PANEL
</td><td>
`"Panel"`
</td><td>
面板
</td></tr>
<tr><td>
PCB
</td><td>
`"PCB"`
</td><td>
PCB
</td></tr>
<tr><td>
PROJECT
</td><td>
`"Project"`
</td><td>
工程
</td></tr>
<tr><td>
SCHEMATIC
</td><td>
`"Schematic"`
</td><td>
原理图
</td></tr>
<tr><td>
SCHEMATIC\_PAGE
</td><td>
`"Schematic Page"`
</td><td>
原理图图页
</td></tr>
<tr><td>
TEAM
</td><td>
`"Team"`
</td><td>
团队
</td></tr>
<tr><td>
WORKSPACE
</td><td>
`"Workspace"`
</td><td>
工作区
</td></tr>
</tbody></table>
FILE:references/enums/EDMT_ProjectCollaborationMode.md
# EDMT\_ProjectCollaborationMode enum
工程协作模式
## Signature
```typescript
declare enum EDMT_ProjectCollaborationMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FREE
</td><td>
`1`
</td><td>
自由
</td></tr>
<tr><td>
STRICT
</td><td>
`3`
</td><td>
严格
</td></tr>
</tbody></table>
FILE:references/enums/ELIB_DeviceJlcLibraryCategory.md
# ELIB\_DeviceJlcLibraryCategory enum
嘉立创贴片库类别
## Signature
```typescript
declare enum ELIB_DeviceJlcLibraryCategory
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
EXTEND
</td><td>
`"extend"`
</td><td>
扩展库
</td></tr>
<tr><td>
STANDARD
</td><td>
`"standard"`
</td><td>
基础库
</td></tr>
</tbody></table>
FILE:references/enums/ELIB_LibraryType.md
# ELIB\_LibraryType enum
综合库库类型
## Signature
```typescript
declare enum ELIB_LibraryType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CBB
</td><td>
`"1"`
</td><td>
复用模块
</td></tr>
<tr><td>
DEVICE
</td><td>
`"3"`
</td><td>
器件
</td></tr>
<tr><td>
FOOTPRINT
</td><td>
`"4"`
</td><td>
封装
</td></tr>
<tr><td>
MODEL
</td><td>
`"5"`
</td><td>
3D 模型
</td></tr>
<tr><td>
PANEL\_LIBRARY
</td><td>
`"29"`
</td><td>
面板库
</td></tr>
<tr><td>
SYMBOL
</td><td>
`"2"`
</td><td>
符号
</td></tr>
</tbody></table>
FILE:references/enums/ELIB_PreviewType.md
# ELIB\_PreviewType enum
预览视图类型
## Signature
```typescript
declare enum ELIB_PreviewType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FOOTPRINT
</td><td>
`"F"`
</td><td>
封装预览
</td></tr>
<tr><td>
MODEL\_3D
</td><td>
`"3D"`
</td><td>
3D 预览
</td></tr>
<tr><td>
PRODUCT
</td><td>
`"P"`
</td><td>
产品实物预览
</td></tr>
<tr><td>
SYMBOL
</td><td>
`"S"`
</td><td>
符号预览
</td></tr>
</tbody></table>
FILE:references/enums/ELIB_SymbolType.md
# ELIB\_SymbolType enum
符号类型
## Signature
```typescript
declare enum ELIB_SymbolType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CBB\_SYMBOL
</td><td>
`17`
</td><td>
复用模块符号
</td></tr>
<tr><td>
COMPONENT
</td><td>
`2`
</td><td>
元件符号
</td></tr>
<tr><td>
DIFFERENTIAL\_PAIRS\_FLAG
</td><td>
`31`
</td><td>
差分对标识
</td></tr>
<tr><td>
DRAWING
</td><td>
`20`
</td><td>
图纸
</td></tr>
<tr><td>
NET\_FLAG
</td><td>
`18`
</td><td>
网络标识
</td></tr>
<tr><td>
NET\_PORT
</td><td>
`19`
</td><td>
网络端口
</td></tr>
<tr><td>
NON\_ELECTRICAL
</td><td>
`21`
</td><td>
无电气
</td></tr>
<tr><td>
OFF\_PAGE\_CONNECTOR
</td><td>
`25`
</td><td>
跨页连接标识
</td></tr>
<tr><td>
SHORT\_CIRCUIT\_FLAG
</td><td>
`22`
</td><td>
短接标识
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md
# EPCB\_DocumentRatlineCalculatingActiveStatus enum
文档飞线计算功能状态
## Signature
```typescript
declare enum EPCB_DocumentRatlineCalculatingActiveStatus
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ACTIVE
</td><td>
`"active"`
</td><td>
启用
</td></tr>
<tr><td>
INACTIVE
</td><td>
`"inactive"`
</td><td>
停用
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_InactiveLayerDisplayMode.md
# EPCB\_InactiveLayerDisplayMode enum
非激活层展示模式
## Signature
```typescript
declare enum EPCB_InactiveLayerDisplayMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
HIDE
</td><td>
`2`
</td><td>
隐藏
</td></tr>
<tr><td>
NORMAL\_BRIGHTNESS
</td><td>
`0`
</td><td>
正常亮度
</td></tr>
<tr><td>
TURN\_GRAY
</td><td>
`1`
</td><td>
置灰
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_LayerColorConfiguration.md
# EPCB\_LayerColorConfiguration enum
图层颜色配置
## Signature
```typescript
declare enum EPCB_LayerColorConfiguration
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ALTIUM\_DESIGNER
</td><td>
`2`
</td><td>
Altium Designer
</td></tr>
<tr><td>
EASYEDA
</td><td>
`1`
</td><td>
EasyEDA
</td></tr>
<tr><td>
JLCEDA
</td><td>
`1`
</td><td>
嘉立创 EDA
</td></tr>
<tr><td>
KICAD
</td><td>
`4`
</td><td>
KiCAD
</td></tr>
<tr><td>
PADS
</td><td>
`3`
</td><td>
PADS
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_LayerId.md
# EPCB\_LayerId enum
图层 ID
## Signature
```typescript
declare enum EPCB_LayerId
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BOARD\_OUTLINE
</td><td>
`11`
</td><td>
板框层
</td></tr>
<tr><td>
BOTTOM
</td><td>
`2`
</td><td>
底层
</td></tr>
<tr><td>
BOTTOM\_ASSEMBLY
</td><td>
`10`
</td><td>
底层装配层
</td></tr>
<tr><td>
BOTTOM\_PASTE\_MASK
</td><td>
`8`
</td><td>
底层锡膏(助焊)层
</td></tr>
<tr><td>
BOTTOM\_SILKSCREEN
</td><td>
`4`
</td><td>
底层丝印层
</td></tr>
<tr><td>
BOTTOM\_SOLDER\_MASK
</td><td>
`6`
</td><td>
底层阻焊层
</td></tr>
<tr><td>
BOTTOM\_STIFFENER
</td><td>
`59`
</td><td>
底层 FPC 补强层
</td></tr>
<tr><td>
COMPONENT\_MARKING
</td><td>
`49`
</td><td>
元件标识层
</td></tr>
<tr><td>
COMPONENT\_MODEL
</td><td>
`52`
</td><td>
元件模型层
</td></tr>
<tr><td>
COMPONENT\_SHAPE
</td><td>
`48`
</td><td>
元件外形层
</td></tr>
<tr><td>
CUSTOM\_1
</td><td>
`71`
</td><td>
自定义层 1
</td></tr>
<tr><td>
CUSTOM\_10
</td><td>
`80`
</td><td>
自定义层 10
</td></tr>
<tr><td>
CUSTOM\_11
</td><td>
`81`
</td><td>
自定义层 11
</td></tr>
<tr><td>
CUSTOM\_12
</td><td>
`82`
</td><td>
自定义层 12
</td></tr>
<tr><td>
CUSTOM\_13
</td><td>
`83`
</td><td>
自定义层 13
</td></tr>
<tr><td>
CUSTOM\_14
</td><td>
`84`
</td><td>
自定义层 14
</td></tr>
<tr><td>
CUSTOM\_15
</td><td>
`85`
</td><td>
自定义层 15
</td></tr>
<tr><td>
CUSTOM\_16
</td><td>
`86`
</td><td>
自定义层 16
</td></tr>
<tr><td>
CUSTOM\_17
</td><td>
`87`
</td><td>
自定义层 17
</td></tr>
<tr><td>
CUSTOM\_18
</td><td>
`88`
</td><td>
自定义层 18
</td></tr>
<tr><td>
CUSTOM\_19
</td><td>
`89`
</td><td>
自定义层 19
</td></tr>
<tr><td>
CUSTOM\_2
</td><td>
`72`
</td><td>
自定义层 2
</td></tr>
<tr><td>
CUSTOM\_20
</td><td>
`90`
</td><td>
自定义层 20
</td></tr>
<tr><td>
CUSTOM\_21
</td><td>
`91`
</td><td>
自定义层 21
</td></tr>
<tr><td>
CUSTOM\_22
</td><td>
`92`
</td><td>
自定义层 22
</td></tr>
<tr><td>
CUSTOM\_23
</td><td>
`93`
</td><td>
自定义层 23
</td></tr>
<tr><td>
CUSTOM\_24
</td><td>
`94`
</td><td>
自定义层 24
</td></tr>
<tr><td>
CUSTOM\_25
</td><td>
`95`
</td><td>
自定义层 25
</td></tr>
<tr><td>
CUSTOM\_26
</td><td>
`96`
</td><td>
自定义层 26
</td></tr>
<tr><td>
CUSTOM\_27
</td><td>
`97`
</td><td>
自定义层 27
</td></tr>
<tr><td>
CUSTOM\_28
</td><td>
`98`
</td><td>
自定义层 28
</td></tr>
<tr><td>
CUSTOM\_29
</td><td>
`99`
</td><td>
自定义层 29
</td></tr>
<tr><td>
CUSTOM\_3
</td><td>
`73`
</td><td>
自定义层 3
</td></tr>
<tr><td>
CUSTOM\_30
</td><td>
`100`
</td><td>
自定义层 30
</td></tr>
<tr><td>
CUSTOM\_4
</td><td>
`74`
</td><td>
自定义层 4
</td></tr>
<tr><td>
CUSTOM\_5
</td><td>
`75`
</td><td>
自定义层 5
</td></tr>
<tr><td>
CUSTOM\_6
</td><td>
`76`
</td><td>
自定义层 6
</td></tr>
<tr><td>
CUSTOM\_7
</td><td>
`77`
</td><td>
自定义层 7
</td></tr>
<tr><td>
CUSTOM\_8
</td><td>
`78`
</td><td>
自定义层 8
</td></tr>
<tr><td>
CUSTOM\_9
</td><td>
`79`
</td><td>
自定义层 9
</td></tr>
<tr><td>
DOCUMENT
</td><td>
`13`
</td><td>
文档层
</td></tr>
<tr><td>
DRILL\_DRAWING
</td><td>
`56`
</td><td>
钻孔图层
</td></tr>
<tr><td>
HOLE
</td><td>
`47`
</td><td>
孔层(焊盘、过孔的内孔)
</td></tr>
<tr><td>
INNER\_1
</td><td>
`15`
</td><td>
内层 1
</td></tr>
<tr><td>
INNER\_10
</td><td>
`24`
</td><td>
内层 10
</td></tr>
<tr><td>
INNER\_11
</td><td>
`25`
</td><td>
内层 11
</td></tr>
<tr><td>
INNER\_12
</td><td>
`26`
</td><td>
内层 12
</td></tr>
<tr><td>
INNER\_13
</td><td>
`27`
</td><td>
内层 13
</td></tr>
<tr><td>
INNER\_14
</td><td>
`28`
</td><td>
内层 14
</td></tr>
<tr><td>
INNER\_15
</td><td>
`29`
</td><td>
内层 15
</td></tr>
<tr><td>
INNER\_16
</td><td>
`30`
</td><td>
内层 16
</td></tr>
<tr><td>
INNER\_17
</td><td>
`31`
</td><td>
内层 17
</td></tr>
<tr><td>
INNER\_18
</td><td>
`32`
</td><td>
内层 18
</td></tr>
<tr><td>
INNER\_19
</td><td>
`33`
</td><td>
内层 19
</td></tr>
<tr><td>
INNER\_2
</td><td>
`16`
</td><td>
内层 2
</td></tr>
<tr><td>
INNER\_20
</td><td>
`34`
</td><td>
内层 20
</td></tr>
<tr><td>
INNER\_21
</td><td>
`35`
</td><td>
内层 21
</td></tr>
<tr><td>
INNER\_22
</td><td>
`36`
</td><td>
内层 22
</td></tr>
<tr><td>
INNER\_23
</td><td>
`37`
</td><td>
内层 23
</td></tr>
<tr><td>
INNER\_24
</td><td>
`38`
</td><td>
内层 24
</td></tr>
<tr><td>
INNER\_25
</td><td>
`39`
</td><td>
内层 25
</td></tr>
<tr><td>
INNER\_26
</td><td>
`40`
</td><td>
内层 26
</td></tr>
<tr><td>
INNER\_27
</td><td>
`41`
</td><td>
内层 27
</td></tr>
<tr><td>
INNER\_28
</td><td>
`42`
</td><td>
内层 28
</td></tr>
<tr><td>
INNER\_29
</td><td>
`43`
</td><td>
内层 29
</td></tr>
<tr><td>
INNER\_3
</td><td>
`17`
</td><td>
内层 3
</td></tr>
<tr><td>
INNER\_30
</td><td>
`44`
</td><td>
内层 30
</td></tr>
<tr><td>
INNER\_4
</td><td>
`18`
</td><td>
内层 4
</td></tr>
<tr><td>
INNER\_5
</td><td>
`19`
</td><td>
内层 5
</td></tr>
<tr><td>
INNER\_6
</td><td>
`20`
</td><td>
内层 6
</td></tr>
<tr><td>
INNER\_7
</td><td>
`21`
</td><td>
内层 7
</td></tr>
<tr><td>
INNER\_8
</td><td>
`22`
</td><td>
内层 8
</td></tr>
<tr><td>
INNER\_9
</td><td>
`23`
</td><td>
内层 9
</td></tr>
<tr><td>
MECHANICAL
</td><td>
`14`
</td><td>
机械层
</td></tr>
<tr><td>
MULTI
</td><td>
`12`
</td><td>
多层
</td></tr>
<tr><td>
PIN\_FLOATING
</td><td>
`51`
</td><td>
引脚悬空层
</td></tr>
<tr><td>
PIN\_SOLDERING
</td><td>
`50`
</td><td>
引脚焊接层
</td></tr>
<tr><td>
RATLINE
</td><td>
`57`
</td><td>
飞线层
</td></tr>
<tr><td>
SHELL\_3D\_BOTTOM
</td><td>
`55`
</td><td>
3D 外壳底层
</td></tr>
<tr><td>
SHELL\_3D\_OUTLINE
</td><td>
`53`
</td><td>
3D 外壳边框层
</td></tr>
<tr><td>
SHELL\_3D\_TOP
</td><td>
`54`
</td><td>
3D 外壳顶层
</td></tr>
<tr><td>
SUBSTRATE\_1
</td><td>
`101`
</td><td>
夹层(介电基板)1
</td></tr>
<tr><td>
TOP
</td><td>
`1`
</td><td>
顶层
</td></tr>
<tr><td>
TOP\_ASSEMBLY
</td><td>
`9`
</td><td>
顶层装配层
</td></tr>
<tr><td>
TOP\_PASTE\_MASK
</td><td>
`7`
</td><td>
顶层锡膏(助焊)层
</td></tr>
<tr><td>
TOP\_SILKSCREEN
</td><td>
`3`
</td><td>
顶层丝印层
</td></tr>
<tr><td>
TOP\_SOLDER\_MASK
</td><td>
`5`
</td><td>
顶层阻焊层
</td></tr>
<tr><td>
TOP\_STIFFENER
</td><td>
`58`
</td><td>
顶层 FPC 补强层
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_LayerStatus.md
# EPCB\_LayerStatus enum
层状态
## Signature
```typescript
declare enum EPCB_LayerStatus
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
HIDDEN
</td><td>
`2`
</td><td>
使用但不展示
</td></tr>
<tr><td>
NOT\_USED
</td><td>
`0`
</td><td>
不使用
</td></tr>
<tr><td>
SHOW
</td><td>
`1`
</td><td>
使用并展示
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_LayerType.md
# EPCB\_LayerType enum
图层类型
## Signature
```typescript
declare enum EPCB_LayerType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ASSEMBLY
</td><td>
`"ASSEMBLY"`
</td><td>
装配层
</td></tr>
<tr><td>
CUSTOM
</td><td>
`"CUSTOM"`
</td><td>
自定义层
</td></tr>
<tr><td>
INTERNAL\_ELECTRICAL
</td><td>
`"PLANE"`
</td><td>
内电层
</td></tr>
<tr><td>
OTHER
</td><td>
`"OTHER"`
</td><td>
其它
</td></tr>
<tr><td>
PASTE\_MASK
</td><td>
`"PASTE_MASK"`
</td><td>
锡膏(助焊)层
</td></tr>
<tr><td>
SIGNAL
</td><td>
`"SIGNAL"`
</td><td>
信号层
</td></tr>
<tr><td>
SILKSCREEN
</td><td>
`"SILKSCREEN"`
</td><td>
丝印层
</td></tr>
<tr><td>
SOLDER\_MASK
</td><td>
`"SOLDER_MASK"`
</td><td>
阻焊层
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PcbPlateType.md
# EPCB\_PcbPlateType enum
PCB 板材类型
## Signature
```typescript
declare enum EPCB_PcbPlateType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FPC
</td><td>
`2`
</td><td>
FPC 软板
</td></tr>
<tr><td>
NORMAL
</td><td>
`1`
</td><td>
普通板材
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PdfOutputMethod.md
# EPCB\_PdfOutputMethod enum
PDF 输出方式
## Signature
```typescript
declare enum EPCB_PdfOutputMethod
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
MULTI\_PAGE\_PDF
</td><td>
`"A Multi Page PDF"`
</td><td>
单个多页 PDF
</td></tr>
<tr><td>
MULTIPLE\_SINGLE\_PAGE\_PDF
</td><td>
`"Multiple Single Page PDF"`
</td><td>
多个单页 PDF(将会输出包含所有分解图层 PDF 文件的压缩包)
</td></tr>
<tr><td>
SINGLE\_PAGE\_PDF
</td><td>
`"A Single Page PDF"`
</td><td>
单个单页 PDF(将会输出包含每层一个 PDF 文件的压缩包)
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveArcInteractiveMode.md
# EPCB\_PrimitiveArcInteractiveMode enum
圆弧交互模式
## Signature
```typescript
declare enum EPCB_PrimitiveArcInteractiveMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CENTER\_ARC
</td><td>
`2`
</td><td>
中心圆弧交互
</td></tr>
<tr><td>
TWO\_POINT\_ARC
</td><td>
`1`
</td><td>
两点圆弧交互
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveDimensionType.md
# EPCB\_PrimitiveDimensionType enum
尺寸标注类型
## Signature
```typescript
declare enum EPCB_PrimitiveDimensionType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ANGLE
</td><td>
`"Protractor Dimension"`
</td><td>
角度
</td></tr>
<tr><td>
LENGTH
</td><td>
`"Length Dimension"`
</td><td>
长度
</td></tr>
<tr><td>
RADIUS
</td><td>
`"Radius Dimension"`
</td><td>
半径
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveFillMode.md
# EPCB\_PrimitiveFillMode enum
填充图元填充模式
## Signature
```typescript
declare enum EPCB_PrimitiveFillMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
INNER\_ELECTRICAL\_LAYER
</td><td>
`2`
</td><td>
内电层填充
</td></tr>
<tr><td>
MESH
</td><td>
`1`
</td><td>
网格填充
</td></tr>
<tr><td>
SOLID
</td><td>
`0`
</td><td>
实心填充
</td></tr>
</tbody></table>
## Remarks
网格填充和内电层填充为预留配置
FILE:references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md
# EPCB\_PrimitivePadHeatWeldingConnectionMethod enum
焊盘热焊连接方式
## Signature
```typescript
declare enum EPCB_PrimitivePadHeatWeldingConnectionMethod
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
DIRECT\_CONNECTED
</td><td>
`"Direct-connected"`
</td><td>
直连
</td></tr>
<tr><td>
DIVERGENT
</td><td>
`"Divergent"`
</td><td>
发散
</td></tr>
<tr><td>
NON\_CONNECTED
</td><td>
`"Non-connected"`
</td><td>
无连接
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitivePadHoleType.md
# EPCB\_PrimitivePadHoleType enum
焊盘钻孔类型
## Signature
```typescript
declare enum EPCB_PrimitivePadHoleType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
RECTANGLE
</td><td>
`"RECT"`
</td><td>
矩形(暂未开发)
</td></tr>
<tr><td>
ROUND
</td><td>
`"ROUND"`
</td><td>
圆形
</td></tr>
<tr><td>
SLOT
</td><td>
`"SLOT"`
</td><td>
插槽
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitivePadShapeType.md
# EPCB\_PrimitivePadShapeType enum
焊盘外形种类
## Signature
```typescript
declare enum EPCB_PrimitivePadShapeType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ELLIPSE
</td><td>
`"ELLIPSE"`
</td><td>
圆形
</td></tr>
<tr><td>
OBLONG
</td><td>
`"OVAL"`
</td><td>
长圆形
</td></tr>
<tr><td>
POLYLINE\_COMPLEX\_POLYGON
</td><td>
`"POLYGON"`
</td><td>
折线复杂多边形
</td></tr>
<tr><td>
RECTANGLE
</td><td>
`"RECT"`
</td><td>
矩形
</td></tr>
<tr><td>
REGULAR\_POLYGON
</td><td>
`"NGON"`
</td><td>
正多边形
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitivePadType.md
# EPCB\_PrimitivePadType enum
焊盘类型
## Signature
```typescript
declare enum EPCB_PrimitivePadType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
MARK\_POINT
</td><td>
`2`
</td><td>
标识点
</td></tr>
<tr><td>
NORMAL
</td><td>
`0`
</td><td>
焊盘
</td></tr>
<tr><td>
TEST
</td><td>
`1`
</td><td>
测试点
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitivePourFillMethod.md
# EPCB\_PrimitivePourFillMethod enum
覆铜填充方法
## Signature
```typescript
declare enum EPCB_PrimitivePourFillMethod
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
GRID
</td><td>
`"90grid"`
</td><td>
90 度网格
</td></tr>
<tr><td>
GRID45
</td><td>
`"45grid"`
</td><td>
45 度网格
</td></tr>
<tr><td>
SOLID
</td><td>
`"solid"`
</td><td>
实心填充
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveRegionRuleType.md
# EPCB\_PrimitiveRegionRuleType enum
区域图元区域规则类型
## Signature
```typescript
declare enum EPCB_PrimitiveRegionRuleType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FOLLOW\_REGION\_RULE
</td><td>
`9`
</td><td>
约束区域
</td></tr>
<tr><td>
NO\_COMPONENTS
</td><td>
`2`
</td><td>
禁止元件
</td></tr>
<tr><td>
NO\_FILLS
</td><td>
`6`
</td><td>
禁止填充
</td></tr>
<tr><td>
NO\_INNER\_ELECTRICAL\_LAYERS
</td><td>
`8`
</td><td>
禁止内电层
</td></tr>
<tr><td>
NO\_POURS
</td><td>
`7`
</td><td>
禁止覆铜
</td></tr>
<tr><td>
NO\_VIAS
</td><td>
`3`
</td><td>
禁止过孔
</td></tr>
<tr><td>
NO\_WIRES
</td><td>
`5`
</td><td>
禁止布线
</td></tr>
</tbody></table>
## Remarks
[FOLLOW\_REGION\_RULE](./EPCB_PrimitiveRegionRuleType.md) 即为约束区域
FILE:references/enums/EPCB_PrimitiveStringAlignMode.md
# EPCB\_PrimitiveStringAlignMode enum
文本对齐模式
## Signature
```typescript
declare enum EPCB_PrimitiveStringAlignMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CENTER
</td><td>
`5`
</td><td>
中心
</td></tr>
<tr><td>
CENTER\_BOTTOM
</td><td>
`6`
</td><td>
中下
</td></tr>
<tr><td>
CENTER\_TOP
</td><td>
`4`
</td><td>
中上
</td></tr>
<tr><td>
LEFT\_BOTTOM
</td><td>
`3`
</td><td>
左下
</td></tr>
<tr><td>
LEFT\_MIDDLE
</td><td>
`2`
</td><td>
左中
</td></tr>
<tr><td>
LEFT\_TOP
</td><td>
`1`
</td><td>
左上
</td></tr>
<tr><td>
RIGHT\_BOTTOM
</td><td>
`9`
</td><td>
右下
</td></tr>
<tr><td>
RIGHT\_MIDDLE
</td><td>
`8`
</td><td>
右中
</td></tr>
<tr><td>
RIGHT\_TOP
</td><td>
`7`
</td><td>
右上
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveType.md
# EPCB\_PrimitiveType enum
图元类型
## Signature
```typescript
declare enum EPCB_PrimitiveType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ARC
</td><td>
`"Arc"`
</td><td>
圆弧线
</td></tr>
<tr><td>
ATTRIBUTE
</td><td>
`"Attribute"`
</td><td>
属性
</td></tr>
<tr><td>
COMPONENT
</td><td>
`"Component"`
</td><td>
器件
</td></tr>
<tr><td>
COMPONENT\_PAD
</td><td>
`"ComponentPad"`
</td><td>
器件焊盘
</td></tr>
<tr><td>
DIMENSION
</td><td>
`"Dimension"`
</td><td>
尺寸标注
</td></tr>
<tr><td>
FILL
</td><td>
`"Fill"`
</td><td>
填充
</td></tr>
<tr><td>
IMAGE
</td><td>
`"Image"`
</td><td>
图像
</td></tr>
<tr><td>
LINE
</td><td>
`"Line"`
</td><td>
直线
</td></tr>
<tr><td>
OBJECT
</td><td>
`"Object"`
</td><td>
二进制内嵌对象
</td></tr>
<tr><td>
PAD
</td><td>
`"Pad"`
</td><td>
焊盘
</td></tr>
<tr><td>
POLYLINE
</td><td>
`"Polyline"`
</td><td>
折线
</td></tr>
<tr><td>
POUR
</td><td>
`"Pour"`
</td><td>
覆铜边框
</td></tr>
<tr><td>
POURED
</td><td>
`"Poured"`
</td><td>
覆铜填充
</td></tr>
<tr><td>
REGION
</td><td>
`"Region"`
</td><td>
区域
</td></tr>
<tr><td>
STRING
</td><td>
`"String"`
</td><td>
文本
</td></tr>
<tr><td>
VIA
</td><td>
`"Via"`
</td><td>
过孔
</td></tr>
</tbody></table>
FILE:references/enums/EPCB_PrimitiveViaType.md
# EPCB\_PrimitiveViaType enum
过孔类型
## Signature
```typescript
declare enum EPCB_PrimitiveViaType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLIND
</td><td>
`1`
</td><td>
盲埋孔
</td></tr>
<tr><td>
SUTURE
</td><td>
`2`
</td><td>
缝合孔
</td></tr>
<tr><td>
VIA
</td><td>
`0`
</td><td>
通孔
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_DynamicSimulationEnginePullEventType.md
# ESCH\_DynamicSimulationEnginePullEventType enum
动态仿真引擎拉取事件类型
## Signature
```typescript
declare enum ESCH_DynamicSimulationEnginePullEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
COMPONENT\_UPDATE
</td><td>
`"COMPONENT_UPDATE"`
</td><td>
更新元件属性
</td></tr>
<tr><td>
SESSION\_PAUSE
</td><td>
`"SESSION_PAUSE"`
</td><td>
暂停
</td></tr>
<tr><td>
SESSION\_RESUME
</td><td>
`"SESSION_RESUME"`
</td><td>
恢复
</td></tr>
<tr><td>
SESSION\_START
</td><td>
`"SESSION_START"`
</td><td>
开始动态仿真会话
</td></tr>
<tr><td>
SESSION\_STATE\_QUERY
</td><td>
`"SESSION_STATE_QUERY"`
</td><td>
查询动态仿真状态
</td></tr>
<tr><td>
SESSION\_STOP
</td><td>
`"SESSION_STOP"`
</td><td>
停止并释放资源
</td></tr>
<tr><td>
SPEED\_SET
</td><td>
`"SPEED_SET"`
</td><td>
设置速度
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_DynamicSimulationEnginePushEventType.md
# ESCH\_DynamicSimulationEnginePushEventType enum
动态仿真引擎推送事件类型
## Signature
```typescript
declare enum ESCH_DynamicSimulationEnginePushEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ENGINE\_ERROR
</td><td>
`"ENGINE_ERROR"`
</td><td>
错误
</td></tr>
<tr><td>
ENGINE\_LOG
</td><td>
`"ENGINE_LOG"`
</td><td>
实时日志
</td></tr>
<tr><td>
SESSION\_STATE
</td><td>
`"SESSION_STATE"`
</td><td>
状态变化(RUNNING/PAUSED/STOPPED...)
</td></tr>
<tr><td>
STREAM\_DATA
</td><td>
`"STREAM_DATA"`
</td><td>
实时数据帧(波形点/节点电压/内部量)
</td></tr>
<tr><td>
STREAM\_SNAPSHOT
</td><td>
`"STREAM_SNAPSHOT"`
</td><td>
一次快照(可选,用于 UI 刷新)
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_ExportDocumentFileType.md
# ESCH\_ExportDocumentFileType enum
导出文档文件类型
## Signature
```typescript
declare enum ESCH_ExportDocumentFileType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
PDF
</td><td>
`"PDF"`
</td><td>
PDF 文档
</td></tr>
<tr><td>
PNG
</td><td>
`"PNG"`
</td><td>
PNG 位图
</td></tr>
<tr><td>
SVG
</td><td>
`"SVG"`
</td><td>
SVG 矢量图
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_MouseEventType.md
# ESCH\_MouseEventType enum
鼠标事件类型
## Signature
```typescript
declare enum ESCH_MouseEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CLEAR\_SELECTED
</td><td>
`"clearSelected"`
</td><td>
取消选中
</td></tr>
<tr><td>
SELECTED
</td><td>
`"selected"`
</td><td>
选中
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveComponentType.md
# ESCH\_PrimitiveComponentType enum
器件类型
## Signature
```typescript
declare enum ESCH_PrimitiveComponentType$1
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
COMPONENT
</td><td>
`"part"`
</td><td>
元件
</td></tr>
<tr><td>
DRAWING
</td><td>
`"sheet"`
</td><td>
图纸
</td></tr>
<tr><td>
NET\_FLAG
</td><td>
`"netflag"`
</td><td>
网络标识
</td></tr>
<tr><td>
NET\_LABEL
</td><td>
`"netlabel"`
</td><td>
网络标签
</td></tr>
<tr><td>
NET\_PORT
</td><td>
`"netport"`
</td><td>
网络端口
</td></tr>
<tr><td>
NON\_ELECTRICAL\_FLAG
</td><td>
`"nonElectrical_symbol"`
</td><td>
无电气标识
</td></tr>
<tr><td>
SHORT\_CIRCUIT\_FLAG
</td><td>
`"short_symbol"`
</td><td>
短接标识
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveEventType.md
# ESCH\_PrimitiveEventType enum
图元事件类型
## Signature
```typescript
declare enum ESCH_PrimitiveEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CHANGE
</td><td>
`"change"`
</td><td>
属性变更(除位置外的属性变更)
</td></tr>
<tr><td>
CREATE
</td><td>
`"create"`
</td><td>
创建
</td></tr>
<tr><td>
DELETE
</td><td>
`"delete"`
</td><td>
删除
</td></tr>
<tr><td>
MOVE
</td><td>
`"move"`
</td><td>
移动
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveFillStyle.md
# ESCH\_PrimitiveFillStyle enum
填充样式
## Signature
```typescript
declare enum ESCH_PrimitiveFillStyle
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
GRID
</td><td>
`"Grid"`
</td><td>
网格
</td></tr>
<tr><td>
HORIZONTAL\_LINE
</td><td>
`"Horizontal Line"`
</td><td>
横线
</td></tr>
<tr><td>
LEFT\_SLASH\_LINE
</td><td>
`"Left Slash Line"`
</td><td>
左斜线
</td></tr>
<tr><td>
NONE
</td><td>
`"None"`
</td><td>
无
</td></tr>
<tr><td>
RHOMBIC\_GRID
</td><td>
`"Rhombic Grid"`
</td><td>
菱形网格
</td></tr>
<tr><td>
RIGHT\_SLASH\_LINE
</td><td>
`"Right Slash Line"`
</td><td>
右斜线
</td></tr>
<tr><td>
SOLID
</td><td>
`"Solid"`
</td><td>
实心
</td></tr>
<tr><td>
VERTICAL\_LINE
</td><td>
`"Vertical Line"`
</td><td>
竖线
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveLineType.md
# ESCH\_PrimitiveLineType enum
线型
## Signature
```typescript
declare enum ESCH_PrimitiveLineType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
DASHED
</td><td>
`1`
</td><td>
短划线
</td></tr>
<tr><td>
DOT\_DASHED
</td><td>
`3`
</td><td>
点划线
</td></tr>
<tr><td>
DOTTED
</td><td>
`2`
</td><td>
点线
</td></tr>
<tr><td>
SOLID
</td><td>
`0`
</td><td>
实线
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitivePinShape.md
# ESCH\_PrimitivePinShape enum
引脚形状
## Signature
```typescript
declare enum ESCH_PrimitivePinShape
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CLOCK
</td><td>
`"Clock"`
</td><td>
时钟
</td></tr>
<tr><td>
INVERTED
</td><td>
`"Inverted"`
</td><td>
反向
</td></tr>
<tr><td>
INVERTED\_CLOCK
</td><td>
`"Inverted Clock"`
</td><td>
反向时钟
</td></tr>
<tr><td>
NONE
</td><td>
`"None"`
</td><td>
无
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitivePinType.md
# ESCH\_PrimitivePinType enum
引脚类型
## Signature
```typescript
declare enum ESCH_PrimitivePinType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BI
</td><td>
`"BI"`
</td><td>
双向
</td></tr>
<tr><td>
GROUND
</td><td>
`"Ground"`
</td><td>
地
</td></tr>
<tr><td>
HIZ
</td><td>
`"HIZ"`
</td><td>
高阻
</td></tr>
<tr><td>
IN
</td><td>
`"IN"`
</td><td>
输入
</td></tr>
<tr><td>
OPEN\_COLLECTOR
</td><td>
`"Open Collector"`
</td><td>
开集电极
</td></tr>
<tr><td>
OPEN\_EMITTER
</td><td>
`"Open Emitter"`
</td><td>
开发射极
</td></tr>
<tr><td>
OUT
</td><td>
`"OUT"`
</td><td>
输出
</td></tr>
<tr><td>
PASSIVE
</td><td>
`"Passive"`
</td><td>
无源
</td></tr>
<tr><td>
POWER
</td><td>
`"Power"`
</td><td>
电源
</td></tr>
<tr><td>
TERMINATOR
</td><td>
`"Terminator"`
</td><td>
信号终端
</td></tr>
<tr><td>
UNDEFINED
</td><td>
`"Undefined"`
</td><td>
未定义
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveTextAlignMode.md
# ESCH\_PrimitiveTextAlignMode enum
文本对齐模式
## Signature
```typescript
declare enum ESCH_PrimitiveTextAlignMode
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CENTER
</td><td>
`5`
</td><td>
中心
</td></tr>
<tr><td>
CENTER\_BOTTOM
</td><td>
`6`
</td><td>
中下
</td></tr>
<tr><td>
CENTER\_TOP
</td><td>
`4`
</td><td>
中上
</td></tr>
<tr><td>
LEFT\_BOTTOM
</td><td>
`3`
</td><td>
左下
</td></tr>
<tr><td>
LEFT\_MIDDLE
</td><td>
`2`
</td><td>
左中
</td></tr>
<tr><td>
LEFT\_TOP
</td><td>
`1`
</td><td>
左上
</td></tr>
<tr><td>
RIGHT\_BOTTOM
</td><td>
`9`
</td><td>
右下
</td></tr>
<tr><td>
RIGHT\_MIDDLE
</td><td>
`8`
</td><td>
右中
</td></tr>
<tr><td>
RIGHT\_TOP
</td><td>
`7`
</td><td>
右上
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_PrimitiveType.md
# ESCH\_PrimitiveType enum
图元类型
## Signature
```typescript
declare enum ESCH_PrimitiveType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ARC
</td><td>
`"Arc"`
</td><td>
圆弧
</td></tr>
<tr><td>
ATTRIBUTE
</td><td>
`"Attribute"`
</td><td>
属性
</td></tr>
<tr><td>
BEZIER
</td><td>
`"Bezier"`
</td><td>
三阶贝塞尔线条
</td></tr>
<tr><td>
BUS
</td><td>
`"Bus"`
</td><td>
总线
</td></tr>
<tr><td>
CIRCLE
</td><td>
`"Circle"`
</td><td>
圆
</td></tr>
<tr><td>
COMPONENT
</td><td>
`"Component"`
</td><td>
器件
</td></tr>
<tr><td>
COMPONENT\_PIN
</td><td>
`"ComponentPin"`
</td><td>
器件引脚
</td></tr>
<tr><td>
ELLIPSE
</td><td>
`"Ellipse"`
</td><td>
椭圆
</td></tr>
<tr><td>
OBJECT
</td><td>
`"Object"`
</td><td>
二进制内嵌对象
</td></tr>
<tr><td>
PIN
</td><td>
`"Pin"`
</td><td>
引脚
</td></tr>
<tr><td>
POLYGON
</td><td>
`"Polygon"`
</td><td>
多边形
</td></tr>
<tr><td>
RECTANGLE
</td><td>
`"Rectangle"`
</td><td>
矩形
</td></tr>
<tr><td>
TEXT
</td><td>
`"Text"`
</td><td>
文本
</td></tr>
<tr><td>
WIRE
</td><td>
`"Wire"`
</td><td>
导线
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_ShapeType.md
# ESCH\_ShapeType enum
图元类型
## Signature
```typescript
declare enum ESCH_ShapeType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ANNOTATION
</td><td>
`"annotation"`
</td><td>
</td></tr>
<tr><td>
ARC
</td><td>
`"arc"`
</td><td>
</td></tr>
<tr><td>
BEZIER
</td><td>
`"bezier"`
</td><td>
</td></tr>
<tr><td>
BUS
</td><td>
`"bus"`
</td><td>
</td></tr>
<tr><td>
BUSENTRY
</td><td>
`"busEntry"`
</td><td>
</td></tr>
<tr><td>
CIRCLE
</td><td>
`"circle"`
</td><td>
</td></tr>
<tr><td>
ELLIPSE
</td><td>
`"ellipse"`
</td><td>
</td></tr>
<tr><td>
MASKREGION
</td><td>
`"maskregion"`
</td><td>
</td></tr>
<tr><td>
NOCONNECT
</td><td>
`"noconnect"`
</td><td>
</td></tr>
<tr><td>
OBJ
</td><td>
`"obj"`
</td><td>
</td></tr>
<tr><td>
PIN
</td><td>
`"pin"`
</td><td>
</td></tr>
<tr><td>
POLYLINE
</td><td>
`"polyline"`
</td><td>
</td></tr>
<tr><td>
RECT
</td><td>
`"rect"`
</td><td>
</td></tr>
<tr><td>
TABLE
</td><td>
`"table"`
</td><td>
</td></tr>
<tr><td>
TEXT
</td><td>
`"text"`
</td><td>
</td></tr>
<tr><td>
WIRE
</td><td>
`"wire"`
</td><td>
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_SimulationNetlistType.md
# ESCH\_SimulationNetlistType enum
仿真网表类型
## Signature
```typescript
declare enum ESCH_SimulationNetlistType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
NGSPICE
</td><td>
`"NGspice"`
</td><td>
NGspice
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_SpiceSimulationEnginePullEventType.md
# ESCH\_SpiceSimulationEnginePullEventType enum
Spice 仿真引擎拉取事件类型
## Signature
```typescript
declare enum ESCH_SpiceSimulationEnginePullEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
SIMULATE\_NETLIST
</td><td>
`"SIMULATE_NETLIST"`
</td><td>
仿真网表
</td></tr>
<tr><td>
VALIDATE\_NETLIST
</td><td>
`"VALIDATE_NETLIST"`
</td><td>
验证网表
</td></tr>
</tbody></table>
FILE:references/enums/ESCH_SpiceSimulationEnginePushEventType.md
# ESCH\_SpiceSimulationEnginePushEventType enum
Spice 仿真引擎推送事件类型
## Signature
```typescript
declare enum ESCH_SpiceSimulationEnginePushEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ERROR\_RESULT
</td><td>
`"ERROR_RESULT"`
</td><td>
错误
</td></tr>
<tr><td>
LOG\_RESULT
</td><td>
`"LOG_RESULT"`
</td><td>
日志
</td></tr>
<tr><td>
SIMULATION\_RESULT
</td><td>
`"SIMULATION_RESULT"`
</td><td>
仿真结果
</td></tr>
<tr><td>
VALIDATION\_RESULT
</td><td>
`"VALIDATION_RESULT"`
</td><td>
验证结果
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_BottomPanelTab.md
# ESYS\_BottomPanelTab enum
底部面板标签页
## Signature
```typescript
declare enum ESYS_BottomPanelTab
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FIND
</td><td>
`"findResult"`
</td><td>
查找结果
</td></tr>
<tr><td>
LIBRARY
</td><td>
`"library"`
</td><td>
库
</td></tr>
<tr><td>
LOG
</td><td>
`"log"`
</td><td>
日志
</td></tr>
<tr><td>
PCB\_DRC
</td><td>
`"drcResult"`
</td><td>
PCB:DRC
</td></tr>
<tr><td>
SCHEMATIC\_DRC
</td><td>
`"schDrcResult"`
</td><td>
原理图:DRC
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_HeaderMenuEnvironment.md
# ESYS\_HeaderMenuEnvironment enum
顶部菜单环境
## Signature
```typescript
declare enum ESYS_HeaderMenuEnvironment
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLANK
</td><td>
`"blank"`
</td><td>
空白页
</td></tr>
<tr><td>
FOOTPRINT
</td><td>
`"footprint"`
</td><td>
封装
</td></tr>
<tr><td>
HOME
</td><td>
`"home"`
</td><td>
主页
</td></tr>
<tr><td>
PANEL
</td><td>
`"panel"`
</td><td>
面板
</td></tr>
<tr><td>
PANEL\_VIEW
</td><td>
`"panelView"`
</td><td>
面板预览
</td></tr>
<tr><td>
PCB
</td><td>
`"pcb"`
</td><td>
PCB
</td></tr>
<tr><td>
PCB\_VIEW
</td><td>
`"pcbView"`
</td><td>
PCB 预览(包括 2D、3D 预览)
</td></tr>
<tr><td>
SCHEMATIC
</td><td>
`"sch"`
</td><td>
原理图
</td></tr>
<tr><td>
SYMBOL
</td><td>
`"symbol"`
</td><td>
符号(包括 CBB 符号)
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ImportProjectBoardOutlineSource.md
# ESYS\_ImportProjectBoardOutlineSource enum
导入工程板边框来源
## Signature
```typescript
declare enum ESYS_ImportProjectBoardOutlineSource
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
FROM\_KEEPOUT\_LAYER
</td><td>
`"keepout"`
</td><td>
从 Keepout 层
</td></tr>
<tr><td>
FROM\_MECHANICAL\_LAYER\_1
</td><td>
`"mechanical"`
</td><td>
从机械层 1
</td></tr>
</tbody></table>
## Remarks
仅 `fileType` 为 `Altium Designer` 或 `Protel` 时才可以指定该属性,否则将被忽略
FILE:references/enums/ESYS_ImportProjectImportOption.md
# ESYS\_ImportProjectImportOption enum
导入工程导入选项
## Signature
```typescript
declare enum ESYS_ImportProjectImportOption
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
EXTRACT\_LIBRARIES
</td><td>
`"ExtractLibraries"`
</td><td>
提取库文件
</td></tr>
<tr><td>
IMPORT\_DOCUMENT
</td><td>
`"ImportDocument"`
</td><td>
导入文档
</td></tr>
<tr><td>
IMPORT\_DOCUMENT\_EXTRACT\_LIBRARIES
</td><td>
`"ImportDocumentExtractLibraries"`
</td><td>
导入文档并提取库
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ImportProjectSchematicObjectStyle.md
# ESYS\_ImportProjectSchematicObjectStyle enum
导入工程原理图图元样式
## Signature
```typescript
declare enum ESYS_ImportProjectSchematicObjectStyle
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
USE\_SOURCE\_FILE\_STYLE
</td><td>
`"custom"`
</td><td>
使用源文件样式
</td></tr>
<tr><td>
USE\_SYSTEM\_THEME
</td><td>
`"system"`
</td><td>
使用系统主题
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md
# ESYS\_ImportProjectViaSolderMaskExpansion enum
导入工程过孔阻焊扩展
## Signature
```typescript
declare enum ESYS_ImportProjectViaSolderMaskExpansion
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ALL\_COVER\_OIL
</td><td>
`"cover"`
</td><td>
全部盖油
</td></tr>
<tr><td>
FOLLOW\_ORIGINAL\_SETTING
</td><td>
`"custom"`
</td><td>
跟随源设置
</td></tr>
</tbody></table>
## Remarks
仅 `fileType` 为 `Altium Designer` 或 `Protel` 时才可以指定该属性,否则将被忽略
FILE:references/enums/ESYS_LeftPanelTab.md
# ESYS\_LeftPanelTab enum
左侧面板标签页
## Signature
```typescript
declare enum ESYS_LeftPanelTab
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BASIC\_LIBRARY
</td><td>
`"basicLibrary"`
</td><td>
常用库
</td></tr>
<tr><td>
DEVICE\_STANDARDIZATION
</td><td>
`"device-standardization"`
</td><td>
器件标准化
</td></tr>
<tr><td>
LIB\_DESIGN
</td><td>
`"libDesign"`
</td><td>
库设计
</td></tr>
<tr><td>
PROJECT\_DESIGN
</td><td>
`"projectDesign"`
</td><td>
工程设计
</td></tr>
<tr><td>
PROJECT\_LIST
</td><td>
`"project_list"`
</td><td>
工程
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_LogType.md
# ESYS\_LogType enum
日志类型
## Signature
```typescript
declare enum ESYS_LogType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ERROR
</td><td>
`"error"`
</td><td>
错误
</td></tr>
<tr><td>
FATAL\_ERROR
</td><td>
`"fatalError"`
</td><td>
致命错误
</td></tr>
<tr><td>
INFO
</td><td>
`"info"`
</td><td>
信息
</td></tr>
<tr><td>
WARNING
</td><td>
`"warn"`
</td><td>
警告
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_NetlistType.md
# ESYS\_NetlistType enum
网表类型
## Signature
```typescript
declare enum ESYS_NetlistType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ALLEGRO
</td><td>
`"Allegro"`
</td><td>
Allegro
</td></tr>
<tr><td>
ALTIUM\_DESIGNER
</td><td>
`"Protel2"`
</td><td>
Altium Designer
</td></tr>
<tr><td>
DISA
</td><td>
`"DISA"`
</td><td>
数字化工业软件联盟
</td></tr>
<tr><td>
DISA\_SIMULATION
</td><td>
`"DSNET"`
</td><td>
数字化工业软件联盟仿真
</td></tr>
<tr><td>
EASYEDA\_PRO
</td><td>
`"EasyEDA"`
</td><td>
EasyEDA Pro Edition
</td></tr>
<tr><td>
JLCEDA\_PRO
</td><td>
`"JLCEDA"`
</td><td>
嘉立创 EDA 专业版
</td></tr>
<tr><td>
PADS
</td><td>
`"PADS"`
</td><td>
PADS
</td></tr>
<tr><td>
PROTEL2
</td><td>
`"Protel2"`
</td><td>
Protel 2
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_RightPanelTab.md
# ESYS\_RightPanelTab enum
右侧面板标签页
## Signature
```typescript
declare enum ESYS_RightPanelTab
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ANNOTATION
</td><td>
`"annotation"`
</td><td>
批注
</td></tr>
<tr><td>
PANEL\_3D\_PREVIEW\_ATTR
</td><td>
`"panel3d-attr"`
</td><td>
面板 3D 预览:属性
</td></tr>
<tr><td>
PANEL\_3D\_PREVIEW\_LAYER
</td><td>
`"panel3d-layer"`
</td><td>
面板 3D 预览:图层
</td></tr>
<tr><td>
PANEL\_ATTR
</td><td>
`"panel-attr"`
</td><td>
面板:属性
</td></tr>
<tr><td>
PANEL\_FILTER
</td><td>
`"panel-filter"`
</td><td>
面板:过滤
</td></tr>
<tr><td>
PANEL\_LAYER
</td><td>
`"panel-layer"`
</td><td>
面板:图层
</td></tr>
<tr><td>
PCB\_2D\_PREVIEW\_ATTR
</td><td>
`"pcb2d-attr"`
</td><td>
PCB 2D 预览:属性
</td></tr>
<tr><td>
PCB\_3D\_PREVIEW\_ATTR
</td><td>
`"pcb3d-attr"`
</td><td>
PCB 3D 预览:属性
</td></tr>
<tr><td>
PCB\_3D\_PREVIEW\_LAYER
</td><td>
`"pcb3d-layer"`
</td><td>
PCB 3D 预览:图层
</td></tr>
<tr><td>
PCB\_ATTR
</td><td>
`"pcb-attr"`
</td><td>
PCB:属性
</td></tr>
<tr><td>
PCB\_FILTER
</td><td>
`"pcb-filter"`
</td><td>
PCB:过滤
</td></tr>
<tr><td>
PCB\_LAYER
</td><td>
`"pcb-layer"`
</td><td>
PCB:图层
</td></tr>
<tr><td>
PCB\_SKETCHER\_ATTR
</td><td>
`"pcb-sketcher-attr"`
</td><td>
PCB:测量对象属性
</td></tr>
<tr><td>
PROJECT\_ATTR
</td><td>
`"project-attr"`
</td><td>
工程:属性
</td></tr>
<tr><td>
SCH\_ATTR
</td><td>
`"sch-attr"`
</td><td>
原理图:属性
</td></tr>
<tr><td>
SCH\_FILTER
</td><td>
`"sch-filter"`
</td><td>
原理图:过滤
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ShortcutKeyEffectiveEditorDocumentType.md
# ESYS\_ShortcutKeyEffectiveEditorDocumentType enum
快捷键生效页面范围
## Signature
```typescript
declare enum ESYS_ShortcutKeyEffectiveEditorDocumentType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLANK
</td><td>
`0`
</td><td>
空白页
</td></tr>
<tr><td>
FOOTPRINT
</td><td>
`5`
</td><td>
封装
</td></tr>
<tr><td>
HOME
</td><td>
`1`
</td><td>
开始页
</td></tr>
<tr><td>
PANEL
</td><td>
`6`
</td><td>
面板
</td></tr>
<tr><td>
PANEL\_3D\_PREVIEW
</td><td>
`9`
</td><td>
面板 3D 预览
</td></tr>
<tr><td>
PANEL\_LIBRARY
</td><td>
`10`
</td><td>
面板库
</td></tr>
<tr><td>
PCB
</td><td>
`4`
</td><td>
PCB
</td></tr>
<tr><td>
PCB\_2D\_PREVIEW
</td><td>
`8`
</td><td>
PCB 2D 预览
</td></tr>
<tr><td>
PCB\_3D\_PREVIEW
</td><td>
`7`
</td><td>
PCB 3D 预览
</td></tr>
<tr><td>
SCHEMATIC\_PAGE
</td><td>
`2`
</td><td>
原理图图页
</td></tr>
<tr><td>
SYMBOL
</td><td>
`3`
</td><td>
符号
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md
# ESYS\_ShortcutKeyEffectiveEditorScene enum
快捷键生效场景范围
## Signature
```typescript
declare enum ESYS_ShortcutKeyEffectiveEditorScene
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
DRAW
</td><td>
`4`
</td><td>
画布绘制
</td></tr>
<tr><td>
EDITOR
</td><td>
`1`
</td><td>
非画布
</td></tr>
<tr><td>
LOCAL
</td><td>
`6`
</td><td>
局部快捷键
</td></tr>
<tr><td>
NOT\_SELECT\_CANVAS
</td><td>
`3`
</td><td>
画布未选中
</td></tr>
<tr><td>
PLACE
</td><td>
`5`
</td><td>
画布放置
</td></tr>
<tr><td>
SELECT\_CANVAS
</td><td>
`2`
</td><td>
画布选中
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_Theme.md
# ESYS\_Theme enum
主题
## Signature
```typescript
declare enum ESYS_Theme
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
DARK
</td><td>
`"dark"`
</td><td>
深色
</td></tr>
<tr><td>
LIGHT
</td><td>
`"light"`
</td><td>
浅色
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_ToastMessageType.md
# ESYS\_ToastMessageType enum
吐司消息类型
## Signature
```typescript
declare enum ESYS_ToastMessageType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
ASK
</td><td>
`"question"`
</td><td>
问询
</td></tr>
<tr><td>
ERROR
</td><td>
`"error"`
</td><td>
错误
</td></tr>
<tr><td>
INFO
</td><td>
`"info"`
</td><td>
信息
</td></tr>
<tr><td>
SUCCESS
</td><td>
`"success"`
</td><td>
成功
</td></tr>
<tr><td>
WARNING
</td><td>
`"warn"`
</td><td>
警告
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_Unit.md
# ESYS\_Unit enum
单位
## Signature
```typescript
declare enum ESYS_Unit
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
CENTIMETER
</td><td>
`"cm"`
</td><td>
厘米
</td></tr>
<tr><td>
DECIMETER
</td><td>
`"dm"`
</td><td>
分米
</td></tr>
<tr><td>
IN
</td><td>
`"in"`
</td><td>
英尺
</td></tr>
<tr><td>
INCH
</td><td>
`"inch"`
</td><td>
英寸
</td></tr>
<tr><td>
METER
</td><td>
`"m"`
</td><td>
米
</td></tr>
<tr><td>
MIL
</td><td>
`"mil"`
</td><td>
密尔
</td></tr>
<tr><td>
MILLIMETER
</td><td>
`"mm"`
</td><td>
毫米
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_WindowEventType.md
# ESYS\_WindowEventType enum
窗口事件类型
## Signature
```typescript
declare enum ESYS_WindowEventType
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLUR
</td><td>
`"blur"`
</td><td>
失去焦点
</td></tr>
<tr><td>
FOCUS
</td><td>
`"focus"`
</td><td>
获取焦点
</td></tr>
</tbody></table>
FILE:references/enums/ESYS_WindowOpenTarget.md
# ESYS\_WindowOpenTarget enum
打开窗口上下文目标
## Signature
```typescript
declare enum ESYS_WindowOpenTarget
```
## Enumeration Members
<table><thead><tr><th>
Member
</th><th>
Value
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
BLANK
</td><td>
`"_blank"`
</td><td>
新标签页
</td></tr>
<tr><td>
SELF
</td><td>
`"_self"`
</td><td>
当前页
</td></tr>
</tbody></table>
FILE:references/interfaces/IDMT_BoardItem.md
# IDMT\_BoardItem interface
板子属性
## Signature
```typescript
interface IDMT_BoardItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[itemType](./IDMT_BoardItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.BOARD](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_BoardItem.md)
</td><td>
</td><td>
string
</td><td>
板子名称
</td></tr>
<tr><td>
[parentProjectUuid](./IDMT_BoardItem.md)
</td><td>
</td><td>
string
</td><td>
所属工程 UUID
</td></tr>
<tr><td>
[pcb](./IDMT_BoardItem.md)
</td><td>
</td><td>
[IDMT\_PcbItem](./IDMT_PcbItem.md)
</td><td>
下属 PCB
</td></tr>
<tr><td>
[schematic](./IDMT_BoardItem.md)
</td><td>
</td><td>
[IDMT\_SchematicItem](./IDMT_SchematicItem.md)
</td><td>
下属原理图
</td></tr>
</tbody></table>
---
## 属性详情
### itemtype
# IDMT\_BoardItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.BOARD;
```
### name
# IDMT\_BoardItem.name property
板子名称
## Signature
```typescript
name: string;
```
### parentprojectuuid
# IDMT\_BoardItem.parentProjectUuid property
所属工程 UUID
## Signature
```typescript
parentProjectUuid: string;
```
### pcb
# IDMT\_BoardItem.pcb property
下属 PCB
## Signature
```typescript
pcb: IDMT_PcbItem;
```
### schematic
# IDMT\_BoardItem.schematic property
下属原理图
## Signature
```typescript
schematic: IDMT_SchematicItem;
```
FILE:references/interfaces/IDMT_BriefProjectItem.md
# IDMT\_BriefProjectItem interface
简略工程属性
## Signature
```typescript
interface IDMT_BriefProjectItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[folderUuid?](./IDMT_BriefProjectItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 所属文件夹 UUID
</td></tr>
<tr><td>
[friendlyName](./IDMT_BriefProjectItem.md)
</td><td>
</td><td>
string
</td><td>
工程友好名称
</td></tr>
<tr><td>
[itemType](./IDMT_BriefProjectItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.PROJECT](../enums/EDMT_ItemType.md) \| [EDMT\_ItemType.CBB\_PROJECT](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[teamUuid](./IDMT_BriefProjectItem.md)
</td><td>
</td><td>
string
</td><td>
所属团队 UUID
</td></tr>
<tr><td>
[uuid](./IDMT_BriefProjectItem.md)
</td><td>
</td><td>
string
</td><td>
工程 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### folderuuid
# IDMT\_BriefProjectItem.folderUuid property
所属文件夹 UUID
## Signature
```typescript
folderUuid?: string;
```
### friendlyname
# IDMT\_BriefProjectItem.friendlyName property
工程友好名称
## Signature
```typescript
friendlyName: string;
```
### itemtype
# IDMT\_BriefProjectItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.PROJECT | EDMT_ItemType.CBB_PROJECT;
```
### teamuuid
# IDMT\_BriefProjectItem.teamUuid property
所属团队 UUID
## Signature
```typescript
teamUuid: string;
```
### uuid
# IDMT\_BriefProjectItem.uuid property
工程 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_EditorDocumentItem.md
# IDMT\_EditorDocumentItem interface
编辑器文档对象
## Signature
```typescript
interface IDMT_EditorDocumentItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[documentType](./IDMT_EditorDocumentItem.md)
</td><td>
</td><td>
[EDMT\_EditorDocumentType](../enums/EDMT_EditorDocumentType.md)
</td><td>
文档类型
</td></tr>
<tr><td>
[parentLibraryUuid?](./IDMT_EditorDocumentItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 库文档所属库 UUID
</td></tr>
<tr><td>
[parentProjectUuid?](./IDMT_EditorDocumentItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 文档所属工程 UUID
</td></tr>
<tr><td>
[tabId](./IDMT_EditorDocumentItem.md)
</td><td>
</td><td>
string
</td><td>
文档的标签页 ID
</td></tr>
<tr><td>
[uuid](./IDMT_EditorDocumentItem.md)
</td><td>
</td><td>
string
</td><td>
文档 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### documenttype
# IDMT\_EditorDocumentItem.documentType property
文档类型
## Signature
```typescript
documentType: EDMT_EditorDocumentType;
```
### parentlibraryuuid
# IDMT\_EditorDocumentItem.parentLibraryUuid property
库文档所属库 UUID
## Signature
```typescript
parentLibraryUuid?: string;
```
### parentprojectuuid
# IDMT\_EditorDocumentItem.parentProjectUuid property
文档所属工程 UUID
## Signature
```typescript
parentProjectUuid?: string;
```
### tabid
# IDMT\_EditorDocumentItem.tabId property
文档的标签页 ID
## Signature
```typescript
tabId: string;
```
### uuid
# IDMT\_EditorDocumentItem.uuid property
文档 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_EditorSplitScreenItem.md
# IDMT\_EditorSplitScreenItem interface
编辑器分屏属性
## Signature
```typescript
interface IDMT_EditorSplitScreenItem
```
## Remarks
[tabs](./IDMT_EditorSplitScreenItem.md) 和 [children](./IDMT_EditorSplitScreenItem.md) 并不同时存在,当 [tabs](./IDMT_EditorSplitScreenItem.md) 存在时,代表不存在分屏,[children](./IDMT_EditorSplitScreenItem.md) 将为 `undefined`
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[children?](./IDMT_EditorSplitScreenItem.md)
</td><td>
</td><td>
Array<[IDMT\_EditorSplitScreenItem](./IDMT_EditorSplitScreenItem.md)<!-- -->>
</td><td>
_(Optional)_ 子分屏
</td></tr>
<tr><td>
[direction?](./IDMT_EditorSplitScreenItem.md)
</td><td>
</td><td>
[EDMT\_EditorSplitScreenDirection](../enums/EDMT_EditorSplitScreenDirection.md)
</td><td>
_(Optional)_ 分屏方向
</td></tr>
<tr><td>
[fatherId?](./IDMT_EditorSplitScreenItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 父级分屏 ID
</td></tr>
<tr><td>
[id](./IDMT_EditorSplitScreenItem.md)
</td><td>
</td><td>
string
</td><td>
分屏 ID
</td></tr>
<tr><td>
[tabs?](./IDMT_EditorSplitScreenItem.md)
</td><td>
</td><td>
Array<[IDMT\_EditorTabItem](./IDMT_EditorTabItem.md)<!-- -->>
</td><td>
_(Optional)_ 分屏内标签页
</td></tr>
</tbody></table>
---
## 属性详情
### children
# IDMT\_EditorSplitScreenItem.children property
子分屏
## Signature
```typescript
children?: Array<IDMT_EditorSplitScreenItem>;
```
### direction
# IDMT\_EditorSplitScreenItem.direction property
分屏方向
## Signature
```typescript
direction?: EDMT_EditorSplitScreenDirection;
```
### fatherid
# IDMT\_EditorSplitScreenItem.fatherId property
父级分屏 ID
## Signature
```typescript
fatherId?: string;
```
### id
# IDMT\_EditorSplitScreenItem.id property
分屏 ID
## Signature
```typescript
id: string;
```
### tabs
# IDMT\_EditorSplitScreenItem.tabs property
分屏内标签页
## Signature
```typescript
tabs?: Array<IDMT_EditorTabItem>;
```
FILE:references/interfaces/IDMT_EditorTabItem.md
# IDMT\_EditorTabItem interface
编辑器标签页
## Signature
```typescript
interface IDMT_EditorTabItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[draggable](./IDMT_EditorTabItem.md)
</td><td>
</td><td>
boolean
</td><td>
标签页是否可拖动
</td></tr>
<tr><td>
[isAbleDelete](./IDMT_EditorTabItem.md)
</td><td>
</td><td>
boolean
</td><td>
标签页是否可关闭
</td></tr>
<tr><td>
[tabId](./IDMT_EditorTabItem.md)
</td><td>
</td><td>
string
</td><td>
标签页 ID
</td></tr>
<tr><td>
[title](./IDMT_EditorTabItem.md)
</td><td>
</td><td>
string
</td><td>
标签页标题
</td></tr>
</tbody></table>
---
## 属性详情
### draggable
# IDMT\_EditorTabItem.draggable property
标签页是否可拖动
## Signature
```typescript
draggable: boolean;
```
### isabledelete
# IDMT\_EditorTabItem.isAbleDelete property
标签页是否可关闭
## Signature
```typescript
isAbleDelete: boolean;
```
### tabid
# IDMT\_EditorTabItem.tabId property
标签页 ID
## Signature
```typescript
tabId: string;
```
### title
# IDMT\_EditorTabItem.title property
标签页标题
## Signature
```typescript
title: string;
```
FILE:references/interfaces/IDMT_FolderItem.md
# IDMT\_FolderItem interface
文件夹属性
## Signature
```typescript
interface IDMT_FolderItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[childrenFoldersUuid?](./IDMT_FolderItem.md)
</td><td>
</td><td>
Array<string>
</td><td>
_(Optional)_ 子文件夹 UUID 列表
</td></tr>
<tr><td>
[description?](./IDMT_FolderItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 文件夹描述
</td></tr>
<tr><td>
[itemType](./IDMT_FolderItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.FOLDER](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_FolderItem.md)
</td><td>
</td><td>
string
</td><td>
文件夹名称
</td></tr>
<tr><td>
[parentFolderUuid](./IDMT_FolderItem.md)
</td><td>
</td><td>
string
</td><td>
父文件夹 UUID
</td></tr>
<tr><td>
[teamUuid](./IDMT_FolderItem.md)
</td><td>
</td><td>
string
</td><td>
所属团队 UUID
</td></tr>
<tr><td>
[uuid](./IDMT_FolderItem.md)
</td><td>
</td><td>
string
</td><td>
文件夹 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### childrenfoldersuuid
# IDMT\_FolderItem.childrenFoldersUuid property
子文件夹 UUID 列表
## Signature
```typescript
childrenFoldersUuid?: Array<string>;
```
### description
# IDMT\_FolderItem.description property
文件夹描述
## Signature
```typescript
description?: string;
```
### itemtype
# IDMT\_FolderItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.FOLDER;
```
### name
# IDMT\_FolderItem.name property
文件夹名称
## Signature
```typescript
name: string;
```
### parentfolderuuid
# IDMT\_FolderItem.parentFolderUuid property
父文件夹 UUID
## Signature
```typescript
parentFolderUuid: string;
```
### teamuuid
# IDMT\_FolderItem.teamUuid property
所属团队 UUID
## Signature
```typescript
teamUuid: string;
```
### uuid
# IDMT\_FolderItem.uuid property
文件夹 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_IndicatorMarkerShape.md
# IDMT\_IndicatorMarkerShape interface
指示标记外形
## Signature
```typescript
interface IDMT_IndicatorMarkerShape
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[angle?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 圆弧:角度
</td></tr>
<tr><td>
[bottom?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 矩形:下 Y
</td></tr>
<tr><td>
[endX?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 线段 \| 圆弧:终止点 X
</td></tr>
<tr><td>
[endY?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 线段 \| 圆弧:终止点 Y
</td></tr>
<tr><td>
[left?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 矩形:左 X
</td></tr>
<tr><td>
[r?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 圆形:半径
</td></tr>
<tr><td>
[right?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 矩形:右 X
</td></tr>
<tr><td>
[startX?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 线段 \| 圆弧:起始点 X
</td></tr>
<tr><td>
[startY?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 线段 \| 圆弧:起始点 Y
</td></tr>
<tr><td>
[top?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 矩形:上 Y
</td></tr>
<tr><td>
[type](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
[EDMT\_IndicatorMarkerType](../enums/EDMT_IndicatorMarkerType.md)
</td><td>
类型
</td></tr>
<tr><td>
[x?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 点:坐标 X
圆形:圆心 X
</td></tr>
<tr><td>
[y?](./IDMT_IndicatorMarkerShape.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 点:坐标 Y
圆形:圆心 Y
</td></tr>
</tbody></table>
---
## 属性详情
### angle
# IDMT\_IndicatorMarkerShape.angle property
圆弧:角度
## Signature
```typescript
angle?: number;
```
### bottom
# IDMT\_IndicatorMarkerShape.bottom property
矩形:下 Y
## Signature
```typescript
bottom?: number;
```
### endx
# IDMT\_IndicatorMarkerShape.endX property
线段 \| 圆弧:终止点 X
## Signature
```typescript
endX?: number;
```
### endy
# IDMT\_IndicatorMarkerShape.endY property
线段 \| 圆弧:终止点 Y
## Signature
```typescript
endY?: number;
```
### left
# IDMT\_IndicatorMarkerShape.left property
矩形:左 X
## Signature
```typescript
left?: number;
```
### r
# IDMT\_IndicatorMarkerShape.r property
圆形:半径
## Signature
```typescript
r?: number;
```
### right
# IDMT\_IndicatorMarkerShape.right property
矩形:右 X
## Signature
```typescript
right?: number;
```
### startx
# IDMT\_IndicatorMarkerShape.startX property
线段 \| 圆弧:起始点 X
## Signature
```typescript
startX?: number;
```
### starty
# IDMT\_IndicatorMarkerShape.startY property
线段 \| 圆弧:起始点 Y
## Signature
```typescript
startY?: number;
```
### top
# IDMT\_IndicatorMarkerShape.top property
矩形:上 Y
## Signature
```typescript
top?: number;
```
### type
# IDMT\_IndicatorMarkerShape.type property
类型
## Signature
```typescript
type: EDMT_IndicatorMarkerType;
```
### x
# IDMT\_IndicatorMarkerShape.x property
点:坐标 X
圆形:圆心 X
## Signature
```typescript
x?: number;
```
### y
# IDMT\_IndicatorMarkerShape.y property
点:坐标 Y
圆形:圆心 Y
## Signature
```typescript
y?: number;
```
FILE:references/interfaces/IDMT_PanelItem.md
# IDMT\_PanelItem interface
面板属性
## Signature
```typescript
interface IDMT_PanelItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[itemType](./IDMT_PanelItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.PANEL](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_PanelItem.md)
</td><td>
</td><td>
string
</td><td>
面板名称
</td></tr>
<tr><td>
[parentProjectUuid](./IDMT_PanelItem.md)
</td><td>
</td><td>
string
</td><td>
所属工程 UUID
</td></tr>
<tr><td>
[uuid](./IDMT_PanelItem.md)
</td><td>
</td><td>
string
</td><td>
面板 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### itemtype
# IDMT\_PanelItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.PANEL;
```
### name
# IDMT\_PanelItem.name property
面板名称
## Signature
```typescript
name: string;
```
### parentprojectuuid
# IDMT\_PanelItem.parentProjectUuid property
所属工程 UUID
## Signature
```typescript
parentProjectUuid: string;
```
### uuid
# IDMT\_PanelItem.uuid property
面板 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_PcbItem.md
# IDMT\_PcbItem interface
PCB 属性
## Signature
```typescript
interface IDMT_PcbItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[itemType](./IDMT_PcbItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.PCB](../enums/EDMT_ItemType.md) \| [EDMT\_ItemType.CBB\_PCB](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_PcbItem.md)
</td><td>
</td><td>
string
</td><td>
PCB 名称
</td></tr>
<tr><td>
[parentBoardName?](./IDMT_PcbItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 所属板子名称
</td></tr>
<tr><td>
[parentProjectUuid](./IDMT_PcbItem.md)
</td><td>
</td><td>
string
</td><td>
所属工程 UUID
</td></tr>
<tr><td>
[uuid](./IDMT_PcbItem.md)
</td><td>
</td><td>
string
</td><td>
PCB UUID
</td></tr>
</tbody></table>
---
## 属性详情
### itemtype
# IDMT\_PcbItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.PCB | EDMT_ItemType.CBB_PCB;
```
### name
# IDMT\_PcbItem.name property
PCB 名称
## Signature
```typescript
name: string;
```
### parentboardname
# IDMT\_PcbItem.parentBoardName property
所属板子名称
## Signature
```typescript
parentBoardName?: string;
```
### parentprojectuuid
# IDMT\_PcbItem.parentProjectUuid property
所属工程 UUID
## Signature
```typescript
parentProjectUuid: string;
```
### uuid
# IDMT\_PcbItem.uuid property
PCB UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_ProjectItem.md
# IDMT\_ProjectItem interface
工程属性
## Signature
```typescript
interface IDMT_ProjectItem extends IDMT_BriefProjectItem
```
**Extends:** [IDMT\_BriefProjectItem](./IDMT_BriefProjectItem.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[collaborationMode?](./IDMT_ProjectItem.md)
</td><td>
</td><td>
[EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md)
</td><td>
_(Optional)_ 工程协作模式
</td></tr>
<tr><td>
[data](./IDMT_ProjectItem.md)
</td><td>
</td><td>
Array<[IDMT\_BoardItem](./IDMT_BoardItem.md) \| [IDMT\_SchematicItem](./IDMT_SchematicItem.md) \| [IDMT\_PcbItem](./IDMT_PcbItem.md) \| [IDMT\_PanelItem](./IDMT_PanelItem.md)<!-- -->>
</td><td>
工程内文档数据
</td></tr>
<tr><td>
[description?](./IDMT_ProjectItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[name](./IDMT_ProjectItem.md)
</td><td>
</td><td>
string
</td><td>
工程链接名称
</td></tr>
</tbody></table>
---
## 属性详情
### collaborationmode
# IDMT\_ProjectItem.collaborationMode property
工程协作模式
## Signature
```typescript
collaborationMode?: EDMT_ProjectCollaborationMode;
```
### data
# IDMT\_ProjectItem.data property
工程内文档数据
## Signature
```typescript
data: Array<IDMT_BoardItem | IDMT_SchematicItem | IDMT_PcbItem | IDMT_PanelItem>;
```
### description
# IDMT\_ProjectItem.description property
描述
## Signature
```typescript
description?: string;
```
### name
# IDMT\_ProjectItem.name property
工程链接名称
## Signature
```typescript
name: string;
```
FILE:references/interfaces/IDMT_SchematicItem.md
# IDMT\_SchematicItem interface
原理图属性
## Signature
```typescript
interface IDMT_SchematicItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[cbbSymbol?](./IDMT_SchematicItem.md)
</td><td>
</td><td>
[ILIB\_SymbolItem](./ILIB_SymbolItem.md)
</td><td>
_(Optional)_ 复用模块原理图关联的模块符号
</td></tr>
<tr><td>
[itemType](./IDMT_SchematicItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.SCHEMATIC](../enums/EDMT_ItemType.md) \| [EDMT\_ItemType.CBB\_SCHEMATIC](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_SchematicItem.md)
</td><td>
</td><td>
string
</td><td>
原理图名称
</td></tr>
<tr><td>
[page](./IDMT_SchematicItem.md)
</td><td>
</td><td>
Array<[IDMT\_SchematicPageItem](./IDMT_SchematicPageItem.md)<!-- -->>
</td><td>
下属原理图图页
</td></tr>
<tr><td>
[parentBoardUuid?](./IDMT_SchematicItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 所属板子 UUID
</td></tr>
<tr><td>
[parentProjectUuid](./IDMT_SchematicItem.md)
</td><td>
</td><td>
string
</td><td>
所属工程 UUID
</td></tr>
<tr><td>
[uuid](./IDMT_SchematicItem.md)
</td><td>
</td><td>
string
</td><td>
原理图 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### cbbsymbol
# IDMT\_SchematicItem.cbbSymbol property
复用模块原理图关联的模块符号
## Signature
```typescript
cbbSymbol?: ILIB_SymbolItem;
```
### itemtype
# IDMT\_SchematicItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.SCHEMATIC | EDMT_ItemType.CBB_SCHEMATIC;
```
### name
# IDMT\_SchematicItem.name property
原理图名称
## Signature
```typescript
name: string;
```
### page
# IDMT\_SchematicItem.page property
下属原理图图页
## Signature
```typescript
page: Array<IDMT_SchematicPageItem>;
```
### parentboarduuid
# IDMT\_SchematicItem.parentBoardUuid property
所属板子 UUID
## Signature
```typescript
parentBoardUuid?: string;
```
### parentprojectuuid
# IDMT\_SchematicItem.parentProjectUuid property
所属工程 UUID
## Signature
```typescript
parentProjectUuid: string;
```
### uuid
# IDMT\_SchematicItem.uuid property
原理图 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_SchematicPageItem.md
# IDMT\_SchematicPageItem interface
原理图图页属性
## Signature
```typescript
interface IDMT_SchematicPageItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[itemType](./IDMT_SchematicPageItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.SCHEMATIC\_PAGE](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_SchematicPageItem.md)
</td><td>
</td><td>
string
</td><td>
原理图图页名称
</td></tr>
<tr><td>
[parentSchematicUuid](./IDMT_SchematicPageItem.md)
</td><td>
</td><td>
string
</td><td>
所属原理图 UUID
</td></tr>
<tr><td>
[showTitleBlock](./IDMT_SchematicPageItem.md)
</td><td>
</td><td>
boolean
</td><td>
是否显示明细表
</td></tr>
<tr><td>
[titleBlockData](./IDMT_SchematicPageItem.md)
</td><td>
</td><td>
\{ \[key: string\]: \{ showTitle: boolean; showValue: boolean; value: any; \}; \}
</td><td>
明细表数据
</td></tr>
<tr><td>
[uuid](./IDMT_SchematicPageItem.md)
</td><td>
</td><td>
string
</td><td>
原理图图页 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### itemtype
# IDMT\_SchematicPageItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.SCHEMATIC_PAGE;
```
### name
# IDMT\_SchematicPageItem.name property
原理图图页名称
## Signature
```typescript
name: string;
```
### parentschematicuuid
# IDMT\_SchematicPageItem.parentSchematicUuid property
所属原理图 UUID
## Signature
```typescript
parentSchematicUuid: string;
```
### showtitleblock
# IDMT\_SchematicPageItem.showTitleBlock property
是否显示明细表
## Signature
```typescript
showTitleBlock: boolean;
```
### titleblockdata
# IDMT\_SchematicPageItem.titleBlockData property
明细表数据
## Signature
```typescript
titleBlockData: {
[key: string]: {
showTitle: boolean;
showValue: boolean;
value: any;
};
};
```
### uuid
# IDMT\_SchematicPageItem.uuid property
原理图图页 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_TeamItem.md
# IDMT\_TeamItem interface
团队属性
## Signature
```typescript
interface IDMT_TeamItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[identity](./IDMT_TeamItem.md)
</td><td>
</td><td>
number
</td><td>
当前用户在团队内的身份(权限组)ID
</td></tr>
<tr><td>
[itemType](./IDMT_TeamItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.TEAM](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_TeamItem.md)
</td><td>
</td><td>
string
</td><td>
团队名称
</td></tr>
<tr><td>
[uuid](./IDMT_TeamItem.md)
</td><td>
</td><td>
string
</td><td>
团队 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### identity
# IDMT\_TeamItem.identity property
当前用户在团队内的身份(权限组)ID
## Signature
```typescript
identity: number;
```
### itemtype
# IDMT\_TeamItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.TEAM;
```
### name
# IDMT\_TeamItem.name property
团队名称
## Signature
```typescript
name: string;
```
### uuid
# IDMT\_TeamItem.uuid property
团队 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IDMT_WorkspaceItem.md
# IDMT\_WorkspaceItem interface
工作区属性
## Signature
```typescript
interface IDMT_WorkspaceItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[itemType](./IDMT_WorkspaceItem.md)
</td><td>
`readonly`
</td><td>
[EDMT\_ItemType.WORKSPACE](../enums/EDMT_ItemType.md)
</td><td>
项目类型
</td></tr>
<tr><td>
[name](./IDMT_WorkspaceItem.md)
</td><td>
</td><td>
string
</td><td>
工作区名称
</td></tr>
<tr><td>
[uuid](./IDMT_WorkspaceItem.md)
</td><td>
</td><td>
string
</td><td>
工作区 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### itemtype
# IDMT\_WorkspaceItem.itemType property
项目类型
## Signature
```typescript
readonly itemType: EDMT_ItemType.WORKSPACE;
```
### name
# IDMT\_WorkspaceItem.name property
工作区名称
## Signature
```typescript
name: string;
```
### uuid
# IDMT\_WorkspaceItem.uuid property
工作区 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_3DModelItem.md
# ILIB\_3DModelItem interface
3D 模型属性
## Signature
```typescript
interface ILIB_3DModelItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[classification?](./ILIB_3DModelItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_3DModelItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_3DModelItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.MODEL](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_3DModelItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_3DModelItem.md)
</td><td>
</td><td>
string
</td><td>
3D 模型名称
</td></tr>
<tr><td>
[uuid](./ILIB_3DModelItem.md)
</td><td>
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### classification
# ILIB\_3DModelItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_3DModelItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_3DModelItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.MODEL;
```
### libraryuuid
# ILIB\_3DModelItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_3DModelItem.name property
3D 模型名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_3DModelItem.uuid property
3D 模型 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_3DModelSearchItem.md
# ILIB\_3DModelSearchItem interface
搜索到的 3D 模型属性
## Signature
```typescript
interface ILIB_3DModelSearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[ascription](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
归属
</td></tr>
<tr><td>
[classification?](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[lastModifiedBy](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
前次修改者
</td></tr>
<tr><td>
[libraryUuid](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
3D 模型名称
</td></tr>
<tr><td>
[ordinal](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[updateTimestamp](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
number
</td><td>
更新时间戳
</td></tr>
<tr><td>
[uuid](./ILIB_3DModelSearchItem.md)
</td><td>
</td><td>
string
</td><td>
3D 模型 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### ascription
# ILIB\_3DModelSearchItem.ascription property
归属
## Signature
```typescript
ascription: string;
```
### classification
# ILIB\_3DModelSearchItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_3DModelSearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### lastmodifiedby
# ILIB\_3DModelSearchItem.lastModifiedBy property
前次修改者
## Signature
```typescript
lastModifiedBy: string;
```
### libraryuuid
# ILIB\_3DModelSearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_3DModelSearchItem.name property
3D 模型名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_3DModelSearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### updatetimestamp
# ILIB\_3DModelSearchItem.updateTimestamp property
更新时间戳
## Signature
```typescript
updateTimestamp: number;
```
### uuid
# ILIB\_3DModelSearchItem.uuid property
3D 模型 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_CbbItem.md
# ILIB\_CbbItem interface
复用模块属性
## Signature
```typescript
interface ILIB_CbbItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[boards](./ILIB_CbbItem.md)
</td><td>
</td><td>
Array<[IDMT\_BoardItem](./IDMT_BoardItem.md)<!-- -->>
</td><td>
下属板子
</td></tr>
<tr><td>
[classification?](./ILIB_CbbItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_CbbItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_CbbItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.CBB](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_CbbItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_CbbItem.md)
</td><td>
</td><td>
string
</td><td>
复用模块名称
</td></tr>
<tr><td>
[uuid](./ILIB_CbbItem.md)
</td><td>
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### boards
# ILIB\_CbbItem.boards property
下属板子
## Signature
```typescript
boards: Array<IDMT_BoardItem>;
```
### classification
# ILIB\_CbbItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_CbbItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_CbbItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.CBB;
```
### libraryuuid
# ILIB\_CbbItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_CbbItem.name property
复用模块名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_CbbItem.uuid property
复用模块 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_CbbSearchItem.md
# ILIB\_CbbSearchItem interface
搜索到的复用模块属性
## Signature
```typescript
interface ILIB_CbbSearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[ascription](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
归属
</td></tr>
<tr><td>
[classification?](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[lastModifiedBy](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
前次修改者
</td></tr>
<tr><td>
[libraryUuid](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
复用模块名称
</td></tr>
<tr><td>
[ordinal](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[updateTimestamp](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
number
</td><td>
更新时间戳
</td></tr>
<tr><td>
[uuid](./ILIB_CbbSearchItem.md)
</td><td>
</td><td>
string
</td><td>
复用模块 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### ascription
# ILIB\_CbbSearchItem.ascription property
归属
## Signature
```typescript
ascription: string;
```
### classification
# ILIB\_CbbSearchItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_CbbSearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### lastmodifiedby
# ILIB\_CbbSearchItem.lastModifiedBy property
前次修改者
## Signature
```typescript
lastModifiedBy: string;
```
### libraryuuid
# ILIB\_CbbSearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_CbbSearchItem.name property
复用模块名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_CbbSearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### updatetimestamp
# ILIB\_CbbSearchItem.updateTimestamp property
更新时间戳
## Signature
```typescript
updateTimestamp: number;
```
### uuid
# ILIB\_CbbSearchItem.uuid property
复用模块 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_ClassificationIndex.md
# ILIB\_ClassificationIndex interface
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
分类索引
## Signature
```typescript
interface ILIB_ClassificationIndex
```
## Remarks
本分类索引用于索引指定库内的分类,其中库 UUID 和库类型仅作针对于本索引的识别用途,防止将不同库内的索引互相引用从而引发错误
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[libraryType](./ILIB_ClassificationIndex.md)
</td><td>
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_ClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
库 UUID
</td></tr>
<tr><td>
[primaryClassificationUuid](./ILIB_ClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
一级分类 UUID
</td></tr>
<tr><td>
[secondaryClassificationUuid?](./ILIB_ClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 二级分类 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### librarytype
# ILIB\_ClassificationIndex.libraryType property
库类型
## Signature
```typescript
libraryType: ELIB_LibraryType;
```
### libraryuuid
# ILIB\_ClassificationIndex.libraryUuid property
库 UUID
## Signature
```typescript
libraryUuid: string;
```
### primaryclassificationuuid
# ILIB\_ClassificationIndex.primaryClassificationUuid property
一级分类 UUID
## Signature
```typescript
primaryClassificationUuid: string;
```
### secondaryclassificationuuid
# ILIB\_ClassificationIndex.secondaryClassificationUuid property
二级分类 UUID
## Signature
```typescript
secondaryClassificationUuid?: string;
```
FILE:references/interfaces/ILIB_DeviceAssociationItem.md
# ILIB\_DeviceAssociationItem interface
器件关联符号、封装属性
## Signature
```typescript
interface ILIB_DeviceAssociationItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[footprint?](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
\{ uuid: string; libraryUuid: string; \}
</td><td>
_(Optional)_ 封装
</td></tr>
<tr><td>
[footprintUuid](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
string
</td><td>
封装 UUID
</td></tr>
<tr><td>
[images?](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
Array<string>
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[symbol](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
{ type: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; uuid: string; libraryUuid: string; }
</td><td>
符号
</td></tr>
<tr><td>
[symbolType](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
符号类型
</td></tr>
<tr><td>
[symbolUuid](./ILIB_DeviceAssociationItem.md)
</td><td>
</td><td>
string
</td><td>
符号 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### footprint
# ILIB\_DeviceAssociationItem.footprint property
封装
## Signature
```typescript
footprint?: {
uuid: string;
libraryUuid: string;
};
```
### footprintuuid
# ILIB\_DeviceAssociationItem.footprintUuid property
> Warning: This API is now obsolete.
>
> 请使用 [footprint](./ILIB_DeviceSearchItem.md) 替代
封装 UUID
## Signature
```typescript
footprintUuid: string;
```
### images
# ILIB\_DeviceAssociationItem.images property
## Signature
```typescript
images?: Array<string>;
```
### symbol
# ILIB\_DeviceAssociationItem.symbol property
符号
## Signature
```typescript
symbol: {
type: ELIB_SymbolType;
uuid: string;
libraryUuid: string;
};
```
### symboltype
# ILIB\_DeviceAssociationItem.symbolType property
> Warning: This API is now obsolete.
>
> 请使用 [symbol](./ILIB_DeviceSearchItem.md) 替代
符号类型
## Signature
```typescript
symbolType: ELIB_SymbolType;
```
### symboluuid
# ILIB\_DeviceAssociationItem.symbolUuid property
> Warning: This API is now obsolete.
>
> 请使用 [symbol](./ILIB_DeviceSearchItem.md) 替代
符号 UUID
## Signature
```typescript
symbolUuid: string;
```
FILE:references/interfaces/ILIB_DeviceExtendPropertyItem.md
# ILIB\_DeviceExtendPropertyItem interface
器件扩展属性
## Signature
```typescript
interface ILIB_DeviceExtendPropertyItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[addIntoBom?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ 加入 BOM
</td></tr>
<tr><td>
[addIntoPcb?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ 转到 PCB
</td></tr>
<tr><td>
[designator?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 位号
</td></tr>
<tr><td>
[manufacturer?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 制造商
</td></tr>
<tr><td>
[manufacturerId?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 制造商编号
</td></tr>
<tr><td>
[name?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 名称
</td></tr>
<tr><td>
[net?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 网络
</td></tr>
<tr><td>
[otherProperty?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
\{ \[key: string\]: boolean \| number \| string \| undefined; \}
</td><td>
_(Optional)_ 其它属性
</td></tr>
<tr><td>
[supplier?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 供应商
</td></tr>
<tr><td>
[supplierId?](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 供应商编号
</td></tr>
</tbody></table>
---
## 属性详情
### addintobom
# ILIB\_DeviceExtendPropertyItem.addIntoBom property
加入 BOM
## Signature
```typescript
addIntoBom?: boolean;
```
### addintopcb
# ILIB\_DeviceExtendPropertyItem.addIntoPcb property
转到 PCB
## Signature
```typescript
addIntoPcb?: boolean;
```
### designator
# ILIB\_DeviceExtendPropertyItem.designator property
位号
## Signature
```typescript
designator?: string;
```
### manufacturer
# ILIB\_DeviceExtendPropertyItem.manufacturer property
制造商
## Signature
```typescript
manufacturer?: string;
```
### manufacturerid
# ILIB\_DeviceExtendPropertyItem.manufacturerId property
制造商编号
## Signature
```typescript
manufacturerId?: string;
```
### name
# ILIB\_DeviceExtendPropertyItem.name property
名称
## Signature
```typescript
name?: string;
```
### net
# ILIB\_DeviceExtendPropertyItem.net property
网络
## Signature
```typescript
net?: string;
```
### otherproperty
# ILIB\_DeviceExtendPropertyItem.otherProperty property
其它属性
## Signature
```typescript
otherProperty?: {
[key: string]: boolean | number | string | undefined;
};
```
### supplier
# ILIB\_DeviceExtendPropertyItem.supplier property
供应商
## Signature
```typescript
supplier?: string;
```
### supplierid
# ILIB\_DeviceExtendPropertyItem.supplierId property
供应商编号
## Signature
```typescript
supplierId?: string;
```
FILE:references/interfaces/ILIB_DeviceItem.md
# ILIB\_DeviceItem interface
器件属性
## Signature
```typescript
interface ILIB_DeviceItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[association](./ILIB_DeviceItem.md)
</td><td>
</td><td>
[ILIB\_DeviceAssociationItem](./ILIB_DeviceAssociationItem.md)
</td><td>
关联
</td></tr>
<tr><td>
[classification?](./ILIB_DeviceItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 器件分类
</td></tr>
<tr><td>
[description?](./ILIB_DeviceItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_DeviceItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.DEVICE](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_DeviceItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_DeviceItem.md)
</td><td>
</td><td>
string
</td><td>
器件名称
</td></tr>
<tr><td>
[property](./ILIB_DeviceItem.md)
</td><td>
</td><td>
[ILIB\_DeviceExtendPropertyItem](./ILIB_DeviceExtendPropertyItem.md)
</td><td>
扩展属性
</td></tr>
<tr><td>
[subPartNames](./ILIB_DeviceItem.md)
</td><td>
</td><td>
\[\]
</td><td>
子部件名称数组
</td></tr>
<tr><td>
[uuid](./ILIB_DeviceItem.md)
</td><td>
</td><td>
string
</td><td>
器件 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### association
# ILIB\_DeviceItem.association property
关联
## Signature
```typescript
association: ILIB_DeviceAssociationItem;
```
### classification
# ILIB\_DeviceItem.classification property
器件分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_DeviceItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_DeviceItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.DEVICE;
```
### libraryuuid
# ILIB\_DeviceItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_DeviceItem.name property
器件名称
## Signature
```typescript
name: string;
```
### property
# ILIB\_DeviceItem.property property
扩展属性
## Signature
```typescript
property: ILIB_DeviceExtendPropertyItem;
```
### subpartnames
# ILIB\_DeviceItem.subPartNames property
子部件名称数组
## Signature
```typescript
subPartNames: [];
```
### uuid
# ILIB\_DeviceItem.uuid property
器件 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_DeviceSearchItem.md
# ILIB\_DeviceSearchItem interface
搜索到的器件属性
## Signature
```typescript
interface ILIB_DeviceSearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[classification?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 器件分类
</td></tr>
<tr><td>
[description?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[footprint?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
\{ name: string; uuid: string; libraryUuid: string; \}
</td><td>
_(Optional)_ 关联封装
</td></tr>
<tr><td>
[footprintName?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 关联封装名称
</td></tr>
<tr><td>
[footprintUuid](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
关联封装 UUID
</td></tr>
<tr><td>
[imageUuid?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 关联图片 UUID
</td></tr>
<tr><td>
[jlcInventory?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 嘉立创库存
</td></tr>
<tr><td>
[jlcLibraryCategory?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
[ELIB\_DeviceJlcLibraryCategory](../enums/ELIB_DeviceJlcLibraryCategory.md)
</td><td>
_(Optional)_ 嘉立创库类别
</td></tr>
<tr><td>
[jlcPrice?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 嘉立创价格
</td></tr>
<tr><td>
[lcscInventory?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 立创商城库存
</td></tr>
<tr><td>
[lcscPrice?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 立创商城价格
</td></tr>
<tr><td>
[libraryUuid](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[manufacturer?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 制造商
</td></tr>
<tr><td>
[manufacturerId?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 制造商编号
</td></tr>
<tr><td>
[model3D?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
\{ name: string; uuid: string; libraryUuid: string; \}
</td><td>
_(Optional)_ 关联 3D 模型
</td></tr>
<tr><td>
[model3DName?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 关联 3D 模型名称
</td></tr>
<tr><td>
[model3DUuid](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
关联 3D 模型 UUID
</td></tr>
<tr><td>
[name](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
器件名称
</td></tr>
<tr><td>
[ordinal](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[otherProperty?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
\{ \[key: string\]: boolean \| number \| string \| undefined; \}
</td><td>
_(Optional)_ 其它属性
</td></tr>
<tr><td>
[supplier?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 供应商
</td></tr>
<tr><td>
[supplierId?](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 供应商编号
</td></tr>
<tr><td>
[symbol](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
\{ name: string; uuid: string; libraryUuid: string; \}
</td><td>
关联符号
</td></tr>
<tr><td>
[symbolName](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
关联符号名称
</td></tr>
<tr><td>
[symbolUuid](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
关联符号 UUID
</td></tr>
<tr><td>
[uuid](./ILIB_DeviceSearchItem.md)
</td><td>
</td><td>
string
</td><td>
器件 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### classification
# ILIB\_DeviceSearchItem.classification property
器件分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_DeviceSearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### footprint
# ILIB\_DeviceSearchItem.footprint property
关联封装
## Signature
```typescript
footprint?: {
name: string;
uuid: string;
libraryUuid: string;
};
```
### footprintname
# ILIB\_DeviceSearchItem.footprintName property
> Warning: This API is now obsolete.
>
> 请使用 [footprint](./ILIB_DeviceSearchItem.md) 替代
关联封装名称
## Signature
```typescript
footprintName?: string;
```
### footprintuuid
# ILIB\_DeviceSearchItem.footprintUuid property
> Warning: This API is now obsolete.
>
> 请使用 [footprint](./ILIB_DeviceSearchItem.md) 替代
关联封装 UUID
## Signature
```typescript
footprintUuid: string;
```
### imageuuid
# ILIB\_DeviceSearchItem.imageUuid property
关联图片 UUID
## Signature
```typescript
imageUuid?: string;
```
### jlcinventory
# ILIB\_DeviceSearchItem.jlcInventory property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
嘉立创库存
## Signature
```typescript
jlcInventory?: number;
```
### jlclibrarycategory
# ILIB\_DeviceSearchItem.jlcLibraryCategory property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
嘉立创库类别
## Signature
```typescript
jlcLibraryCategory?: ELIB_DeviceJlcLibraryCategory;
```
### jlcprice
# ILIB\_DeviceSearchItem.jlcPrice property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
嘉立创价格
## Signature
```typescript
jlcPrice?: number;
```
### lcscinventory
# ILIB\_DeviceSearchItem.lcscInventory property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
立创商城库存
## Signature
```typescript
lcscInventory?: number;
```
### lcscprice
# ILIB\_DeviceSearchItem.lcscPrice property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
立创商城价格
## Signature
```typescript
lcscPrice?: number;
```
### libraryuuid
# ILIB\_DeviceSearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### manufacturer
# ILIB\_DeviceSearchItem.manufacturer property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
制造商
## Signature
```typescript
manufacturer?: string;
```
### manufacturerid
# ILIB\_DeviceSearchItem.manufacturerId property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
制造商编号
## Signature
```typescript
manufacturerId?: string;
```
### model3d
# ILIB\_DeviceSearchItem.model3D property
关联 3D 模型
## Signature
```typescript
model3D?: {
name: string;
uuid: string;
libraryUuid: string;
};
```
### model3dname
# ILIB\_DeviceSearchItem.model3DName property
> Warning: This API is now obsolete.
>
> 请使用 [model3D](./ILIB_DeviceSearchItem.md) 替代
关联 3D 模型名称
## Signature
```typescript
model3DName?: string;
```
### model3duuid
# ILIB\_DeviceSearchItem.model3DUuid property
> Warning: This API is now obsolete.
>
> 请使用 [model3D](./ILIB_DeviceSearchItem.md) 替代
关联 3D 模型 UUID
## Signature
```typescript
model3DUuid: string;
```
### name
# ILIB\_DeviceSearchItem.name property
器件名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_DeviceSearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### otherproperty
# ILIB\_DeviceSearchItem.otherProperty property
其它属性
## Signature
```typescript
otherProperty?: {
[key: string]: boolean | number | string | undefined;
};
```
### supplier
# ILIB\_DeviceSearchItem.supplier property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
供应商
## Signature
```typescript
supplier?: string;
```
### supplierid
# ILIB\_DeviceSearchItem.supplierId property
> Warning: This API is now obsolete.
>
> 在 `otherProperty` 中替代
供应商编号
## Signature
```typescript
supplierId?: string;
```
### symbol
# ILIB\_DeviceSearchItem.symbol property
关联符号
## Signature
```typescript
symbol: {
name: string;
uuid: string;
libraryUuid: string;
};
```
### symbolname
# ILIB\_DeviceSearchItem.symbolName property
> Warning: This API is now obsolete.
>
> 请使用 [symbol](./ILIB_DeviceSearchItem.md) 替代
关联符号名称
## Signature
```typescript
symbolName: string;
```
### symboluuid
# ILIB\_DeviceSearchItem.symbolUuid property
> Warning: This API is now obsolete.
>
> 请使用 [symbol](./ILIB_DeviceSearchItem.md) 替代
关联符号 UUID
## Signature
```typescript
symbolUuid: string;
```
### uuid
# ILIB\_DeviceSearchItem.uuid property
器件 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md
# ILIB\_ExtendLibrary3DModelFunctions interface
外部库 3D 模型方法
## Signature
```typescript
interface ILIB_ExtendLibrary3DModelFunctions extends ILIB_ExtendLibraryFunctions
```
**Extends:** [ILIB\_ExtendLibraryFunctions](./ILIB_ExtendLibraryFunctions.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getList](./ILIB_ExtendLibrary3DModelFunctions.md)
</td><td>
</td><td>
(props: [ILIB\_ExtendLibrarySearchProperty](./ILIB_ExtendLibrarySearchProperty.md)<!-- --><{}>) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><[ILIB\_ExtendLibraryItemIndex](./ILIB_ExtendLibraryItemIndex.md) & [ILIB\_ExtendLibrarySearchResultDataLine](./ILIB_ExtendLibrarySearchResultDataLine.md) & { modelType: 'step'; }>>
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### getlist
# ILIB\_ExtendLibrary3DModelFunctions.getList property
## Signature
```typescript
getList: (props: ILIB_ExtendLibrarySearchProperty<{}>) => Promise<ILIB_ExtendLibrarySearchResult<ILIB_ExtendLibraryItemIndex & ILIB_ExtendLibrarySearchResultDataLine & {
modelType: 'step';
}>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryCbbFunctions.md
# ILIB\_ExtendLibraryCbbFunctions interface
外部库复用模块方法
## Signature
```typescript
interface ILIB_ExtendLibraryCbbFunctions extends ILIB_ExtendLibraryFunctions
```
**Extends:** [ILIB\_ExtendLibraryFunctions](./ILIB_ExtendLibraryFunctions.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getList](./ILIB_ExtendLibraryCbbFunctions.md)
</td><td>
</td><td>
(props: any) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><[ILIB\_ExtendLibraryItem](./ILIB_ExtendLibraryItem.md) & [ILIB\_ExtendLibrarySearchResultDataLine](./ILIB_ExtendLibrarySearchResultDataLine.md) & { schematics?: Array<{ uuid: string; name: string; updateTime: string; description?: string; }>; pcbs?: Array<{ uuid: string; name: string; updateTime: number; thumb?: string; createTime?: number; creator?: [ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)<!-- -->; modifier?: [ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)<!-- -->; description?: string; }>; boards?: Array<{ pcbUuid: string; schUuid: string; name: string; }>; sheets?: Array<{ uuid: string; name: string; belongSchematicUuid: string; updateTime: number; thumb?: string; createTime?: number; creator?: [ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)<!-- -->; modifier?: [ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)<!-- -->; description?: string; }>; }>>
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### getlist
# ILIB\_ExtendLibraryCbbFunctions.getList property
## Signature
```typescript
getList: (props: any) => Promise<ILIB_ExtendLibrarySearchResult<ILIB_ExtendLibraryItem & ILIB_ExtendLibrarySearchResultDataLine & {
schematics?: Array<{
uuid: string;
name: string;
updateTime: string;
description?: string;
}>;
pcbs?: Array<{
uuid: string;
name: string;
updateTime: number;
thumb?: string;
createTime?: number;
creator?: ILIB_ExtendLibraryUserIndex;
modifier?: ILIB_ExtendLibraryUserIndex;
description?: string;
}>;
boards?: Array<{
pcbUuid: string;
schUuid: string;
name: string;
}>;
sheets?: Array<{
uuid: string;
name: string;
belongSchematicUuid: string;
updateTime: number;
thumb?: string;
createTime?: number;
creator?: ILIB_ExtendLibraryUserIndex;
modifier?: ILIB_ExtendLibraryUserIndex;
description?: string;
}>;
}>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryClassificationIndex.md
# ILIB\_ExtendLibraryClassificationIndex interface
> Warning: This API is now obsolete.
>
> - since EDA v3.2; dropped EDA v3.3
外部库分类索引
## Signature
```typescript
interface ILIB_ExtendLibraryClassificationIndex
```
## Remarks
支持外部库使用名称或 UUID 作为分类的唯一 ID 索引
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[primaryClassificationName?](./ILIB_ExtendLibraryClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 一级分类名称
</td></tr>
<tr><td>
[primaryClassificationUuid?](./ILIB_ExtendLibraryClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 一级分类 UUID
</td></tr>
<tr><td>
[secondaryClassificationName?](./ILIB_ExtendLibraryClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 二级分类名称
</td></tr>
<tr><td>
[secondaryClassificationUuid?](./ILIB_ExtendLibraryClassificationIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 二级分类 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### primaryclassificationname
# ILIB\_ExtendLibraryClassificationIndex.primaryClassificationName property
一级分类名称
## Signature
```typescript
primaryClassificationName?: string;
```
### primaryclassificationuuid
# ILIB\_ExtendLibraryClassificationIndex.primaryClassificationUuid property
一级分类 UUID
## Signature
```typescript
primaryClassificationUuid?: string;
```
### secondaryclassificationname
# ILIB\_ExtendLibraryClassificationIndex.secondaryClassificationName property
二级分类名称
## Signature
```typescript
secondaryClassificationName?: string;
```
### secondaryclassificationuuid
# ILIB\_ExtendLibraryClassificationIndex.secondaryClassificationUuid property
二级分类 UUID
## Signature
```typescript
secondaryClassificationUuid?: string;
```
FILE:references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md
# ILIB\_ExtendLibraryDeviceFunctions interface
外部库器件方法
## Signature
```typescript
interface ILIB_ExtendLibraryDeviceFunctions extends ILIB_ExtendLibraryFunctions
```
**Extends:** [ILIB\_ExtendLibraryFunctions](./ILIB_ExtendLibraryFunctions.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getList](./ILIB_ExtendLibraryDeviceFunctions.md)
</td><td>
</td><td>
(props: [ILIB\_ExtendLibrarySearchProperty](./ILIB_ExtendLibrarySearchProperty.md)<!-- --><{ attributes?: { \[key: string\]: string; }; symbolType?: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; }>) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><[ILIB\_ExtendLibraryItemIndex](./ILIB_ExtendLibraryItemIndex.md) & { classification?: [ILIB\_ExtendLibraryClassificationIndex](./ILIB_ExtendLibraryClassificationIndex.md) \| Array<string>; symbol?: [ILIB\_ExtendLibraryItem](./ILIB_ExtendLibraryItem.md) & { symbolType: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; }; footprint?: [ILIB\_ExtendLibraryItem](./ILIB_ExtendLibraryItem.md)<!-- -->; model3d?: [ILIB\_ExtendLibraryItemIndex](./ILIB_ExtendLibraryItemIndex.md) & { adjustment?: { size?: { x: number; y: number; z: number; }; rotation?: { x: number; y: number; z: number; }; offset?: { x: number; y: number; z: number; }; }; }; value?: string; supplierPart?: string; manufacturer?: string; description?: string; updateTime?: number; createTime?: number; attributes?: { \[key: string\]: string; }; }>>
</td><td>
</td></tr>
<tr><td>
[getSupportedPreviewTypes](./ILIB_ExtendLibraryDeviceFunctions.md)
</td><td>
</td><td>
() => Promise<Array<[ELIB\_PreviewType](../enums/ELIB_PreviewType.md)<!-- -->>>
</td><td>
获取支持的预览类型
</td></tr>
<tr><td>
[getSupportedSymbolTypes](./ILIB_ExtendLibraryDeviceFunctions.md)
</td><td>
</td><td>
() => Promise<Array<[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->>>
</td><td>
获取支持的符号类型
</td></tr>
</tbody></table>
---
## 属性详情
### getlist
# ILIB\_ExtendLibraryDeviceFunctions.getList property
## Signature
```typescript
getList: (props: ILIB_ExtendLibrarySearchProperty<{
attributes?: {
[key: string]: string;
};
symbolType?: ELIB_SymbolType;
}>) => Promise<ILIB_ExtendLibrarySearchResult<ILIB_ExtendLibraryItemIndex & {
classification?: ILIB_ExtendLibraryClassificationIndex | Array<string>;
symbol?: ILIB_ExtendLibraryItem & {
symbolType: ELIB_SymbolType;
};
footprint?: ILIB_ExtendLibraryItem;
model3d?: ILIB_ExtendLibraryItemIndex & {
adjustment?: {
size?: {
x: number;
y: number;
z: number;
};
rotation?: {
x: number;
y: number;
z: number;
};
offset?: {
x: number;
y: number;
z: number;
};
};
};
value?: string;
supplierPart?: string;
manufacturer?: string;
description?: string;
updateTime?: number;
createTime?: number;
attributes?: {
[key: string]: string;
};
}>>;
```
### getsupportedpreviewtypes
# ILIB\_ExtendLibraryDeviceFunctions.getSupportedPreviewTypes property
获取支持的预览类型
## Signature
```typescript
getSupportedPreviewTypes: () => Promise<Array<ELIB_PreviewType>>;
```
### getsupportedsymboltypes
# ILIB\_ExtendLibraryDeviceFunctions.getSupportedSymbolTypes property
获取支持的符号类型
## Signature
```typescript
getSupportedSymbolTypes: () => Promise<Array<ELIB_SymbolType>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md
# ILIB\_ExtendLibraryFootprintFunctions interface
外部库封装方法
## Signature
```typescript
interface ILIB_ExtendLibraryFootprintFunctions extends ILIB_ExtendLibraryFunctions
```
**Extends:** [ILIB\_ExtendLibraryFunctions](./ILIB_ExtendLibraryFunctions.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getList](./ILIB_ExtendLibraryFootprintFunctions.md)
</td><td>
</td><td>
(props: [ILIB\_ExtendLibrarySearchProperty](./ILIB_ExtendLibrarySearchProperty.md)<!-- --><{}>) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><[ILIB\_ExtendLibraryItem](./ILIB_ExtendLibraryItem.md) & [ILIB\_ExtendLibrarySearchResultDataLine](./ILIB_ExtendLibrarySearchResultDataLine.md)<!-- -->>>
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### getlist
# ILIB\_ExtendLibraryFootprintFunctions.getList property
## Signature
```typescript
getList: (props: ILIB_ExtendLibrarySearchProperty<{}>) => Promise<ILIB_ExtendLibrarySearchResult<ILIB_ExtendLibraryItem & ILIB_ExtendLibrarySearchResultDataLine>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryFunctions.md
# ILIB\_ExtendLibraryFunctions interface
外部库方法
## Signature
```typescript
interface ILIB_ExtendLibraryFunctions
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getClassificationTree](./ILIB_ExtendLibraryFunctions.md)
</td><td>
</td><td>
() => Promise<Array<{ name: string; uuid?: string; children?: Array<{ name: string; uuid?: string; }> \| undefined; }>>
</td><td>
获取分类树
</td></tr>
<tr><td>
[getDetail](./ILIB_ExtendLibraryFunctions.md)
</td><td>
</td><td>
(uuid: string) => Promise<any>
</td><td>
获取详细信息
</td></tr>
<tr><td>
[getList](./ILIB_ExtendLibraryFunctions.md)
</td><td>
</td><td>
(props: [ILIB\_ExtendLibrarySearchProperty](./ILIB_ExtendLibrarySearchProperty.md)<!-- --><any>) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><any>>
</td><td>
获取列表
</td></tr>
</tbody></table>
---
## 属性详情
### getclassificationtree
# ILIB\_ExtendLibraryFunctions.getClassificationTree property
获取分类树
## Signature
```typescript
getClassificationTree: () => Promise<Array<{
name: string;
uuid?: string;
children?: Array<{
name: string;
uuid?: string;
}> | undefined;
}>>;
```
### getdetail
# ILIB\_ExtendLibraryFunctions.getDetail property
获取详细信息
## Signature
```typescript
getDetail: (uuid: string) => Promise<any>;
```
### getlist
# ILIB\_ExtendLibraryFunctions.getList property
获取列表
## Signature
```typescript
getList: (props: ILIB_ExtendLibrarySearchProperty<any>) => Promise<ILIB_ExtendLibrarySearchResult<any>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryItem.md
# ILIB\_ExtendLibraryItem interface
外部库元素
## Signature
```typescript
interface ILIB_ExtendLibraryItem extends ILIB_ExtendLibraryItemIndex
```
**Extends:** [ILIB\_ExtendLibraryItemIndex](./ILIB_ExtendLibraryItemIndex.md)
## Remarks
此处需要传递 `url` 或 `data` 字段,如若同时传入,则取 `data` 的数据,忽略 `url` 字段
如若仅传入 `url` 字段,将会对其发起请求并尝试获取其库文件
`data` 的数据可为 Blob 格式或 DataURL 格式
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[data?](./ILIB_ExtendLibraryItem.md)
</td><td>
</td><td>
string \| Blob
</td><td>
_(Optional)_ 库文件数据
</td></tr>
<tr><td>
[url?](./ILIB_ExtendLibraryItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 库文件地址
</td></tr>
</tbody></table>
---
## 属性详情
### data
# ILIB\_ExtendLibraryItem.data property
库文件数据
## Signature
```typescript
data?: string | Blob;
```
### url
# ILIB\_ExtendLibraryItem.url property
库文件地址
## Signature
```typescript
url?: string;
```
FILE:references/interfaces/ILIB_ExtendLibraryItemIndex.md
# ILIB\_ExtendLibraryItemIndex interface
外部库元素索引
## Signature
```typescript
interface ILIB_ExtendLibraryItemIndex
```
## Remarks
支持外部库使用名称或 UUID 作为元素的唯一 ID 索引
正常情况下,希望每个库都拥有 UUID,但可能部分系统开发时不存在 UUID 字段(或可以做类似用途的字段)
此处仅传入 `name` 字段时,将把 `name` 做唯一 ID 用途,不可有重名的数据
如若传入 `uuid` 和 `name` 字段,则只有 `uuid` 不可重复
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[name](./ILIB_ExtendLibraryItemIndex.md)
</td><td>
</td><td>
string
</td><td>
库名称
</td></tr>
<tr><td>
[uuid?](./ILIB_ExtendLibraryItemIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 库 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### name
# ILIB\_ExtendLibraryItemIndex.name property
库名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_ExtendLibraryItemIndex.uuid property
库 UUID
## Signature
```typescript
uuid?: string;
```
FILE:references/interfaces/ILIB_ExtendLibrarySearchProperty.md
# ILIB\_ExtendLibrarySearchProperty interface
外部库搜索参数
## Signature
```typescript
interface ILIB_ExtendLibrarySearchProperty<T>
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[page?](./ILIB_ExtendLibrarySearchProperty.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 页数
</td></tr>
<tr><td>
[pageSize?](./ILIB_ExtendLibrarySearchProperty.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 单页条目数
</td></tr>
<tr><td>
[query](./ILIB_ExtendLibrarySearchProperty.md)
</td><td>
</td><td>
T & { wd?: string; listByTitles?: Array<string>; classification?: [ILIB\_ExtendLibraryClassificationIndex](./ILIB_ExtendLibraryClassificationIndex.md) \| Array<string>; }
</td><td>
查询参数
</td></tr>
</tbody></table>
---
## 属性详情
### page
# ILIB\_ExtendLibrarySearchProperty.page property
页数
## Signature
```typescript
page?: number;
```
### pagesize
# ILIB\_ExtendLibrarySearchProperty.pageSize property
单页条目数
## Signature
```typescript
pageSize?: number;
```
### query
# ILIB\_ExtendLibrarySearchProperty.query property
查询参数
## Signature
```typescript
query: T & {
wd?: string;
listByTitles?: Array<string>;
classification?: ILIB_ExtendLibraryClassificationIndex | Array<string>;
};
```
FILE:references/interfaces/ILIB_ExtendLibrarySearchResult.md
# ILIB\_ExtendLibrarySearchResult interface
外部库搜索结果
## Signature
```typescript
interface ILIB_ExtendLibrarySearchResult<T>
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[count](./ILIB_ExtendLibrarySearchResult.md)
</td><td>
</td><td>
number
</td><td>
总条目数
</td></tr>
<tr><td>
[lists](./ILIB_ExtendLibrarySearchResult.md)
</td><td>
</td><td>
Array<T>
</td><td>
结果列表
</td></tr>
<tr><td>
[page](./ILIB_ExtendLibrarySearchResult.md)
</td><td>
</td><td>
number
</td><td>
当前页数
</td></tr>
<tr><td>
[pageSize](./ILIB_ExtendLibrarySearchResult.md)
</td><td>
</td><td>
number
</td><td>
单页条目数
</td></tr>
<tr><td>
[totalPage](./ILIB_ExtendLibrarySearchResult.md)
</td><td>
</td><td>
number
</td><td>
总页数
</td></tr>
</tbody></table>
---
## 属性详情
### count
# ILIB\_ExtendLibrarySearchResult.count property
总条目数
## Signature
```typescript
count: number;
```
### lists
# ILIB\_ExtendLibrarySearchResult.lists property
结果列表
## Signature
```typescript
lists: Array<T>;
```
### page
# ILIB\_ExtendLibrarySearchResult.page property
当前页数
## Signature
```typescript
page: number;
```
### pagesize
# ILIB\_ExtendLibrarySearchResult.pageSize property
单页条目数
## Signature
```typescript
pageSize: number;
```
### totalpage
# ILIB\_ExtendLibrarySearchResult.totalPage property
总页数
## Signature
```typescript
totalPage: number;
```
FILE:references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md
# ILIB\_ExtendLibrarySearchResultDataLine interface
外部库搜索结果数据行
## Signature
```typescript
interface ILIB_ExtendLibrarySearchResultDataLine
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[classification?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
[ILIB\_ExtendLibraryClassificationIndex](./ILIB_ExtendLibraryClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[createTime?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[creator?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
[ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[description?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[modifier?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
[ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[owner?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
[ILIB\_ExtendLibraryUserIndex](./ILIB_ExtendLibraryUserIndex.md)
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[updateTime?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[version?](./ILIB_ExtendLibrarySearchResultDataLine.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
---
## 属性详情
### classification
# ILIB\_ExtendLibrarySearchResultDataLine.classification property
## Signature
```typescript
classification?: ILIB_ExtendLibraryClassificationIndex | Array<string>;
```
### createtime
# ILIB\_ExtendLibrarySearchResultDataLine.createTime property
## Signature
```typescript
createTime?: number;
```
### creator
# ILIB\_ExtendLibrarySearchResultDataLine.creator property
## Signature
```typescript
creator?: ILIB_ExtendLibraryUserIndex;
```
### description
# ILIB\_ExtendLibrarySearchResultDataLine.description property
## Signature
```typescript
description?: string;
```
### modifier
# ILIB\_ExtendLibrarySearchResultDataLine.modifier property
## Signature
```typescript
modifier?: ILIB_ExtendLibraryUserIndex;
```
### owner
# ILIB\_ExtendLibrarySearchResultDataLine.owner property
## Signature
```typescript
owner?: ILIB_ExtendLibraryUserIndex;
```
### updatetime
# ILIB\_ExtendLibrarySearchResultDataLine.updateTime property
## Signature
```typescript
updateTime?: number;
```
### version
# ILIB\_ExtendLibrarySearchResultDataLine.version property
## Signature
```typescript
version?: string;
```
FILE:references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md
# ILIB\_ExtendLibrarySymbolFunctions interface
外部库符号方法
## Signature
```typescript
interface ILIB_ExtendLibrarySymbolFunctions extends ILIB_ExtendLibraryFunctions
```
**Extends:** [ILIB\_ExtendLibraryFunctions](./ILIB_ExtendLibraryFunctions.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[getList](./ILIB_ExtendLibrarySymbolFunctions.md)
</td><td>
</td><td>
(props: [ILIB\_ExtendLibrarySearchProperty](./ILIB_ExtendLibrarySearchProperty.md)<!-- --><{ symbolType?: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; }>) => Promise<[ILIB\_ExtendLibrarySearchResult](./ILIB_ExtendLibrarySearchResult.md)<!-- --><[ILIB\_ExtendLibraryItem](./ILIB_ExtendLibraryItem.md) & [ILIB\_ExtendLibrarySearchResultDataLine](./ILIB_ExtendLibrarySearchResultDataLine.md) & { symbolType: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; }>>
</td><td>
</td></tr>
<tr><td>
[getSupportedSymbolTypes](./ILIB_ExtendLibrarySymbolFunctions.md)
</td><td>
</td><td>
() => Promise<Array<[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->>>
</td><td>
获取支持的符号类型
</td></tr>
</tbody></table>
---
## 属性详情
### getlist
# ILIB\_ExtendLibrarySymbolFunctions.getList property
## Signature
```typescript
getList: (props: ILIB_ExtendLibrarySearchProperty<{
symbolType?: ELIB_SymbolType;
}>) => Promise<ILIB_ExtendLibrarySearchResult<ILIB_ExtendLibraryItem & ILIB_ExtendLibrarySearchResultDataLine & {
symbolType: ELIB_SymbolType;
}>>;
```
### getsupportedsymboltypes
# ILIB\_ExtendLibrarySymbolFunctions.getSupportedSymbolTypes property
获取支持的符号类型
## Signature
```typescript
getSupportedSymbolTypes: () => Promise<Array<ELIB_SymbolType>>;
```
FILE:references/interfaces/ILIB_ExtendLibraryUserIndex.md
# ILIB\_ExtendLibraryUserIndex interface
外部库用户索引
## Signature
```typescript
interface ILIB_ExtendLibraryUserIndex
```
## Remarks
支持外部库使用名称或关联的嘉立创 EDA 系统内用户 UUID 作为用户的唯一 ID 索引
如若希望关联嘉立创 EDA 的用户,请传入该用户的 UUID,将会自动读取用户的名称(如若用户存在)
如若仅希望显示用户名称,可以传入 `name` 字段
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[name?](./ILIB_ExtendLibraryUserIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 用户名称
</td></tr>
<tr><td>
[uuid?](./ILIB_ExtendLibraryUserIndex.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 嘉立创 EDA 系统内的用户 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### name
# ILIB\_ExtendLibraryUserIndex.name property
用户名称
## Signature
```typescript
name?: string;
```
### uuid
# ILIB\_ExtendLibraryUserIndex.uuid property
嘉立创 EDA 系统内的用户 UUID
## Signature
```typescript
uuid?: string;
```
FILE:references/interfaces/ILIB_FootprintItem.md
# ILIB\_FootprintItem interface
封装属性
## Signature
```typescript
interface ILIB_FootprintItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[classification?](./ILIB_FootprintItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_FootprintItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_FootprintItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.FOOTPRINT](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_FootprintItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_FootprintItem.md)
</td><td>
</td><td>
string
</td><td>
封装名称
</td></tr>
<tr><td>
[uuid](./ILIB_FootprintItem.md)
</td><td>
</td><td>
string
</td><td>
封装 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### classification
# ILIB\_FootprintItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_FootprintItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_FootprintItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.FOOTPRINT;
```
### libraryuuid
# ILIB\_FootprintItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_FootprintItem.name property
封装名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_FootprintItem.uuid property
封装 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_FootprintSearchItem.md
# ILIB\_FootprintSearchItem interface
搜索到的封装属性
## Signature
```typescript
interface ILIB_FootprintSearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[ascription](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
归属
</td></tr>
<tr><td>
[classification?](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[lastModifiedBy](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
前次修改者
</td></tr>
<tr><td>
[libraryUuid](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
封装名称
</td></tr>
<tr><td>
[ordinal](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[updateTimestamp](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
number
</td><td>
更新时间戳
</td></tr>
<tr><td>
[uuid](./ILIB_FootprintSearchItem.md)
</td><td>
</td><td>
string
</td><td>
封装 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### ascription
# ILIB\_FootprintSearchItem.ascription property
归属
## Signature
```typescript
ascription: string;
```
### classification
# ILIB\_FootprintSearchItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_FootprintSearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### lastmodifiedby
# ILIB\_FootprintSearchItem.lastModifiedBy property
前次修改者
## Signature
```typescript
lastModifiedBy: string;
```
### libraryuuid
# ILIB\_FootprintSearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_FootprintSearchItem.name property
封装名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_FootprintSearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### updatetimestamp
# ILIB\_FootprintSearchItem.updateTimestamp property
更新时间戳
## Signature
```typescript
updateTimestamp: number;
```
### uuid
# ILIB\_FootprintSearchItem.uuid property
封装 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_LibraryInfo.md
# ILIB\_LibraryInfo interface
库信息
## Signature
```typescript
interface ILIB_LibraryInfo
```
## Remarks
包含库的名称以及它的 UUID
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[name](./ILIB_LibraryInfo.md)
</td><td>
</td><td>
string
</td><td>
库名称
</td></tr>
<tr><td>
[uuid](./ILIB_LibraryInfo.md)
</td><td>
</td><td>
string
</td><td>
库 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### name
# ILIB\_LibraryInfo.name property
库名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_LibraryInfo.uuid property
库 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_LibraryItem.md
# ILIB\_LibraryItem interface
库属性
## Signature
```typescript
interface ILIB_LibraryItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[libraryType](./ILIB_LibraryItem.md)
</td><td>
</td><td>
[ELIB\_LibraryType](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid?](./ILIB_LibraryItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 所属库 UUID
</td></tr>
<tr><td>
[uuid](./ILIB_LibraryItem.md)
</td><td>
</td><td>
string
</td><td>
UUID
</td></tr>
</tbody></table>
---
## 属性详情
### librarytype
# ILIB\_LibraryItem.libraryType property
库类型
## Signature
```typescript
libraryType: ELIB_LibraryType;
```
### libraryuuid
# ILIB\_LibraryItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid?: string;
```
### uuid
# ILIB\_LibraryItem.uuid property
UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_PanelLibraryItem.md
# ILIB\_PanelLibraryItem interface
面板库属性
## Signature
```typescript
interface ILIB_PanelLibraryItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[classification?](./ILIB_PanelLibraryItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_PanelLibraryItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_PanelLibraryItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.PANEL\_LIBRARY](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_PanelLibraryItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_PanelLibraryItem.md)
</td><td>
</td><td>
string
</td><td>
面板库名称
</td></tr>
<tr><td>
[uuid](./ILIB_PanelLibraryItem.md)
</td><td>
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### classification
# ILIB\_PanelLibraryItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_PanelLibraryItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_PanelLibraryItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.PANEL_LIBRARY;
```
### libraryuuid
# ILIB\_PanelLibraryItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_PanelLibraryItem.name property
面板库名称
## Signature
```typescript
name: string;
```
### uuid
# ILIB\_PanelLibraryItem.uuid property
面板库 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_PanelLibrarySearchItem.md
# ILIB\_PanelLibrarySearchItem interface
搜索到的面板库属性
## Signature
```typescript
interface ILIB_PanelLibrarySearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[ascription](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
归属
</td></tr>
<tr><td>
[classification?](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[lastModifiedBy](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
前次修改者
</td></tr>
<tr><td>
[libraryUuid](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
面板库名称
</td></tr>
<tr><td>
[ordinal](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[updateTimestamp](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
number
</td><td>
更新时间戳
</td></tr>
<tr><td>
[uuid](./ILIB_PanelLibrarySearchItem.md)
</td><td>
</td><td>
string
</td><td>
面板库 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### ascription
# ILIB\_PanelLibrarySearchItem.ascription property
归属
## Signature
```typescript
ascription: string;
```
### classification
# ILIB\_PanelLibrarySearchItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_PanelLibrarySearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### lastmodifiedby
# ILIB\_PanelLibrarySearchItem.lastModifiedBy property
前次修改者
## Signature
```typescript
lastModifiedBy: string;
```
### libraryuuid
# ILIB\_PanelLibrarySearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_PanelLibrarySearchItem.name property
面板库名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_PanelLibrarySearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### updatetimestamp
# ILIB\_PanelLibrarySearchItem.updateTimestamp property
更新时间戳
## Signature
```typescript
updateTimestamp: number;
```
### uuid
# ILIB\_PanelLibrarySearchItem.uuid property
面板库 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_SymbolItem.md
# ILIB\_SymbolItem interface
符号属性
## Signature
```typescript
interface ILIB_SymbolItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[cbbUuid?](./ILIB_SymbolItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 所属复用模块 UUID,仅复用模块符号存在该属性
</td></tr>
<tr><td>
[classification?](./ILIB_SymbolItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_SymbolItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[libraryType](./ILIB_SymbolItem.md)
</td><td>
`readonly`
</td><td>
[ELIB\_LibraryType.SYMBOL](../enums/ELIB_LibraryType.md)
</td><td>
库类型
</td></tr>
<tr><td>
[libraryUuid](./ILIB_SymbolItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_SymbolItem.md)
</td><td>
</td><td>
string
</td><td>
符号名称
</td></tr>
<tr><td>
[subPartNames](./ILIB_SymbolItem.md)
</td><td>
</td><td>
\[\]
</td><td>
子部件名称数组
</td></tr>
<tr><td>
[type](./ILIB_SymbolItem.md)
</td><td>
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
符号类型
</td></tr>
<tr><td>
[uuid](./ILIB_SymbolItem.md)
</td><td>
</td><td>
string
</td><td>
符号 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### cbbuuid
# ILIB\_SymbolItem.cbbUuid property
所属复用模块 UUID,仅复用模块符号存在该属性
## Signature
```typescript
cbbUuid?: string;
```
### classification
# ILIB\_SymbolItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_SymbolItem.description property
描述
## Signature
```typescript
description?: string;
```
### librarytype
# ILIB\_SymbolItem.libraryType property
库类型
## Signature
```typescript
readonly libraryType: ELIB_LibraryType.SYMBOL;
```
### libraryuuid
# ILIB\_SymbolItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_SymbolItem.name property
符号名称
## Signature
```typescript
name: string;
```
### subpartnames
# ILIB\_SymbolItem.subPartNames property
子部件名称数组
## Signature
```typescript
subPartNames: [];
```
### type
# ILIB\_SymbolItem.type property
符号类型
## Signature
```typescript
type: ELIB_SymbolType;
```
### uuid
# ILIB\_SymbolItem.uuid property
符号 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/ILIB_SymbolSearchItem.md
# ILIB\_SymbolSearchItem interface
搜索到的符号属性
## Signature
```typescript
interface ILIB_SymbolSearchItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[ascription](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
归属
</td></tr>
<tr><td>
[classification?](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
[ILIB\_ClassificationIndex](./ILIB_ClassificationIndex.md) \| Array<string>
</td><td>
_(Optional)_ 分类
</td></tr>
<tr><td>
[description?](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 描述
</td></tr>
<tr><td>
[lastModifiedBy](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
前次修改者
</td></tr>
<tr><td>
[libraryUuid](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
所属库 UUID
</td></tr>
<tr><td>
[name](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
符号名称
</td></tr>
<tr><td>
[ordinal](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
number
</td><td>
排序
</td></tr>
<tr><td>
[type](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
[ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
</td><td>
符号类型
</td></tr>
<tr><td>
[updateTimestamp](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
number
</td><td>
更新时间戳
</td></tr>
<tr><td>
[uuid](./ILIB_SymbolSearchItem.md)
</td><td>
</td><td>
string
</td><td>
符号 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### ascription
# ILIB\_SymbolSearchItem.ascription property
归属
## Signature
```typescript
ascription: string;
```
### classification
# ILIB\_SymbolSearchItem.classification property
分类
## Signature
```typescript
classification?: ILIB_ClassificationIndex | Array<string>;
```
### description
# ILIB\_SymbolSearchItem.description property
描述
## Signature
```typescript
description?: string;
```
### lastmodifiedby
# ILIB\_SymbolSearchItem.lastModifiedBy property
前次修改者
## Signature
```typescript
lastModifiedBy: string;
```
### libraryuuid
# ILIB\_SymbolSearchItem.libraryUuid property
所属库 UUID
## Signature
```typescript
libraryUuid: string;
```
### name
# ILIB\_SymbolSearchItem.name property
符号名称
## Signature
```typescript
name: string;
```
### ordinal
# ILIB\_SymbolSearchItem.ordinal property
排序
## Signature
```typescript
ordinal: number;
```
### type
# ILIB\_SymbolSearchItem.type property
符号类型
## Signature
```typescript
type: ELIB_SymbolType;
```
### updatetimestamp
# ILIB\_SymbolSearchItem.updateTimestamp property
更新时间戳
## Signature
```typescript
updateTimestamp: number;
```
### uuid
# ILIB\_SymbolSearchItem.uuid property
符号 UUID
## Signature
```typescript
uuid: string;
```
FILE:references/interfaces/IPCB_BomPropertiesTableColumns.md
# IPCB\_BomPropertiesTableColumns interface
BOM 列的属性及排序规则
## Signature
```typescript
interface IPCB_BomPropertiesTableColumns
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[group?](./IPCB_BomPropertiesTableColumns.md)
</td><td>
</td><td>
null \| 'Yes' \| 'No'
</td><td>
_(Optional)_ 是否分组
</td></tr>
<tr><td>
[orderWeight?](./IPCB_BomPropertiesTableColumns.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 排列权重(大权重优先在 BOM 的左侧)
</td></tr>
<tr><td>
[property](./IPCB_BomPropertiesTableColumns.md)
</td><td>
</td><td>
string
</td><td>
属性
</td></tr>
<tr><td>
[sort?](./IPCB_BomPropertiesTableColumns.md)
</td><td>
</td><td>
null \| 'asc' \| 'desc'
</td><td>
_(Optional)_ 排序规则
</td></tr>
<tr><td>
[title?](./IPCB_BomPropertiesTableColumns.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 显示名称
</td></tr>
</tbody></table>
---
## 属性详情
### group
# IPCB\_BomPropertiesTableColumns.group property
是否分组
## Signature
```typescript
group?: null | 'Yes' | 'No';
```
### orderweight
# IPCB\_BomPropertiesTableColumns.orderWeight property
排列权重(大权重优先在 BOM 的左侧)
## Signature
```typescript
orderWeight?: number;
```
### property
# IPCB\_BomPropertiesTableColumns.property property
属性
## Signature
```typescript
property: string;
```
### sort
# IPCB\_BomPropertiesTableColumns.sort property
排序规则
## Signature
```typescript
sort?: null | 'asc' | 'desc';
```
### title
# IPCB\_BomPropertiesTableColumns.title property
显示名称
## Signature
```typescript
title?: string;
```
FILE:references/interfaces/IPCB_DifferentialPairItem.md
# IPCB\_DifferentialPairItem interface
差分对属性
## Signature
```typescript
interface IPCB_DifferentialPairItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[name](./IPCB_DifferentialPairItem.md)
</td><td>
</td><td>
string
</td><td>
差分对名称
</td></tr>
<tr><td>
[negativeNet](./IPCB_DifferentialPairItem.md)
</td><td>
</td><td>
string
</td><td>
负网络
</td></tr>
<tr><td>
[positiveNet](./IPCB_DifferentialPairItem.md)
</td><td>
</td><td>
string
</td><td>
正网络
</td></tr>
</tbody></table>
---
## 属性详情
### name
# IPCB\_DifferentialPairItem.name property
差分对名称
## Signature
```typescript
name: string;
```
### negativenet
# IPCB\_DifferentialPairItem.negativeNet property
负网络
## Signature
```typescript
negativeNet: string;
```
### positivenet
# IPCB\_DifferentialPairItem.positiveNet property
正网络
## Signature
```typescript
positiveNet: string;
```
FILE:references/interfaces/IPCB_EqualLengthNetGroupItem.md
# IPCB\_EqualLengthNetGroupItem interface
等长网络组属性
## Signature
```typescript
interface IPCB_EqualLengthNetGroupItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[color](./IPCB_EqualLengthNetGroupItem.md)
</td><td>
</td><td>
{ r: number; g: number; b: number; alpha: number; } \| null
</td><td>
等长网络组颜色
</td></tr>
<tr><td>
[name](./IPCB_EqualLengthNetGroupItem.md)
</td><td>
</td><td>
string
</td><td>
等长网络组名称
</td></tr>
<tr><td>
[nets](./IPCB_EqualLengthNetGroupItem.md)
</td><td>
</td><td>
Array<string>
</td><td>
网络名称数组
</td></tr>
</tbody></table>
---
## 属性详情
### color
# IPCB\_EqualLengthNetGroupItem.color property
等长网络组颜色
## Signature
```typescript
color: {
r: number;
g: number;
b: number;
alpha: number;
} | null;
```
### name
# IPCB\_EqualLengthNetGroupItem.name property
等长网络组名称
## Signature
```typescript
name: string;
```
### nets
# IPCB\_EqualLengthNetGroupItem.nets property
网络名称数组
## Signature
```typescript
nets: Array<string>;
```
FILE:references/interfaces/IPCB_LayerItem.md
# IPCB\_LayerItem interface
图层属性
## Signature
```typescript
interface IPCB_LayerItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[color](./IPCB_LayerItem.md)
</td><td>
</td><td>
string
</td><td>
颜色(RGB HEX 格式)
</td></tr>
<tr><td>
[id](./IPCB_LayerItem.md)
</td><td>
</td><td>
[EPCB\_LayerId](../enums/EPCB_LayerId.md)
</td><td>
图层 ID
</td></tr>
<tr><td>
[inactiveColor](./IPCB_LayerItem.md)
</td><td>
</td><td>
string
</td><td>
非激活颜色(RGB HEX 格式)
</td></tr>
<tr><td>
[inactiveTransparency](./IPCB_LayerItem.md)
</td><td>
</td><td>
number
</td><td>
非激活透明度(%)
</td></tr>
<tr><td>
[layerStatus](./IPCB_LayerItem.md)
</td><td>
</td><td>
[EPCB\_LayerStatus](../enums/EPCB_LayerStatus.md)
</td><td>
层状态
</td></tr>
<tr><td>
[locked](./IPCB_LayerItem.md)
</td><td>
</td><td>
boolean
</td><td>
是否锁定
</td></tr>
<tr><td>
[name](./IPCB_LayerItem.md)
</td><td>
</td><td>
string
</td><td>
名称
</td></tr>
<tr><td>
[transparency](./IPCB_LayerItem.md)
</td><td>
</td><td>
number
</td><td>
透明度(%)
</td></tr>
<tr><td>
[type](./IPCB_LayerItem.md)
</td><td>
</td><td>
[EPCB\_LayerType](../enums/EPCB_LayerType.md)
</td><td>
类型
</td></tr>
</tbody></table>
---
## 属性详情
### color
# IPCB\_LayerItem.color property
颜色(RGB HEX 格式)
## Signature
```typescript
color: string;
```
### id
# IPCB\_LayerItem.id property
图层 ID
## Signature
```typescript
id: EPCB_LayerId;
```
### inactivecolor
# IPCB\_LayerItem.inactiveColor property
非激活颜色(RGB HEX 格式)
## Signature
```typescript
inactiveColor: string;
```
### inactivetransparency
# IPCB\_LayerItem.inactiveTransparency property
非激活透明度(%)
## Signature
```typescript
inactiveTransparency: number;
```
### layerstatus
# IPCB\_LayerItem.layerStatus property
层状态
## Signature
```typescript
layerStatus: EPCB_LayerStatus;
```
### locked
# IPCB\_LayerItem.locked property
是否锁定
## Signature
```typescript
locked: boolean;
```
### name
# IPCB\_LayerItem.name property
名称
## Signature
```typescript
name: string;
```
### transparency
# IPCB\_LayerItem.transparency property
透明度(%)
## Signature
```typescript
transparency: number;
```
### type
# IPCB\_LayerItem.type property
类型
## Signature
```typescript
type: EPCB_LayerType;
```
FILE:references/interfaces/IPCB_NetClassItem.md
# IPCB\_NetClassItem interface
网络类属性
## Signature
```typescript
interface IPCB_NetClassItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[color](./IPCB_NetClassItem.md)
</td><td>
</td><td>
{ r: number; g: number; b: number; alpha: number; } \| null
</td><td>
网络类颜色
</td></tr>
<tr><td>
[name](./IPCB_NetClassItem.md)
</td><td>
</td><td>
string
</td><td>
网络类名称
</td></tr>
<tr><td>
[nets](./IPCB_NetClassItem.md)
</td><td>
</td><td>
Array<string>
</td><td>
网络名称数组
</td></tr>
</tbody></table>
---
## 属性详情
### color
# IPCB\_NetClassItem.color property
网络类颜色
## Signature
```typescript
color: {
r: number;
g: number;
b: number;
alpha: number;
} | null;
```
### name
# IPCB\_NetClassItem.name property
网络类名称
## Signature
```typescript
name: string;
```
### nets
# IPCB\_NetClassItem.nets property
网络名称数组
## Signature
```typescript
nets: Array<string>;
```
FILE:references/interfaces/IPCB_NetInfo.md
# IPCB\_NetInfo interface
网络属性
## Signature
```typescript
interface IPCB_NetInfo
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[color](./IPCB_NetInfo.md)
</td><td>
</td><td>
{ r: number; g: number; b: number; alpha: number; } \| null
</td><td>
颜色
</td></tr>
<tr><td>
[length](./IPCB_NetInfo.md)
</td><td>
</td><td>
number
</td><td>
长度
</td></tr>
<tr><td>
[net](./IPCB_NetInfo.md)
</td><td>
</td><td>
string
</td><td>
网络名称
</td></tr>
</tbody></table>
---
## 属性详情
### color
# IPCB\_NetInfo.color property
颜色
## Signature
```typescript
color: {
r: number;
g: number;
b: number;
alpha: number;
} | null;
```
### length
# IPCB\_NetInfo.length property
长度
## Signature
```typescript
length: number;
```
### net
# IPCB\_NetInfo.net property
网络名称
## Signature
```typescript
net: string;
```
FILE:references/interfaces/IPCB_PadPairGroupItem.md
# IPCB\_PadPairGroupItem interface
焊盘对组属性
## Signature
```typescript
interface IPCB_PadPairGroupItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[name](./IPCB_PadPairGroupItem.md)
</td><td>
</td><td>
string
</td><td>
焊盘对组名称
</td></tr>
<tr><td>
[padPairs](./IPCB_PadPairGroupItem.md)
</td><td>
</td><td>
Array<\[string, string\]>
</td><td>
焊盘对数组
</td></tr>
</tbody></table>
---
## 属性详情
### name
# IPCB\_PadPairGroupItem.name property
焊盘对组名称
## Signature
```typescript
name: string;
```
### padpairs
# IPCB\_PadPairGroupItem.padPairs property
焊盘对数组
## Signature
```typescript
padPairs: Array<[string, string]>;
```
FILE:references/interfaces/IPCB_PadPairMinWireLengthItem.md
# IPCB\_PadPairMinWireLengthItem interface
焊盘对最短导线长度属性
## Signature
```typescript
interface IPCB_PadPairMinWireLengthItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[minWireLength](./IPCB_PadPairMinWireLengthItem.md)
</td><td>
</td><td>
number
</td><td>
最短导线长度
</td></tr>
<tr><td>
[padPair](./IPCB_PadPairMinWireLengthItem.md)
</td><td>
</td><td>
\[string, string\]
</td><td>
焊盘对数组
</td></tr>
</tbody></table>
---
## 属性详情
### minwirelength
# IPCB\_PadPairMinWireLengthItem.minWireLength property
最短导线长度
## Signature
```typescript
minWireLength: number;
```
### padpair
# IPCB\_PadPairMinWireLengthItem.padPair property
焊盘对数组
## Signature
```typescript
padPair: [string, string];
```
FILE:references/interfaces/IPCB_Primitive.md
# IPCB\_Primitive interface
PCB 图元
## Signature
```typescript
interface IPCB_Primitive
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [IPCB\_Primitive](./IPCB_Primitive.md) \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[done](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [IPCB\_Primitive](./IPCB_Primitive.md) \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[getState\_PrimitiveId](./IPCB_Primitive.md)
</td><td>
</td><td>
() => string
</td><td>
</td></tr>
<tr><td>
[getState\_PrimitiveType](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
</td><td>
</td></tr>
<tr><td>
[isAsync](./IPCB_Primitive.md)
</td><td>
</td><td>
() => boolean
</td><td>
</td></tr>
<tr><td>
[reset](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [IPCB\_Primitive](./IPCB_Primitive.md) \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[toAsync](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [IPCB\_Primitive](./IPCB_Primitive.md)
</td><td>
</td></tr>
<tr><td>
[toSync](./IPCB_Primitive.md)
</td><td>
</td><td>
() => [IPCB\_Primitive](./IPCB_Primitive.md)
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### create
# IPCB\_Primitive.create property
## Signature
```typescript
create: () => IPCB_Primitive | Promise<IPCB_Primitive>;
```
### done
# IPCB\_Primitive.done property
## Signature
```typescript
done: () => IPCB_Primitive | Promise<IPCB_Primitive>;
```
### getstate_primitiveid
# IPCB\_Primitive.getState\_PrimitiveId property
## Signature
```typescript
getState_PrimitiveId: () => string;
```
### getstate_primitivetype
# IPCB\_Primitive.getState\_PrimitiveType property
## Signature
```typescript
getState_PrimitiveType: () => EPCB_PrimitiveType;
```
### isasync
# IPCB\_Primitive.isAsync property
## Signature
```typescript
isAsync: () => boolean;
```
### reset
# IPCB\_Primitive.reset property
## Signature
```typescript
reset: () => IPCB_Primitive | Promise<IPCB_Primitive>;
```
### toasync
# IPCB\_Primitive.toAsync property
## Signature
```typescript
toAsync: () => IPCB_Primitive;
```
### tosync
# IPCB\_Primitive.toSync property
## Signature
```typescript
toSync: () => IPCB_Primitive;
```
FILE:references/interfaces/IPCB_PrimitiveAPI.md
# IPCB\_PrimitiveAPI interface
PCB 图元接口
## Signature
```typescript
interface IPCB_PrimitiveAPI
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => [IPCB\_Primitive](./IPCB_Primitive.md) \| undefined \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->> \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md) \| undefined>
</td><td>
</td></tr>
<tr><td>
[delete](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
(primitiveIds: string \| any \| Array<string> \| Array<any>) => boolean \| Promise<boolean>
</td><td>
</td></tr>
<tr><td>
[get](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
{ (primitiveIds: string): [IPCB\_Primitive](./IPCB_Primitive.md) \| undefined \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md) \| undefined>; (primitiveIds: Array<string>): Array<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->> \| Promise<Array<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->>>; }
</td><td>
</td></tr>
<tr><td>
[getAll](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => Array<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->> \| Promise<Array<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->>>
</td><td>
</td></tr>
<tr><td>
[getAllPrimitiveId](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => Array<string> \| Promise<Array<string>>
</td><td>
</td></tr>
<tr><td>
[modify](./IPCB_PrimitiveAPI.md)
</td><td>
</td><td>
(primitiveId: string \| any, ...args: any\[\]) => [IPCB\_Primitive](./IPCB_Primitive.md) \| undefined \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md)<!-- -->> \| Promise<[IPCB\_Primitive](./IPCB_Primitive.md) \| undefined>
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### create
# IPCB\_PrimitiveAPI.create property
## Signature
```typescript
create: (...args: any[]) => IPCB_Primitive | undefined | Promise<IPCB_Primitive> | Promise<IPCB_Primitive | undefined>;
```
### delete
# IPCB\_PrimitiveAPI.delete property
## Signature
```typescript
delete: (primitiveIds: string | any | Array<string> | Array<any>) => boolean | Promise<boolean>;
```
### get
# IPCB\_PrimitiveAPI.get property
## Signature
```typescript
get: {
(primitiveIds: string): IPCB_Primitive | undefined | Promise<IPCB_Primitive | undefined>;
(primitiveIds: Array<string>): Array<IPCB_Primitive> | Promise<Array<IPCB_Primitive>>;
};
```
### getall
# IPCB\_PrimitiveAPI.getAll property
## Signature
```typescript
getAll: (...args: any[]) => Array<IPCB_Primitive> | Promise<Array<IPCB_Primitive>>;
```
### getallprimitiveid
# IPCB\_PrimitiveAPI.getAllPrimitiveId property
## Signature
```typescript
getAllPrimitiveId: (...args: any[]) => Array<string> | Promise<Array<string>>;
```
### modify
# IPCB\_PrimitiveAPI.modify property
## Signature
```typescript
modify: (primitiveId: string | any, ...args: any[]) => IPCB_Primitive | undefined | Promise<IPCB_Primitive> | Promise<IPCB_Primitive | undefined>;
```
FILE:references/interfaces/IPCB_PrimitivePouredPourFill.md
# IPCB\_PrimitivePouredPourFill interface
覆铜填充区域
## Signature
```typescript
interface IPCB_PrimitivePouredPourFill
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[fill](./IPCB_PrimitivePouredPourFill.md)
</td><td>
</td><td>
boolean
</td><td>
是否填充
</td></tr>
<tr><td>
[id](./IPCB_PrimitivePouredPourFill.md)
</td><td>
</td><td>
string
</td><td>
ID
</td></tr>
<tr><td>
[lineWidth](./IPCB_PrimitivePouredPourFill.md)
</td><td>
</td><td>
number
</td><td>
线宽
</td></tr>
<tr><td>
[path](./IPCB_PrimitivePouredPourFill.md)
</td><td>
</td><td>
[IPCB\_ComplexPolygon](../classes/IPCB_ComplexPolygon.md)
</td><td>
复杂多边形
</td></tr>
</tbody></table>
---
## 属性详情
### fill
# IPCB\_PrimitivePouredPourFill.fill property
是否填充
## Signature
```typescript
fill: boolean;
```
### id
# IPCB\_PrimitivePouredPourFill.id property
ID
## Signature
```typescript
id: string;
```
### linewidth
# IPCB\_PrimitivePouredPourFill.lineWidth property
线宽
## Signature
```typescript
lineWidth: number;
```
### path
# IPCB\_PrimitivePouredPourFill.path property
复杂多边形
## Signature
```typescript
path: IPCB_ComplexPolygon;
```
FILE:references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md
# IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion interface
阻焊/助焊扩展
## Signature
```typescript
interface IPCB_PrimitiveSolderMaskAndPasteMaskExpansion
```
## Remarks
本参数设置包含以下三类情况:
1. 当图元为顶层/底层贴片焊盘时,允许设置对应层的阻焊/助焊扩展,其余设置不生效
2. 当图元为通孔焊盘时,允许设置顶层/底层的阻焊扩展,助焊扩展的设置不生效
3. 当图元为过孔时,允许设置顶层/底层的阻焊扩展,助焊扩展的设置不生效,如若为盲孔,则视其暴露层生效其阻焊扩展设置
助焊扩展在一般情况下仅用于钢网生产等特定用途,不了解其作用请安心地忽略其参数设置
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[bottomPasteMask?](./IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 底层助焊扩展
</td></tr>
<tr><td>
[bottomSolderMask?](./IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 底层阻焊扩展
</td></tr>
<tr><td>
[topPasteMask?](./IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 顶层助焊扩展
</td></tr>
<tr><td>
[topSolderMask?](./IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ 顶层阻焊扩展
</td></tr>
</tbody></table>
---
## 属性详情
### bottompastemask
# IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion.bottomPasteMask property
底层助焊扩展
## Signature
```typescript
bottomPasteMask?: number;
```
### bottomsoldermask
# IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion.bottomSolderMask property
底层阻焊扩展
## Signature
```typescript
bottomSolderMask?: number;
```
### toppastemask
# IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion.topPasteMask property
顶层助焊扩展
## Signature
```typescript
topPasteMask?: number;
```
### topsoldermask
# IPCB\_PrimitiveSolderMaskAndPasteMaskExpansion.topSolderMask property
顶层阻焊扩展
## Signature
```typescript
topSolderMask?: number;
```
FILE:references/interfaces/ISCH_NetInfo.md
# ISCH\_NetInfo interface
网络属性
## Signature
```typescript
interface ISCH_NetInfo
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[net](./ISCH_NetInfo.md)
</td><td>
</td><td>
string
</td><td>
网络名称
</td></tr>
<tr><td>
[wires](./ISCH_NetInfo.md)
</td><td>
</td><td>
Array<[ISCH\_WireInfo](./ISCH_WireInfo.md)<!-- -->>
</td><td>
导线
</td></tr>
</tbody></table>
---
## 属性详情
### net
# ISCH\_NetInfo.net property
网络名称
## Signature
```typescript
net: string;
```
### wires
# ISCH\_NetInfo.wires property
导线
## Signature
```typescript
wires: Array<ISCH_WireInfo>;
```
FILE:references/interfaces/ISCH_Primitive.md
# ISCH\_Primitive interface
原理图图元
## Signature
```typescript
interface ISCH_Primitive
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ISCH\_Primitive](./ISCH_Primitive.md) \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[done](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ISCH\_Primitive](./ISCH_Primitive.md) \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[getState\_PrimitiveId](./ISCH_Primitive.md)
</td><td>
</td><td>
() => string
</td><td>
</td></tr>
<tr><td>
[getState\_PrimitiveType](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ESCH\_PrimitiveType](../enums/ESCH_PrimitiveType.md)
</td><td>
</td></tr>
<tr><td>
[isAsync](./ISCH_Primitive.md)
</td><td>
</td><td>
() => boolean
</td><td>
</td></tr>
<tr><td>
[reset](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ISCH\_Primitive](./ISCH_Primitive.md) \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->>
</td><td>
</td></tr>
<tr><td>
[toAsync](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ISCH\_Primitive](./ISCH_Primitive.md)
</td><td>
</td></tr>
<tr><td>
[toSync](./ISCH_Primitive.md)
</td><td>
</td><td>
() => [ISCH\_Primitive](./ISCH_Primitive.md)
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### create
# ISCH\_Primitive.create property
## Signature
```typescript
create: () => ISCH_Primitive | Promise<ISCH_Primitive>;
```
### done
# ISCH\_Primitive.done property
## Signature
```typescript
done: () => ISCH_Primitive | Promise<ISCH_Primitive>;
```
### getstate_primitiveid
# ISCH\_Primitive.getState\_PrimitiveId property
## Signature
```typescript
getState_PrimitiveId: () => string;
```
### getstate_primitivetype
# ISCH\_Primitive.getState\_PrimitiveType property
## Signature
```typescript
getState_PrimitiveType: () => ESCH_PrimitiveType;
```
### isasync
# ISCH\_Primitive.isAsync property
## Signature
```typescript
isAsync: () => boolean;
```
### reset
# ISCH\_Primitive.reset property
## Signature
```typescript
reset: () => ISCH_Primitive | Promise<ISCH_Primitive>;
```
### toasync
# ISCH\_Primitive.toAsync property
## Signature
```typescript
toAsync: () => ISCH_Primitive;
```
### tosync
# ISCH\_Primitive.toSync property
## Signature
```typescript
toSync: () => ISCH_Primitive;
```
FILE:references/interfaces/ISCH_PrimitiveAPI.md
# ISCH\_PrimitiveAPI interface
原理图图元接口
## Signature
```typescript
interface ISCH_PrimitiveAPI
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[create](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => [ISCH\_Primitive](./ISCH_Primitive.md) \| undefined \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->> \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md) \| undefined>
</td><td>
</td></tr>
<tr><td>
[delete](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
(primitiveIds: string \| any \| Array<string> \| Array<any>) => boolean \| Promise<boolean>
</td><td>
</td></tr>
<tr><td>
[get](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
{ (primitiveIds: string): [ISCH\_Primitive](./ISCH_Primitive.md) \| undefined \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md) \| undefined>; (primitiveIds: Array<string>): Array<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->> \| Promise<Array<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->>>; }
</td><td>
</td></tr>
<tr><td>
[getAll](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => Array<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->> \| Promise<Array<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->>>
</td><td>
</td></tr>
<tr><td>
[getAllPrimitiveId](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
(...args: any\[\]) => Array<string> \| Promise<Array<string>>
</td><td>
</td></tr>
<tr><td>
[modify](./ISCH_PrimitiveAPI.md)
</td><td>
</td><td>
(primitiveId: string \| any, ...args: any\[\]) => [ISCH\_Primitive](./ISCH_Primitive.md) \| undefined \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md)<!-- -->> \| Promise<[ISCH\_Primitive](./ISCH_Primitive.md) \| undefined>
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### create
# ISCH\_PrimitiveAPI.create property
## Signature
```typescript
create: (...args: any[]) => ISCH_Primitive | undefined | Promise<ISCH_Primitive> | Promise<ISCH_Primitive | undefined>;
```
### delete
# ISCH\_PrimitiveAPI.delete property
## Signature
```typescript
delete: (primitiveIds: string | any | Array<string> | Array<any>) => boolean | Promise<boolean>;
```
### get
# ISCH\_PrimitiveAPI.get property
## Signature
```typescript
get: {
(primitiveIds: string): ISCH_Primitive | undefined | Promise<ISCH_Primitive | undefined>;
(primitiveIds: Array<string>): Array<ISCH_Primitive> | Promise<Array<ISCH_Primitive>>;
};
```
### getall
# ISCH\_PrimitiveAPI.getAll property
## Signature
```typescript
getAll: (...args: any[]) => Array<ISCH_Primitive> | Promise<Array<ISCH_Primitive>>;
```
### getallprimitiveid
# ISCH\_PrimitiveAPI.getAllPrimitiveId property
## Signature
```typescript
getAllPrimitiveId: (...args: any[]) => Array<string> | Promise<Array<string>>;
```
### modify
# ISCH\_PrimitiveAPI.modify property
## Signature
```typescript
modify: (primitiveId: string | any, ...args: any[]) => ISCH_Primitive | undefined | Promise<ISCH_Primitive> | Promise<ISCH_Primitive | undefined>;
```
FILE:references/interfaces/ISCH_ProjectNetInfo.md
# ISCH\_ProjectNetInfo interface
工程网络属性
## Signature
```typescript
interface ISCH_ProjectNetInfo
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[boardName](./ISCH_ProjectNetInfo.md)
</td><td>
</td><td>
string
</td><td>
板子名称
</td></tr>
<tr><td>
[nets](./ISCH_ProjectNetInfo.md)
</td><td>
</td><td>
Array<[ISCH\_NetInfo](./ISCH_NetInfo.md)<!-- -->>
</td><td>
网络
</td></tr>
<tr><td>
[schematicName](./ISCH_ProjectNetInfo.md)
</td><td>
</td><td>
string
</td><td>
原理图名称
</td></tr>
<tr><td>
[schematicUuid](./ISCH_ProjectNetInfo.md)
</td><td>
</td><td>
string
</td><td>
原理图 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### boardname
# ISCH\_ProjectNetInfo.boardName property
板子名称
## Signature
```typescript
boardName: string;
```
### nets
# ISCH\_ProjectNetInfo.nets property
网络
## Signature
```typescript
nets: Array<ISCH_NetInfo>;
```
### schematicname
# ISCH\_ProjectNetInfo.schematicName property
原理图名称
## Signature
```typescript
schematicName: string;
```
### schematicuuid
# ISCH\_ProjectNetInfo.schematicUuid property
原理图 UUID
## Signature
```typescript
schematicUuid: string;
```
FILE:references/interfaces/ISCH_WireInfo.md
# ISCH\_WireInfo interface
导线属性
## Signature
```typescript
interface ISCH_WireInfo
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[globalNetName](./ISCH_WireInfo.md)
</td><td>
</td><td>
string
</td><td>
全局网络名
</td></tr>
<tr><td>
[id](./ISCH_WireInfo.md)
</td><td>
</td><td>
string
</td><td>
ID
</td></tr>
<tr><td>
[name](./ISCH_WireInfo.md)
</td><td>
</td><td>
string
</td><td>
导线名称
</td></tr>
<tr><td>
[pageName](./ISCH_WireInfo.md)
</td><td>
</td><td>
string
</td><td>
原理图图页名称
</td></tr>
<tr><td>
[pageUuid](./ISCH_WireInfo.md)
</td><td>
</td><td>
string
</td><td>
原理图图页 UUID
</td></tr>
</tbody></table>
---
## 属性详情
### globalnetname
# ISCH\_WireInfo.globalNetName property
全局网络名
## Signature
```typescript
globalNetName: string;
```
### id
# ISCH\_WireInfo.id property
ID
## Signature
```typescript
id: string;
```
### name
# ISCH\_WireInfo.name property
导线名称
## Signature
```typescript
name: string;
```
### pagename
# ISCH\_WireInfo.pageName property
原理图图页名称
## Signature
```typescript
pageName: string;
```
### pageuuid
# ISCH\_WireInfo.pageUuid property
原理图图页 UUID
## Signature
```typescript
pageUuid: string;
```
FILE:references/interfaces/ISYS_FileSystemFileList.md
# ISYS\_FileSystemFileList interface
文件系统文件路径
## Signature
```typescript
interface ISYS_FileSystemFileList
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[fileName](./ISYS_FileSystemFileList.md)
</td><td>
</td><td>
string
</td><td>
文件名(前后均无斜杠)
</td></tr>
<tr><td>
[fullPath](./ISYS_FileSystemFileList.md)
</td><td>
</td><td>
string
</td><td>
完整路径,包含文件名的绝对路径
</td></tr>
<tr><td>
[isDirectory](./ISYS_FileSystemFileList.md)
</td><td>
</td><td>
boolean
</td><td>
是否为目录
</td></tr>
<tr><td>
[relativePath?](./ISYS_FileSystemFileList.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 相对路径,不包含前面的传入路径和文件名(当没有传入路径时,不存在相对路径),且前后均无斜杠
</td></tr>
<tr><td>
[subFiles?](./ISYS_FileSystemFileList.md)
</td><td>
</td><td>
Array<[ISYS\_FileSystemFileList](./ISYS_FileSystemFileList.md)<!-- -->>
</td><td>
_(Optional)_ 目录子文件
</td></tr>
</tbody></table>
---
## 属性详情
### filename
# ISYS\_FileSystemFileList.fileName property
文件名(前后均无斜杠)
## Signature
```typescript
fileName: string;
```
### fullpath
# ISYS\_FileSystemFileList.fullPath property
完整路径,包含文件名的绝对路径
## Signature
```typescript
fullPath: string;
```
### isdirectory
# ISYS\_FileSystemFileList.isDirectory property
是否为目录
## Signature
```typescript
isDirectory: boolean;
```
### relativepath
# ISYS\_FileSystemFileList.relativePath property
相对路径,不包含前面的传入路径和文件名(当没有传入路径时,不存在相对路径),且前后均无斜杠
## Signature
```typescript
relativePath?: string;
```
### subfiles
# ISYS\_FileSystemFileList.subFiles property
目录子文件
## Signature
```typescript
subFiles?: Array<ISYS_FileSystemFileList>;
```
FILE:references/interfaces/ISYS_HeaderMenuSub1MenuItem.md
# ISYS\_HeaderMenuSub1MenuItem interface
顶部二级菜单项
## Signature
```typescript
interface ISYS_HeaderMenuSub1MenuItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[icon?](./ISYS_HeaderMenuSub1MenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 菜单项图标
</td></tr>
<tr><td>
[id](./ISYS_HeaderMenuSub1MenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项 ID,不可重复
</td></tr>
<tr><td>
[menuItems?](./ISYS_HeaderMenuSub1MenuItem.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuSub2MenuItem](./ISYS_HeaderMenuSub2MenuItem.md) \| null>
</td><td>
_(Optional)_ 子菜单项
</td></tr>
<tr><td>
[registerFn?](./ISYS_HeaderMenuSub1MenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 注册方法名称(需要在扩展入口文件导出该方法)
</td></tr>
<tr><td>
[title](./ISYS_HeaderMenuSub1MenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项标题
</td></tr>
</tbody></table>
---
## 属性详情
### icon
# ISYS\_HeaderMenuSub1MenuItem.icon property
菜单项图标
## Signature
```typescript
icon?: string;
```
### id
# ISYS\_HeaderMenuSub1MenuItem.id property
菜单项 ID,不可重复
## Signature
```typescript
id: string;
```
### menuitems
# ISYS\_HeaderMenuSub1MenuItem.menuItems property
子菜单项
## Signature
```typescript
menuItems?: Array<ISYS_HeaderMenuSub2MenuItem | null>;
```
### title
# ISYS\_HeaderMenuSub1MenuItem.title property
菜单项标题
## Signature
```typescript
title: string;
```
---
## 方法详情
### registerfn
# ISYS\_HeaderMenuSub1MenuItem.registerFn property
注册方法名称(需要在扩展入口文件导出该方法)
## Signature
```typescript
registerFn?: string;
```
FILE:references/interfaces/ISYS_HeaderMenuSub2MenuItem.md
# ISYS\_HeaderMenuSub2MenuItem interface
顶部三级菜单项
## Signature
```typescript
interface ISYS_HeaderMenuSub2MenuItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[icon?](./ISYS_HeaderMenuSub2MenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 菜单项图标
</td></tr>
<tr><td>
[id](./ISYS_HeaderMenuSub2MenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项 ID,不可重复
</td></tr>
<tr><td>
[registerFn?](./ISYS_HeaderMenuSub2MenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 注册方法名称(需要在扩展入口文件导出该方法)
</td></tr>
<tr><td>
[title](./ISYS_HeaderMenuSub2MenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项标题
</td></tr>
</tbody></table>
---
## 属性详情
### icon
# ISYS\_HeaderMenuSub2MenuItem.icon property
菜单项图标
## Signature
```typescript
icon?: string;
```
### id
# ISYS\_HeaderMenuSub2MenuItem.id property
菜单项 ID,不可重复
## Signature
```typescript
id: string;
```
### title
# ISYS\_HeaderMenuSub2MenuItem.title property
菜单项标题
## Signature
```typescript
title: string;
```
---
## 方法详情
### registerfn
# ISYS\_HeaderMenuSub2MenuItem.registerFn property
注册方法名称(需要在扩展入口文件导出该方法)
## Signature
```typescript
registerFn?: string;
```
FILE:references/interfaces/ISYS_HeaderMenuTopMenuItem.md
# ISYS\_HeaderMenuTopMenuItem interface
顶部一级菜单项
## Signature
```typescript
interface ISYS_HeaderMenuTopMenuItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[id](./ISYS_HeaderMenuTopMenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项 ID,不可重复
</td></tr>
<tr><td>
[menuItems?](./ISYS_HeaderMenuTopMenuItem.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuSub1MenuItem](./ISYS_HeaderMenuSub1MenuItem.md) \| null>
</td><td>
_(Optional)_ 子菜单项
</td></tr>
<tr><td>
[registerFn?](./ISYS_HeaderMenuTopMenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 注册方法名称(需要在扩展入口文件导出该方法)
</td></tr>
<tr><td>
[title](./ISYS_HeaderMenuTopMenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项标题
</td></tr>
</tbody></table>
---
## 属性详情
### id
# ISYS\_HeaderMenuTopMenuItem.id property
菜单项 ID,不可重复
## Signature
```typescript
id: string;
```
### menuitems
# ISYS\_HeaderMenuTopMenuItem.menuItems property
子菜单项
## Signature
```typescript
menuItems?: Array<ISYS_HeaderMenuSub1MenuItem | null>;
```
### title
# ISYS\_HeaderMenuTopMenuItem.title property
菜单项标题
## Signature
```typescript
title: string;
```
---
## 方法详情
### registerfn
# ISYS\_HeaderMenuTopMenuItem.registerFn property
注册方法名称(需要在扩展入口文件导出该方法)
## Signature
```typescript
registerFn?: string;
```
FILE:references/interfaces/ISYS_HeaderMenus.md
# ISYS\_HeaderMenus interface
顶部菜单项
## Signature
```typescript
interface ISYS_HeaderMenus
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[blank?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 空白页
</td></tr>
<tr><td>
[footprint?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 封装
</td></tr>
<tr><td>
[home?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 主页
</td></tr>
<tr><td>
[panel?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 面板
</td></tr>
<tr><td>
[panelView?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 面板预览
</td></tr>
<tr><td>
[pcb?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ PCB
</td></tr>
<tr><td>
[pcbView?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ PCB 预览(包括 2D、3D 预览)
</td></tr>
<tr><td>
[sch?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 原理图
</td></tr>
<tr><td>
[schematic?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 原理图
</td></tr>
<tr><td>
[symbol?](./ISYS_HeaderMenus.md)
</td><td>
</td><td>
Array<[ISYS\_HeaderMenuTopMenuItem](./ISYS_HeaderMenuTopMenuItem.md)<!-- -->>
</td><td>
_(Optional)_ 符号(包括 CBB 符号)
</td></tr>
</tbody></table>
---
## 属性详情
### blank
# ISYS\_HeaderMenus.blank property
空白页
## Signature
```typescript
blank?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### footprint
# ISYS\_HeaderMenus.footprint property
封装
## Signature
```typescript
footprint?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### home
# ISYS\_HeaderMenus.home property
主页
## Signature
```typescript
home?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### panel
# ISYS\_HeaderMenus.panel property
面板
## Signature
```typescript
panel?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### panelview
# ISYS\_HeaderMenus.panelView property
面板预览
## Signature
```typescript
panelView?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### pcb
# ISYS\_HeaderMenus.pcb property
PCB
## Signature
```typescript
pcb?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### pcbview
# ISYS\_HeaderMenus.pcbView property
PCB 预览(包括 2D、3D 预览)
## Signature
```typescript
pcbView?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### sch
# ISYS\_HeaderMenus.sch property
> Warning: This API is now obsolete.
>
> 请使用 `schematic` 替代 `sch`
原理图
## Signature
```typescript
sch?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### schematic
# ISYS\_HeaderMenus.schematic property
原理图
## Signature
```typescript
schematic?: Array<ISYS_HeaderMenuTopMenuItem>;
```
### symbol
# ISYS\_HeaderMenus.symbol property
符号(包括 CBB 符号)
## Signature
```typescript
symbol?: Array<ISYS_HeaderMenuTopMenuItem>;
```
FILE:references/interfaces/ISYS_LanguageKeyValuePairs.md
# ISYS\_LanguageKeyValuePairs interface
语言数据键值对
## Signature
```typescript
interface ISYS_LanguageKeyValuePairs
```
## Remarks
单一语言的数据
FILE:references/interfaces/ISYS_LogLine.md
# ISYS\_LogLine interface
日志行
## Signature
```typescript
interface ISYS_LogLine
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[message](./ISYS_LogLine.md)
</td><td>
</td><td>
string
</td><td>
日志内容
</td></tr>
<tr><td>
[timestamp](./ISYS_LogLine.md)
</td><td>
</td><td>
number
</td><td>
时间戳
</td></tr>
<tr><td>
[type](./ISYS_LogLine.md)
</td><td>
</td><td>
[ESYS\_LogType](../enums/ESYS_LogType.md)
</td><td>
日志类型
</td></tr>
</tbody></table>
---
## 属性详情
### message
# ISYS\_LogLine.message property
日志内容
## Signature
```typescript
message: string;
```
### timestamp
# ISYS\_LogLine.timestamp property
时间戳
## Signature
```typescript
timestamp: number;
```
### type
# ISYS\_LogLine.type property
日志类型
## Signature
```typescript
type: ESYS_LogType;
```
FILE:references/interfaces/ISYS_MessageBusTask.md
# ISYS\_MessageBusTask interface
消息总线任务
## Signature
```typescript
interface ISYS_MessageBusTask
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[cancel](./ISYS_MessageBusTask.md)
</td><td>
</td><td>
() => void
</td><td>
调用以取消任务
</td></tr>
<tr><td>
[execute](./ISYS_MessageBusTask.md)
</td><td>
</td><td>
(message: any) => Promise<void>
</td><td>
任务处理
</td></tr>
<tr><td>
[running](./ISYS_MessageBusTask.md)
</td><td>
</td><td>
() => boolean
</td><td>
检查运行状态
</td></tr>
</tbody></table>
---
## 属性详情
### cancel
# ISYS\_MessageBusTask.cancel property
调用以取消任务
## Signature
```typescript
cancel: () => void;
```
### execute
# ISYS\_MessageBusTask.execute property
任务处理
## Signature
```typescript
execute: (message: any) => Promise<void>;
```
### running
# ISYS\_MessageBusTask.running property
检查运行状态
## Signature
```typescript
running: () => boolean;
```
FILE:references/interfaces/ISYS_MultilingualLanguagesData.md
# ISYS\_MultilingualLanguagesData interface
多语言数据
## Signature
```typescript
interface ISYS_MultilingualLanguagesData
```
## Remarks
包含同一命名空间下的多种语言的数据
FILE:references/interfaces/ISYS_ReactComponentizationDialogInterface.md
# ISYS\_ReactComponentizationDialogInterface interface
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
React 组件化弹出窗口接口
## Signature
```typescript
interface ISYS_ReactComponentizationDialogInterface
```
## Remarks
此接口提供了创建 React 组件化弹出窗口所需的所有功能。 通过此接口,用户可以使用 lc-editor-design 提供的预制组件创建自定义弹窗。
## Example
```typescript
const { Components, WorkerPortal, VirtualRender } = await eda.sys_Dialog.createReactComponentizationDialogInterface(
{
createContext: React.createContext,
useContext: React.useContext,
useRef: React.useRef,
useEffect: React.useEffect,
createElement: React.createElement,
},
{
default: Reconciler,
constants: {
ContinuousEventPriority,
DiscreteEventPriority,
DefaultEventPriority,
ConcurrentRoot,
},
},
);
const portal = new WorkerPortal();
const root = new VirtualRender();
function MyDialog() {
return (
<Modal defaultTop={100} defaultLeft={100} defaultWidth={800} defaultHeight={600}>
<Dialog title="My Dialog">
<Input placeholder="Enter text" />
</Dialog>
</Modal>
);
}
root.render(
<portal.Provider>
<MyDialog />
</portal.Provider>,
);
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[Components](./ISYS_ReactComponentizationDialogInterface.md)
</td><td>
</td><td>
[LC\_DESIGN\_COMPONENTS](../types/LC_DESIGN_COMPONENTS.md)
</td><td>
**_(ALPHA)_** 预制组件
</td></tr>
<tr><td>
[LC\_DESIGN\_COMPONENTS\_NAMES](./ISYS_ReactComponentizationDialogInterface.md)
</td><td>
</td><td>
typeof LC\_DESIGN\_COMPONENTS\_NAMES
</td><td>
**_(ALPHA)_** 组件名称常量
</td></tr>
<tr><td>
[VirtualRender](./ISYS_ReactComponentizationDialogInterface.md)
</td><td>
</td><td>
new () => [ISYS\_ReactComponentizationDialogVirtualRender](./ISYS_ReactComponentizationDialogVirtualRender.md)
</td><td>
**_(ALPHA)_** VirtualRender 类
</td></tr>
<tr><td>
[WorkerPortal](./ISYS_ReactComponentizationDialogInterface.md)
</td><td>
</td><td>
new () => [ISYS\_ReactComponentizationDialogWorkerPortal](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
**_(ALPHA)_** WorkerPortal 类
</td></tr>
</tbody></table>
---
## 属性详情
### components
# ISYS\_ReactComponentizationDialogInterface.Components property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
预制组件
## Signature
```typescript
Components: LC_DESIGN_COMPONENTS;
```
## Remarks
包含所有 lc-editor-design 提供的预制组件,如 Modal、Dialog、Input、Button 等。
### lc_design_components_names
# ISYS\_ReactComponentizationDialogInterface.LC\_DESIGN\_COMPONENTS\_NAMES property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
组件名称常量
## Signature
```typescript
LC_DESIGN_COMPONENTS_NAMES: typeof LC_DESIGN_COMPONENTS_NAMES;
```
## Remarks
包含所有预制组件的名称常量,用于类型安全的组件引用。
### virtualrender
# ISYS\_ReactComponentizationDialogInterface.VirtualRender property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
VirtualRender 类
## Signature
```typescript
VirtualRender: new () => ISYS_ReactComponentizationDialogVirtualRender;
```
## Remarks
用于在虚拟环境中渲染 React 组件。 需要实例化后使用。
### workerportal
# ISYS\_ReactComponentizationDialogInterface.WorkerPortal property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
WorkerPortal 类
## Signature
```typescript
WorkerPortal: new () => ISYS_ReactComponentizationDialogWorkerPortal;
```
## Remarks
用于管理组件的生命周期和事件处理。 需要实例化后使用。
FILE:references/interfaces/ISYS_ReactComponentizationDialogReactInstance.md
# ISYS\_ReactComponentizationDialogReactInstance interface
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
React 实例接口 用于接收扩展的 React 实例
## Signature
```typescript
interface ISYS_ReactComponentizationDialogReactInstance
```
## Remarks
此接口定义了从扩展传递的 React 实例的方法。 由于扩展和 pro-api 使用不同的 React 实例,需要通过此接口传递 React 方法。
## Example
```typescript
const ReactInstance = {
createContext: React.createContext,
useContext: React.useContext,
useRef: React.useRef,
useEffect: React.useEffect,
createElement: React.createElement,
};
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createContext](./ISYS_ReactComponentizationDialogReactInstance.md)
</td><td>
</td><td>
<T>(defaultValue: T) => React.Context<T>
</td><td>
**_(ALPHA)_** 创建 React Context
</td></tr>
<tr><td>
[createElement](./ISYS_ReactComponentizationDialogReactInstance.md)
</td><td>
</td><td>
<P extends Record<string, unknown>>(type: React.ElementType<P>, props?: P \| null, ...children: React.ReactNode\[\]) => React.ReactElement<P>
</td><td>
**_(ALPHA)_** 创建并返回指定类型的新 React 元素
</td></tr>
<tr><td>
[useContext](./ISYS_ReactComponentizationDialogReactInstance.md)
</td><td>
</td><td>
<T>(context: React.Context<T>) => T
</td><td>
**_(ALPHA)_** 读取和订阅 Context 的值
</td></tr>
<tr><td>
[useEffect](./ISYS_ReactComponentizationDialogReactInstance.md)
</td><td>
</td><td>
(effect: () => undefined \| (() => undefined), deps?: React.DependencyList) => void
</td><td>
**_(ALPHA)_** 执行副作用操作
</td></tr>
<tr><td>
[useRef](./ISYS_ReactComponentizationDialogReactInstance.md)
</td><td>
</td><td>
<T>(initialValue: T) => React.MutableRefObject<T>
</td><td>
**_(ALPHA)_** 创建一个可变的 ref 对象
</td></tr>
</tbody></table>
---
## 属性详情
### createcontext
# ISYS\_ReactComponentizationDialogReactInstance.createContext property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建 React Context
## Signature
```typescript
createContext: <T>(defaultValue: T) => React.Context<T>;
```
### createelement
# ISYS\_ReactComponentizationDialogReactInstance.createElement property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建并返回指定类型的新 React 元素
## Signature
```typescript
createElement: <P extends Record<string, unknown>>(type: React.ElementType<P>, props?: P | null, ...children: React.ReactNode[]) => React.ReactElement<P>;
```
### usecontext
# ISYS\_ReactComponentizationDialogReactInstance.useContext property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
读取和订阅 Context 的值
## Signature
```typescript
useContext: <T>(context: React.Context<T>) => T;
```
### useeffect
# ISYS\_ReactComponentizationDialogReactInstance.useEffect property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
执行副作用操作
## Signature
```typescript
useEffect: (effect: () => undefined | (() => undefined), deps?: React.DependencyList) => void;
```
### useref
# ISYS\_ReactComponentizationDialogReactInstance.useRef property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建一个可变的 ref 对象
## Signature
```typescript
useRef: <T>(initialValue: T) => React.MutableRefObject<T>;
```
FILE:references/interfaces/ISYS_ReactComponentizationDialogReconcilerInstance.md
# ISYS\_ReactComponentizationDialogReconcilerInstance interface
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
React Reconciler 实例接口 用于接收扩展的 react-reconciler 实例
## Signature
```typescript
interface ISYS_ReactComponentizationDialogReconcilerInstance
```
## Remarks
此接口定义了从扩展传递的 react-reconciler 实例。 react-reconciler 是 React 的自定义渲染器,用于实现虚拟 DOM 渲染。
## Example
```typescript
const ReconcilerInstance = {
default: Reconciler,
constants: {
ContinuousEventPriority,
DiscreteEventPriority,
DefaultEventPriority,
ConcurrentRoot,
},
};
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[constants](./ISYS_ReactComponentizationDialogReconcilerInstance.md)
</td><td>
</td><td>
\{ ContinuousEventPriority: number; DiscreteEventPriority: number; DefaultEventPriority: number; ConcurrentRoot: number; \}
</td><td>
**_(ALPHA)_** Reconciler 常量
</td></tr>
<tr><td>
[default](./ISYS_ReactComponentizationDialogReconcilerInstance.md)
</td><td>
</td><td>
any
</td><td>
**_(ALPHA)_** Reconciler 构造函数
</td></tr>
</tbody></table>
---
## 属性详情
### constants
# ISYS\_ReactComponentizationDialogReconcilerInstance.constants property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Reconciler 常量
## Signature
```typescript
constants: {
ContinuousEventPriority: number;
DiscreteEventPriority: number;
DefaultEventPriority: number;
ConcurrentRoot: number;
};
```
### default
# ISYS\_ReactComponentizationDialogReconcilerInstance.default property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Reconciler 构造函数
## Signature
```typescript
default: any;
```
FILE:references/interfaces/ISYS_ReactComponentizationDialogVirtualRender.md
# ISYS\_ReactComponentizationDialogVirtualRender interface
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
VirtualRender 类接口 用于在虚拟环境中渲染 React 组件
## Signature
```typescript
interface ISYS_ReactComponentizationDialogVirtualRender
```
## Remarks
VirtualRender 使用 react-reconciler 实现虚拟 DOM 渲染, 不直接操作真实 DOM,而是通过消息机制与 EditorDesignPortal 通信。
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[render](./ISYS_ReactComponentizationDialogVirtualRender.md)
</td><td>
</td><td>
(element: React.ReactNode) => void
</td><td>
**_(ALPHA)_** 渲染 React 元素
</td></tr>
</tbody></table>
---
## 属性详情
### render
# ISYS\_ReactComponentizationDialogVirtualRender.render property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
渲染 React 元素
## Signature
```typescript
render: (element: React.ReactNode) => void;
```
FILE:references/interfaces/ISYS_ReactComponentizationDialogWorkerPortal.md
# ISYS\_ReactComponentizationDialogWorkerPortal interface
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
WorkerPortal 类接口 用于管理组件的生命周期和事件处理
## Signature
```typescript
interface ISYS_ReactComponentizationDialogWorkerPortal
```
## Remarks
WorkerPortal 负责在虚拟环境中创建、更新和销毁组件, 并通过消息机制与 EditorDesignPortal 通信。
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[bindEvent](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
(handle: string, callback: (event: unknown) => void) => void
</td><td>
**_(ALPHA)_** 绑定事件处理器
</td></tr>
<tr><td>
[createComponent](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
(handle: string, type: string, props: Record<string, unknown>, parent: string) => void
</td><td>
**_(ALPHA)_** 创建组件
</td></tr>
<tr><td>
[detachComponent](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
(handle: string) => void
</td><td>
**_(ALPHA)_** 销毁组件
</td></tr>
<tr><td>
[dispatchEvent](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
(handle: string, event: unknown) => void
</td><td>
**_(ALPHA)_** 触发事件
</td></tr>
<tr><td>
[Provider](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
React.ComponentType<React.PropsWithChildren<unknown>>
</td><td>
**_(ALPHA)_** Provider 组件 用于提供 PortalContext 给子组件
</td></tr>
<tr><td>
[updateComponent](./ISYS_ReactComponentizationDialogWorkerPortal.md)
</td><td>
</td><td>
(handle: string, props: Record<string, unknown>) => void
</td><td>
**_(ALPHA)_** 更新组件
</td></tr>
</tbody></table>
---
## 属性详情
### bindevent
# ISYS\_ReactComponentizationDialogWorkerPortal.bindEvent property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
绑定事件处理器
## Signature
```typescript
bindEvent: (handle: string, callback: (event: unknown) => void) => void;
```
### createcomponent
# ISYS\_ReactComponentizationDialogWorkerPortal.createComponent property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
创建组件
## Signature
```typescript
createComponent: (handle: string, type: string, props: Record<string, unknown>, parent: string) => void;
```
### detachcomponent
# ISYS\_ReactComponentizationDialogWorkerPortal.detachComponent property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
销毁组件
## Signature
```typescript
detachComponent: (handle: string) => void;
```
### dispatchevent
# ISYS\_ReactComponentizationDialogWorkerPortal.dispatchEvent property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
触发事件
## Signature
```typescript
dispatchEvent: (handle: string, event: unknown) => void;
```
### provider
# ISYS\_ReactComponentizationDialogWorkerPortal.Provider property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Provider 组件 用于提供 PortalContext 给子组件
## Signature
```typescript
Provider: React.ComponentType<React.PropsWithChildren<unknown>>;
```
### updatecomponent
# ISYS\_ReactComponentizationDialogWorkerPortal.updateComponent property
> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
更新组件
## Signature
```typescript
updateComponent: (handle: string, props: Record<string, unknown>) => void;
```
FILE:references/interfaces/ISYS_RightClickMenuItem.md
# ISYS\_RightClickMenuItem interface
右键菜单项
## Signature
```typescript
interface ISYS_RightClickMenuItem
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[icon?](./ISYS_RightClickMenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 菜单项图标
</td></tr>
<tr><td>
[id](./ISYS_RightClickMenuItem.md)
</td><td>
</td><td>
string
</td><td>
菜单项 ID,不可重复
</td></tr>
<tr><td>
[menuItems?](./ISYS_RightClickMenuItem.md)
</td><td>
</td><td>
Array<[ISYS\_RightClickMenuItem](./ISYS_RightClickMenuItem.md) \| null>
</td><td>
_(Optional)_ 子菜单项
</td></tr>
<tr><td>
[registerFn?](./ISYS_RightClickMenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 注册方法名称(需要在扩展入口文件导出该方法)
</td></tr>
<tr><td>
[title?](./ISYS_RightClickMenuItem.md)
</td><td>
</td><td>
string
</td><td>
_(Optional)_ 菜单项标题
</td></tr>
</tbody></table>
---
## 属性详情
### icon
# ISYS\_RightClickMenuItem.icon property
菜单项图标
## Signature
```typescript
icon?: string;
```
### id
# ISYS\_RightClickMenuItem.id property
菜单项 ID,不可重复
## Signature
```typescript
id: string;
```
### menuitems
# ISYS\_RightClickMenuItem.menuItems property
子菜单项
## Signature
```typescript
menuItems?: Array<ISYS_RightClickMenuItem | null>;
```
### title
# ISYS\_RightClickMenuItem.title property
菜单项标题
## Signature
```typescript
title?: string;
```
---
## 方法详情
### registerfn
# ISYS\_RightClickMenuItem.registerFn property
注册方法名称(需要在扩展入口文件导出该方法)
## Signature
```typescript
registerFn?: string;
```
FILE:references/interfaces/ISYS_WindowEventListenerRemovableObject.md
# ISYS\_WindowEventListenerRemovableObject interface
窗口事件监听可移除对象
## Signature
```typescript
interface ISYS_WindowEventListenerRemovableObject
```
## Remarks
本对象从 [addEventListener](../classes/SYS_Window.md) 获取,并可用于移除创建的事件监听,仅需将其传入 [removeEventListener](../classes/SYS_Window.md)
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[listener](./ISYS_WindowEventListenerRemovableObject.md)
</td><td>
</td><td>
(ev: any) => any
</td><td>
</td></tr>
<tr><td>
[options?](./ISYS_WindowEventListenerRemovableObject.md)
</td><td>
</td><td>
\{ capture?: boolean; \}
</td><td>
_(Optional)_
</td></tr>
<tr><td>
[type](./ISYS_WindowEventListenerRemovableObject.md)
</td><td>
</td><td>
[ESYS\_WindowEventType](../enums/ESYS_WindowEventType.md)
</td><td>
</td></tr>
</tbody></table>
---
## 属性详情
### listener
# ISYS\_WindowEventListenerRemovableObject.listener property
## Signature
```typescript
listener: (ev: any) => any;
```
### options
# ISYS\_WindowEventListenerRemovableObject.options property
## Signature
```typescript
options?: {
capture?: boolean;
};
```
### type
# ISYS\_WindowEventListenerRemovableObject.type property
## Signature
```typescript
type: ESYS_WindowEventType;
```
FILE:references/types/LC_DESIGN_COMPONENTS.md
# LC\_DESIGN\_COMPONENTS type
## Signature
```typescript
type LC_DESIGN_COMPONENTS = {
[K in KComponentsIndex]: (props: ReactComponentProps<K>) => React.ReactElement;
};
```
FILE:references/types/TPCB_LayerTypesOfInnerLayer.md
# TPCB\_LayerTypesOfInnerLayer type
内层允许设置的图层类型
## Signature
```typescript
type TPCB_LayerTypesOfInnerLayer = EPCB_LayerType.SIGNAL | EPCB_LayerType.INTERNAL_ELECTRICAL;
```
## References
[EPCB\_LayerType.SIGNAL](../enums/EPCB_LayerType.md)<!-- -->, [EPCB\_LayerType.INTERNAL\_ELECTRICAL](../enums/EPCB_LayerType.md)
FILE:references/types/TPCB_LayersInTheSelectable.md
# TPCB\_LayersInTheSelectable type
可选中图层
## Signature
```typescript
type TPCB_LayersInTheSelectable = TPCB_LayersOfInner | TPCB_LayersOfCustom | EPCB_LayerId.TOP | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.TOP_SOLDER_MASK | EPCB_LayerId.TOP_PASTE_MASK | EPCB_LayerId.TOP_ASSEMBLY | EPCB_LayerId.TOP_STIFFENER | EPCB_LayerId.BOTTOM | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.BOTTOM_SOLDER_MASK | EPCB_LayerId.BOTTOM_PASTE_MASK | EPCB_LayerId.BOTTOM_ASSEMBLY | EPCB_LayerId.BOTTOM_STIFFENER | EPCB_LayerId.BOARD_OUTLINE | EPCB_LayerId.MULTI | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL | EPCB_LayerId.DRILL_DRAWING | EPCB_LayerId.RATLINE | EPCB_LayerId.COMPONENT_SHAPE | EPCB_LayerId.COMPONENT_MARKING | EPCB_LayerId.PIN_SOLDERING | EPCB_LayerId.PIN_FLOATING | EPCB_LayerId.SHELL_3D_OUTLINE | EPCB_LayerId.SHELL_3D_TOP | EPCB_LayerId.SHELL_3D_BOTTOM;
```
## References
[TPCB\_LayersOfInner](./TPCB_LayersOfInner.md)<!-- -->, [TPCB\_LayersOfCustom](./TPCB_LayersOfCustom.md)<!-- -->, [EPCB\_LayerId.TOP](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_STIFFENER](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_STIFFENER](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOARD\_OUTLINE](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MECHANICAL](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DRILL\_DRAWING](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.RATLINE](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.COMPONENT\_SHAPE](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.COMPONENT\_MARKING](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.PIN\_SOLDERING](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.PIN\_FLOATING](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.SHELL\_3D\_OUTLINE](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.SHELL\_3D\_TOP](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.SHELL\_3D\_BOTTOM](../enums/EPCB_LayerId.md)
## Remarks
此处为所有在编辑器图层菜单中可以选中并设置可见性的图层
FILE:references/types/TPCB_LayersOfComponent.md
# TPCB\_LayersOfComponent type
器件所属层
## Signature
```typescript
type TPCB_LayersOfComponent = EPCB_LayerId.TOP | EPCB_LayerId.BOTTOM;
```
## References
[EPCB\_LayerId.TOP](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfCopper.md
# TPCB\_LayersOfCopper type
铜箔所属层
## Signature
```typescript
type TPCB_LayersOfCopper = TPCB_LayersOfInner | EPCB_LayerId.TOP | EPCB_LayerId.BOTTOM;
```
## References
[TPCB\_LayersOfInner](./TPCB_LayersOfInner.md)<!-- -->, [EPCB\_LayerId.TOP](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM](../enums/EPCB_LayerId.md)
## Remarks
此处为方便单层铜箔层设计,不包含 [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfCustom.md
# TPCB\_LayersOfCustom type
自定义层
## Signature
```typescript
type TPCB_LayersOfCustom = EPCB_LayerId.CUSTOM_1 | EPCB_LayerId.CUSTOM_2 | EPCB_LayerId.CUSTOM_3 | EPCB_LayerId.CUSTOM_4 | EPCB_LayerId.CUSTOM_5 | EPCB_LayerId.CUSTOM_6 | EPCB_LayerId.CUSTOM_7 | EPCB_LayerId.CUSTOM_8 | EPCB_LayerId.CUSTOM_9 | EPCB_LayerId.CUSTOM_10 | EPCB_LayerId.CUSTOM_11 | EPCB_LayerId.CUSTOM_12 | EPCB_LayerId.CUSTOM_13 | EPCB_LayerId.CUSTOM_14 | EPCB_LayerId.CUSTOM_15 | EPCB_LayerId.CUSTOM_16 | EPCB_LayerId.CUSTOM_17 | EPCB_LayerId.CUSTOM_18 | EPCB_LayerId.CUSTOM_19 | EPCB_LayerId.CUSTOM_20 | EPCB_LayerId.CUSTOM_21 | EPCB_LayerId.CUSTOM_22 | EPCB_LayerId.CUSTOM_23 | EPCB_LayerId.CUSTOM_24 | EPCB_LayerId.CUSTOM_25 | EPCB_LayerId.CUSTOM_26 | EPCB_LayerId.CUSTOM_27 | EPCB_LayerId.CUSTOM_28 | EPCB_LayerId.CUSTOM_29 | EPCB_LayerId.CUSTOM_30;
```
## References
[EPCB\_LayerId.CUSTOM\_1](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_2](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_3](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_4](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_5](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_6](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_7](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_8](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_9](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_10](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_11](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_12](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_13](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_14](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_15](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_16](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_17](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_18](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_19](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_20](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_21](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_22](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_23](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_24](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_25](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_26](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_27](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_28](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_29](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.CUSTOM\_30](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfDimension.md
# TPCB\_LayersOfDimension type
尺寸标注所属层
## Signature
```typescript
type TPCB_LayersOfDimension = TPCB_LayersOfCustom | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL;
```
## References
[TPCB\_LayersOfCustom](./TPCB_LayersOfCustom.md)<!-- -->, [EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MECHANICAL](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfFill.md
# TPCB\_LayersOfFill type
填充所属层
## Signature
```typescript
type TPCB_LayersOfFill = TPCB_LayersOfCopper | TPCB_LayersOfCustom | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.TOP_SOLDER_MASK | EPCB_LayerId.TOP_PASTE_MASK | EPCB_LayerId.TOP_ASSEMBLY | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.BOTTOM_SOLDER_MASK | EPCB_LayerId.BOTTOM_PASTE_MASK | EPCB_LayerId.BOTTOM_ASSEMBLY | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL | EPCB_LayerId.MULTI;
```
## References
[TPCB\_LayersOfCopper](./TPCB_LayersOfCopper.md)<!-- -->, [TPCB\_LayersOfCustom](./TPCB_LayersOfCustom.md)<!-- -->, [EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MECHANICAL](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md)
## Remarks
填充所属层为 [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md) 时代表挖槽区域
FILE:references/types/TPCB_LayersOfImage.md
# TPCB\_LayersOfImage type
复杂多边形图(SVG 图像、文本)所属层
## Signature
```typescript
type TPCB_LayersOfImage = TPCB_LayersOfCopper | TPCB_LayersOfCustom | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.TOP_SOLDER_MASK | EPCB_LayerId.TOP_ASSEMBLY | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.BOTTOM_SOLDER_MASK | EPCB_LayerId.BOTTOM_ASSEMBLY | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL | EPCB_LayerId.DRILL_DRAWING;
```
## References
[TPCB\_LayersOfCopper](./TPCB_LayersOfCopper.md)<!-- -->, [TPCB\_LayersOfCustom](./TPCB_LayersOfCustom.md)<!-- -->, [EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MECHANICAL](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DRILL\_DRAWING](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfInner.md
# TPCB\_LayersOfInner type
内层
## Signature
```typescript
type TPCB_LayersOfInner = EPCB_LayerId.INNER_1 | EPCB_LayerId.INNER_2 | EPCB_LayerId.INNER_3 | EPCB_LayerId.INNER_4 | EPCB_LayerId.INNER_5 | EPCB_LayerId.INNER_6 | EPCB_LayerId.INNER_7 | EPCB_LayerId.INNER_8 | EPCB_LayerId.INNER_9 | EPCB_LayerId.INNER_10 | EPCB_LayerId.INNER_11 | EPCB_LayerId.INNER_12 | EPCB_LayerId.INNER_13 | EPCB_LayerId.INNER_14 | EPCB_LayerId.INNER_15 | EPCB_LayerId.INNER_16 | EPCB_LayerId.INNER_17 | EPCB_LayerId.INNER_18 | EPCB_LayerId.INNER_19 | EPCB_LayerId.INNER_20 | EPCB_LayerId.INNER_21 | EPCB_LayerId.INNER_22 | EPCB_LayerId.INNER_23 | EPCB_LayerId.INNER_24 | EPCB_LayerId.INNER_25 | EPCB_LayerId.INNER_26 | EPCB_LayerId.INNER_27 | EPCB_LayerId.INNER_28 | EPCB_LayerId.INNER_29 | EPCB_LayerId.INNER_30;
```
## References
[EPCB\_LayerId.INNER\_1](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_2](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_3](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_4](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_5](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_6](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_7](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_8](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_9](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_10](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_11](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_12](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_13](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_14](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_15](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_16](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_17](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_18](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_19](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_20](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_21](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_22](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_23](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_24](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_25](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_26](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_27](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_28](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_29](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.INNER\_30](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfLine.md
# TPCB\_LayersOfLine type
线所属层
## Signature
```typescript
type TPCB_LayersOfLine = TPCB_LayersOfCopper | TPCB_LayersOfCustom | EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.TOP_SOLDER_MASK | EPCB_LayerId.TOP_PASTE_MASK | EPCB_LayerId.TOP_ASSEMBLY | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.BOTTOM_SOLDER_MASK | EPCB_LayerId.BOTTOM_PASTE_MASK | EPCB_LayerId.BOTTOM_ASSEMBLY | EPCB_LayerId.BOARD_OUTLINE | EPCB_LayerId.DOCUMENT | EPCB_LayerId.MECHANICAL | EPCB_LayerId.DRILL_DRAWING;
```
## References
[TPCB\_LayersOfCopper](./TPCB_LayersOfCopper.md)<!-- -->, [TPCB\_LayersOfCustom](./TPCB_LayersOfCustom.md)<!-- -->, [EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.TOP\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SOLDER\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_PASTE\_MASK](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_ASSEMBLY](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOARD\_OUTLINE](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MECHANICAL](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DRILL\_DRAWING](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfObject.md
# TPCB\_LayersOfObject type
二进制内嵌对象所属层
## Signature
```typescript
type TPCB_LayersOfObject = EPCB_LayerId.TOP_SILKSCREEN | EPCB_LayerId.BOTTOM_SILKSCREEN | EPCB_LayerId.DOCUMENT;
```
## References
[EPCB\_LayerId.TOP\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM\_SILKSCREEN](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.DOCUMENT](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfPad.md
# TPCB\_LayersOfPad type
焊盘所属层
## Signature
```typescript
type TPCB_LayersOfPad = EPCB_LayerId.TOP | EPCB_LayerId.BOTTOM | EPCB_LayerId.MULTI;
```
## References
[EPCB\_LayerId.TOP](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.BOTTOM](../enums/EPCB_LayerId.md)<!-- -->, [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_LayersOfRegion.md
# TPCB\_LayersOfRegion type
区域所属层
## Signature
```typescript
type TPCB_LayersOfRegion = TPCB_LayersOfCopper | EPCB_LayerId.MULTI;
```
## References
[TPCB\_LayersOfCopper](./TPCB_LayersOfCopper.md)<!-- -->, [EPCB\_LayerId.MULTI](../enums/EPCB_LayerId.md)
FILE:references/types/TPCB_PolygonSourceArray.md
# TPCB\_PolygonSourceArray type
单多边形源数组
## Signature
```typescript
type TPCB_PolygonSourceArray = Array<'L' | 'ARC' | 'CARC' | 'C' | 'R' | 'CIRCLE' | number>;
```
## Remarks
单多边形为首尾重合的一条不间断的线所描述的区域,如果首尾不重合将会自动重合。
单多边形的数据格式举例:
`[300, 200, 'L', 400, 200, 'ARC', 400, 220, 15, 'C', 200, 500, 400, 300, 100, 100]`
`['R', 100, 200, 300, 300, 0, 0]`
`['CIRCLE', 100, 200, 5]`
单多边形的数据由以下几种模式组合而成:
① L 直线模式
`x1 y1 L x2 y3 x3 y3 ...`
- `{number}` `x` - 直线点的 X 坐标
- `{number}` `y` - 直线点的 Y 坐标
② ARC/CARC 圆弧模式
`ARC` 为两点交互,`CARC` 为中心圆弧交互
`startX startY ARC arcAngle endX endY`
`startX startY CARC arcAngle endX endY`
- `{number}` `startX` - 起始 X
- `{number}` `startY` - 起始 Y
- `{number}` `arcAngle` - 圆弧角(负值为顺时针旋转;角度制)
- `{number}` `endX` - 终止 X
- `{number}` `endY` - 终止 Y
③ C 三阶贝塞尔模式
`x1 y1 C x2 y2 x3 y3 x4 y4 ...`
- `{number}` `x` - 控制点 X
- `{number}` `y` - 控制点 Y
④ R 矩形模式
`R x y width height rot round`
- `{number}` `x` - 左上点 X
- `{number}` `y` - 左上点 Y
- `{number}` `width` - 宽
- `{number}` `height` - 高
- `{number}` `rotation` - 旋转角度
- `{number}` `round` - 圆角半径
⑤ CIRCLE 圆形模式
`CIRCLE cx cy radius`
- `{number}` `cx` - 中心点 X
- `{number}` `xy` - 中心点 Y
- `{number}` `radius` - 半径
FILE:references/types/TPCB_PrimitiveDimensionCoordinateSet.md
# TPCB\_PrimitiveDimensionCoordinateSet type
尺寸标注坐标集
## Signature
```typescript
type TPCB_PrimitiveDimensionCoordinateSet = [number, number, number, number, number, number] | [number, number, number, number, number, number, number, number];
```
## Remarks
尺寸标注坐标集存在以下三种 [尺寸标注类型](../enums/EPCB_PrimitiveDimensionType.md)<!-- -->:
① 半径标注
`[x1, y1, x2, y2, x3, y3]`
- `{number}` `x1` - 圆、圆弧上的端点 X
- `{number}` `y1` - 圆、圆弧上的端点 Y
- `{number}` `x2` - 标注线尾部的端点 X
- `{number}` `y2` - 标注线尾部的端点 Y
- `{number}` `x3` - 标注文字的左下端点 X
- `{number}` `y3` - 标注文字的左下端点 Y
② 长度标注
`[x1, y1, x2, y2, x3, y3, x4, y4]`
- `{number}` `x1` - 第一测量端点 X
- `{number}` `y1` - 第一测量端点 Y
- `{number}` `x2` - 第一标注箭头端点 X
- `{number}` `y2` - 第一标注箭头端点 Y
- `{number}` `x3` - 第二标注箭头端点 X
- `{number}` `y3` - 第二标注箭头端点 Y
- `{number}` `x4` - 第二测量端点 X
- `{number}` `y4` - 第二测量端点 Y
③ 角度标注
`[x1, y1, x2, y2, x3, y3]`
- `{number}` `x1` - 第一边端点 X
- `{number}` `y1` - 第一边端点 Y
- `{number}` `x2` - 角度中心 X
- `{number}` `y2` - 角度中心 Y
- `{number}` `x3` - 第二边端点 X
- `{number}` `y3` - 第二边端点 Y
FILE:references/types/TPCB_PrimitivePadHole.md
# TPCB\_PrimitivePadHole type
焊盘钻孔
## Signature
```typescript
type TPCB_PrimitivePadHole = [EPCB_PrimitivePadHoleType.ROUND, number] | [EPCB_PrimitivePadHoleType.SLOT, number, number];
```
## References
[EPCB\_PrimitivePadHoleType.ROUND](../enums/EPCB_PrimitivePadHoleType.md)<!-- -->, [EPCB\_PrimitivePadHoleType.SLOT](../enums/EPCB_PrimitivePadHoleType.md)
## Remarks
焊盘钻孔当前存在以下两种 [类型](../enums/EPCB_PrimitivePadHoleType.md)<!-- -->:
① 圆形
`[EPCB_PrimitivePadHoleType.ROUND, diameter]`
- `{number}` `diameter` - 直径
② 插槽
`[EPCB_PrimitivePadHoleType.SLOT, diameter, length]`
- `{number}` `length` - 长度,长度不能小于直径,长度小于直径的话长度的值跟随直径
- `{number}` `diameter` - 直径
FILE:references/types/TPCB_PrimitivePadShape.md
# TPCB\_PrimitivePadShape type
焊盘外形
## Signature
```typescript
type TPCB_PrimitivePadShape = [EPCB_PrimitivePadShapeType.ELLIPSE | EPCB_PrimitivePadShapeType.OBLONG | EPCB_PrimitivePadShapeType.REGULAR_POLYGON, number, number] | [EPCB_PrimitivePadShapeType.RECTANGLE, number, number, number] | [EPCB_PrimitivePadShapeType.POLYLINE_COMPLEX_POLYGON, TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>];
```
## References
[EPCB\_PrimitivePadShapeType.ELLIPSE](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->, [EPCB\_PrimitivePadShapeType.OBLONG](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->, [EPCB\_PrimitivePadShapeType.REGULAR\_POLYGON](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->, [EPCB\_PrimitivePadShapeType.RECTANGLE](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->, [EPCB\_PrimitivePadShapeType.POLYLINE\_COMPLEX\_POLYGON](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->, [TPCB\_PolygonSourceArray](./TPCB_PolygonSourceArray.md)
## Remarks
焊盘当前存在以下四种 [外形种类](../enums/EPCB_PrimitivePadShapeType.md)<!-- -->:
① 圆形
`[EPCB_PrimitivePadShapeType.ELLIPSE, width, height]`
- `{number}` `width` - 宽
- `{number}` `height` - 高
② 矩形
`[EPCB_PrimitivePadShapeType.RECTANGLE, width, height, round]`
- `{number}` `width` - 宽
- `{number}` `height` - 高
- `{number}` `round` - 圆角半径
③ 正多边形
`[EPCB_PrimitivePadShapeType.REGULAR_POLYGON, diameter, numberOfSides]`
- `{number}` `diameter` - 直径
- `{number}` `numberOfSides` - 边数(> 2)
④ 折线复杂多边形
`[EPCB_PrimitivePadShapeType.POLYLINE_COMPLEX_POLYGON, complexPolygon]`
- `{TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>}` `complexPolygon` - 复杂多边形源数组,可以使用 [IPCB\_ComplexPolygon.getSource()](../classes/IPCB_ComplexPolygon.md) 获取
FILE:references/types/TPCB_PrimitiveSpecialPadShape.md
# TPCB\_PrimitiveSpecialPadShape type
特殊焊盘外形
## Signature
```typescript
type TPCB_PrimitiveSpecialPadShape = Array<[number, number, TPCB_PrimitivePadShape]>;
```
## References
[TPCB\_PrimitivePadShape](./TPCB_PrimitivePadShape.md)
## Remarks
`Array<[startLayer, endLayer, TPCB_PrimitivePadShape]>`
- `{number}` `startLayer` - 起始层
- `{number}` `endLayer` - 结束层
FILE:references/types/TSYS_ShortcutKeys.md
# TSYS\_ShortcutKeys type
快捷键按键
## Signature
```typescript
type TSYS_ShortcutKeys = Array<'SHIFT' | 'LEFT_SHIFT' | 'RIGHT_SHIFT' | 'FN' | 'ALT' | 'LEFT_ALT' | 'RIGHT_ALT' | 'CONTROL' | 'LEFT_CONTROL' | 'RIGHT_CONTROL' | 'COMMAND' | 'WIN' | 'OPTION' | 'SUPER' | 'TAB' | 'SPACE' | 'UP' | 'DOWN' | 'LEFT' | 'RIGHT' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'F13' | 'F14' | 'F15' | 'F16' | 'F17' | 'F18' | 'F19' | 'F20' | '`' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '0' | '-' | '=' | 'Q' | 'W' | 'E' | 'R' | 'T' | 'Y' | 'U' | 'I' | 'O' | 'P' | '[' | ']' | 'A' | 'S' | 'D' | 'F' | 'G' | 'H' | 'J' | 'K' | 'L' | ';' | "'" | '\\' | 'Z' | 'X' | 'C' | 'V' | 'B' | 'N' | 'M' | ',' | '.' | '/'>;
```
FILE:scripts/bridge-server.mjs
/**
* EasyEDA WebSocket Bridge Server
*
* 这是一个 Node.js WebSocket 服务端,用于桥接 AI 编程工具和 EasyEDA Pro 客户端。
* 支持所有兼容 Agent Skills 标准的工具(Claude Code、OpenCode、QwenCode 等)。
*
* 架构:
* ┌──────────────┐ HTTP/WS ┌────────────────┐ WebSocket ┌──────────┐
* │ AI Agent │ ◄───────────► │ Bridge Server │ ◄───────────► │ EasyEDA │
* │ (Skill Tool) │ Port Range │ (This Server) │ Port Range │ (Client) │
* └──────────────┘ 49620-49629 └────────────────┘ 49620-49629 └──────────┘
*
* 端口范围 49620-49629,启动时自动检测可用端口。
* EasyEDA 扩展通过 eda.sys_WebSocket.register() 连接到此服务。
* AI 通过 HTTP API 或直接 WebSocket 发送代码执行请求。
*
* 握手验证协议:
* - GET /health 返回 { service: "easyeda-bridge", ... }
* - WebSocket 连接后服务端发送 { type: "handshake", service: "easyeda-bridge" }
* - 客户端需验证 service 字段匹配后才确认连接有效
*
* 协议格式(JSON):
* {
* "type": "execute" | "result" | "error" | "ping" | "pong" | "handshake",
* "id": "<request-uuid>",
* "code": "<js code string>", // execute 时
* "result": <any>, // result 时
* "error": "<error message>", // error 时
* "timestamp": <unix ms>
* }
*/
import { WebSocketServer } from 'ws';
import { randomUUID } from 'node:crypto';
import { createServer, get as httpGet } from 'node:http';
import { createConnection } from 'node:net';
// ─── Port Configuration ─────────────────────────────────────────────
const PORT_START = 49620;
const PORT_END = 49629;
const SERVICE_ID = 'easyeda-bridge';
const LISTEN_HOST = '127.0.0.1';
function formatBannerLine(label, value) {
return `║ `${label:`.padEnd(12)} String(value).padEnd(44)║`;
}
// ─── State ──────────────────────────────────────────────────────────
/** @type {Map<string, import('ws').WebSocket>} EDA window ID -> WebSocket */
const edaClients = new Map();
/** @type {Map<string, {resolve: Function, reject: Function, timer: NodeJS.Timeout}>} */
const pendingRequests = new Map();
/** @type {string | null} 当前AI端选中的EDA窗口ID */
let activeEdaWindowId = null;
const REQUEST_TIMEOUT_MS = 30_000;
// ─── Port Detection ─────────────────────────────────────────────────
/**
* Check if a TCP port is already in use.
* @param {number} port
* @returns {Promise<boolean>} true if port is in use
*/
function isPortInUse(port) {
return new Promise((resolve) => {
const socket = createConnection({ port, host: '127.0.0.1' });
socket.setTimeout(300);
socket.on('connect', () => {
socket.destroy();
resolve(true);
});
socket.on('timeout', () => {
socket.destroy();
resolve(false);
});
socket.on('error', () => {
socket.destroy();
resolve(false);
});
});
}
/**
* Check if a port is already running our bridge service.
* Sends HTTP GET /health and verifies { service: "easyeda-bridge" }.
* @param {number} port
* @returns {Promise<boolean>}
*/
function isBridgeRunning(port) {
return new Promise((resolve) => {
const req = httpGet(`http://127.0.0.1:port/health`, { timeout: 800 }, (res) => {
let data = '';
res.on('data', (chunk) => (data += chunk));
res.on('end', () => {
try {
const json = JSON.parse(data);
resolve(json.service === SERVICE_ID);
} catch {
resolve(false);
}
});
});
req.on('error', () => resolve(false));
req.on('timeout', () => { req.destroy(); resolve(false); });
});
}
/**
* Detect if an existing bridge instance is already running in the port range.
* @returns {Promise<number|null>} The port of the existing instance, or null
*/
async function findExistingInstance() {
for (let port = PORT_START; port <= PORT_END; port++) {
if (await isBridgeRunning(port)) return port;
}
return null;
}
/**
* Find the first available port in range.
* @returns {Promise<number>}
*/
async function findAvailablePort() {
for (let port = PORT_START; port <= PORT_END; port++) {
const inUse = await isPortInUse(port);
if (!inUse) return port;
}
throw new Error(`All ports in range PORT_START-PORT_END are in use`);
}
// ─── HTTP Server (for AI to submit code via HTTP POST) ─────────────
const httpServer = createServer(async (req, res) => {
// CORS
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'POST, GET, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
if (req.method === 'OPTIONS') {
res.writeHead(204);
res.end();
return;
}
// Health check — includes service identifier for client handshake verification
if (req.method === 'GET' && req.url === '/health') {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({
service: SERVICE_ID,
status: 'ok',
edaConnected: edaClients.size > 0,
edaWindowCount: edaClients.size,
activeWindowId: activeEdaWindowId,
pendingRequests: pendingRequests.size,
timestamp: Date.now(),
}));
return;
}
// List all connected EDA windows
if (req.method === 'GET' && req.url === '/eda-windows') {
res.writeHead(200, { 'Content-Type': 'application/json' });
const windows = [];
for (const [windowId, ws] of edaClients) {
windows.push({
windowId,
connected: ws.readyState === 1,
active: windowId === activeEdaWindowId,
});
}
res.end(JSON.stringify({
windows,
activeWindowId: activeEdaWindowId,
count: edaClients.size,
}));
return;
}
// Set active EDA window
if (req.method === 'POST' && req.url === '/eda-windows/select') {
let body = '';
for await (const chunk of req) body += chunk;
try {
const payload = JSON.parse(body);
const { windowId } = payload;
if (!edaClients.has(windowId)) {
res.writeHead(404, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: `EDA window "windowId" not found` }));
return;
}
activeEdaWindowId = windowId;
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ success: true, activeWindowId }));
}
catch {
res.writeHead(400, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: 'Invalid request body' }));
}
return;
}
// Execute code on EDA
if (req.method === 'POST' && req.url === '/execute') {
let body = '';
for await (const chunk of req) body += chunk;
try {
const payload = JSON.parse(body);
const code = payload.code;
const windowId = payload.windowId; // optional, uses active window if not specified
if (!code || typeof code !== 'string') {
res.writeHead(400, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: 'Missing "code" field (string)' }));
return;
}
const result = await executeOnEda(code, windowId);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ success: true, result, windowId: windowId || activeEdaWindowId }));
} catch (err) {
const status = err.message?.includes('not connected') ? 503 : 500;
res.writeHead(status, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ success: false, error: err.message }));
}
return;
}
res.writeHead(404, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: 'Not found' }));
});
// ─── WebSocket Server ───────────────────────────────────────────────
const wss = new WebSocketServer({ server: httpServer });
wss.on('connection', (ws, req) => {
const clientType = req.url === '/eda' ? 'eda' : 'agent';
console.log(`[WS] New clientType connection from req.socket.remoteAddress`);
// Send handshake message for client verification
ws.send(JSON.stringify({
type: 'handshake',
service: SERVICE_ID,
clientType,
timestamp: Date.now(),
}));
if (clientType === 'eda') {
let registeredWindowId = null;
ws.on('message', (raw) => {
try {
const msg = JSON.parse(raw.toString());
if (msg.type === 'register' && msg.windowId) {
// EDA client registering with window ID
registeredWindowId = msg.windowId;
edaClients.set(registeredWindowId, ws);
// Auto-select if first window or if no active window
if (edaClients.size === 1 || !activeEdaWindowId) {
activeEdaWindowId = registeredWindowId;
}
console.log(`[WS] EDA window registered: registeredWindowId, total: edaClients.size`);
return;
}
// Always pass a valid windowId (use registeredWindowId if available, otherwise log warning)
const effectiveWindowId = registeredWindowId || 'unregistered';
handleEdaMessage(msg, effectiveWindowId);
} catch (err) {
console.error('[WS] Failed to parse EDA message:', err.message);
}
});
ws.on('close', (code, reason) => {
console.log(`[WS] EDA window disconnected: registeredWindowId (code reason)`);
if (registeredWindowId) {
edaClients.delete(registeredWindowId);
if (activeEdaWindowId === registeredWindowId) {
// Select another window if available
activeEdaWindowId = edaClients.keys().next().value || null;
}
// Reject pending requests for this window
for (const [id, req] of pendingRequests) {
if (req.windowId === registeredWindowId) {
clearTimeout(req.timer);
req.reject(new Error(`EDA window "registeredWindowId" disconnected`));
pendingRequests.delete(id);
}
}
}
});
ws.on('error', (err) => {
console.error('[WS] EDA client error:', err.message);
});
} else {
// Agent / AI client connection
ws.on('message', async (raw) => {
try {
const msg = JSON.parse(raw.toString());
if (msg.type === 'execute') {
try {
const result = await executeOnEda(msg.code, msg.windowId);
ws.send(JSON.stringify({
type: 'result',
id: msg.id,
result,
timestamp: Date.now(),
}));
} catch (err) {
ws.send(JSON.stringify({
type: 'error',
id: msg.id,
error: err.message,
timestamp: Date.now(),
}));
}
} else if (msg.type === 'ping') {
ws.send(JSON.stringify({ type: 'pong', id: msg.id, timestamp: Date.now() }));
}
} catch (err) {
console.error('[WS] Failed to parse agent message:', err.message);
}
});
ws.on('close', () => {
console.log('[WS] Agent client disconnected');
});
}
});
// ─── Core logic ─────────────────────────────────────────────────────
/**
* Send a message to the connected EDA client
* @param {string} windowId - Target EDA window ID
* @param {object} msg - Message to send
*/
function sendToEda(windowId, msg) {
const edaClient = edaClients.get(windowId);
if (!edaClient) {
throw new Error(`EDA window "windowId" not found in connected clients`);
}
if (edaClient.readyState !== 1) {
throw new Error(`EDA window "windowId" is not in connected state (readyState: edaClient.readyState)`);
}
try {
edaClient.send(JSON.stringify(msg));
} catch (err) {
throw new Error(`Failed to send to EDA window "windowId": err.message`);
}
}
/**
* Execute JavaScript code on the EDA client and return the result
* @param {string} code - JavaScript code to execute in EDA context
* @param {string} [windowId] - Specific EDA window ID (uses active window if not specified)
* @returns {Promise<any>}
*/
function executeOnEda(code, windowId) {
return new Promise((resolve, reject) => {
const targetWindowId = windowId || activeEdaWindowId;
if (!targetWindowId) {
reject(new Error('No EDA window connected. Please connect an EDA window first.'));
return;
}
if (!edaClients.has(targetWindowId) || edaClients.get(targetWindowId).readyState !== 1) {
reject(new Error(`EDA window "targetWindowId" is no longer connected. Please select another window.`));
return;
}
const id = randomUUID();
const timer = setTimeout(() => {
pendingRequests.delete(id);
reject(new Error(`Request id timed out after REQUEST_TIMEOUT_MSms`));
}, REQUEST_TIMEOUT_MS);
pendingRequests.set(id, { resolve, reject, timer, windowId: targetWindowId });
try {
sendToEda(targetWindowId, {
type: 'execute',
id,
code,
windowId: targetWindowId,
timestamp: Date.now(),
});
} catch (err) {
clearTimeout(timer);
pendingRequests.delete(id);
reject(err);
}
});
}
/**
* Handle messages received from EDA client
* @param {object} msg - Message from EDA
* @param {string} windowId - EDA window ID that sent the message
*/
function handleEdaMessage(msg, windowId) {
if (msg.type === 'ping') {
console.log(`[WS] Ping received from windowId, sending pong`);
const edaClient = edaClients.get(windowId);
if (edaClient && edaClient.readyState === 1) {
try {
edaClient.send(JSON.stringify({
type: 'pong',
id: msg.id,
timestamp: Date.now(),
}));
} catch (err) {
console.error(`[WS] Failed to send pong to windowId:`, err.message);
}
} else {
console.warn(`[WS] Cannot send pong: window windowId not found or disconnected`);
}
return;
}
if (msg.type === 'pong') {
console.log('[EDA] Pong received from window', windowId, '- connection healthy');
return;
}
if (msg.type === 'result' || msg.type === 'error') {
const pending = pendingRequests.get(msg.id);
if (pending) {
clearTimeout(pending.timer);
pendingRequests.delete(msg.id);
if (msg.type === 'result') {
pending.resolve(msg.result);
} else {
pending.reject(new Error(msg.error || 'Unknown EDA error'));
}
}
return;
}
console.log('[EDA] Unknown message type:', msg.type, 'from window:', windowId);
}
// ─── Start ──────────────────────────────────────────────────────────
async function start() {
try {
// ── Singleton check: exit if an identical bridge is already running ──
const existingPort = await findExistingInstance();
if (existingPort) {
console.log(`✅ Bridge server is already running on port existingPort, no need to start another instance.`);
process.exit(0);
}
const port = await findAvailablePort();
httpServer.listen(port, LISTEN_HOST, () => {
console.log(`
╔══════════════════════════════════════════════════════════════╗
║ EasyEDA WebSocket Bridge Server ║
╠══════════════════════════════════════════════════════════════╣
║ ║
formatBannerLine('Port', port)
formatBannerLine('Listen Host', `${LISTEN_HOST (localhost only)`)}
formatBannerLine('Port Range', `${PORT_START-PORT_END`)}
formatBannerLine('Service ID', SERVICE_ID)
║ ║
║ HTTP API: http://localhost:port ║
║ WS (EDA): ws://localhost:port/eda ║
║ WS (Agent): ws://localhost:port/agent ║
║ ║
║ Endpoints: ║
║ GET /health - 健康检查 & EDA 连接状态 ║
║ POST /execute - 执行代码 {"code": "..."} ║
║ ║
║ Handshake: ║
║ /health returns { service: "SERVICE_ID" } ║
║ WS sends { type: "handshake", service: "..." } ║
║ ║
╚══════════════════════════════════════════════════════════════╝
`);
});
httpServer.on('error', (err) => {
if (err.code === 'EADDRINUSE') {
console.error(`❌ Port port became occupied. Restarting...`);
httpServer.close();
start(); // Retry
} else {
throw err;
}
});
} catch (err) {
console.error(`❌ err.message`);
process.exit(1);
}
}
start();
FILE:user-guide/using-extension.md
# Getting and Using Extensions
## Getting Extensions
EasyEDA Pro now provides the official [Extensions Marketplace](https://ext.lceda.cn), where you can conveniently obtain a wide range of EasyEDA Pro extensions provided by both official and third-party developers.

::: info
The current extensions marketplace is only available in the Mainland China version; please wait for the international version to be launched.
:::
## Installing Extensions
### V3 Installation
1. Open the [EasyEDA Pro Editor](https://pro.easyeda.com/editor).
2. In the top menu, click **Advanced** -\> **Extension Manager**:

3. While online, you can search for extensions and install them directly. If you already have an extension file, you can also click **Import** to import it:

4. Switch to the **Installed** list and click an installed extension to configure its enabled state and permissions. If **Show in top menu** is not checked, the extension entry will appear under the **Advanced** menu by default:

### V2 Installation
1. Open the [EasyEDA Pro Editor](https://pro.easyeda.com/editor).
2. In the top menu bar, click **Settings** -\> **Extensions** -\> **Extension Manager...** in sequence:

3. In the pop-up window, click **Import Extension**, then select the downloaded `.eext` file to complete the import.

4. Extension settings
- Installed extensions can be enabled or disabled. The registered menu of an enabled extension will be displayed in the top menu bar:

- Some extensions involve external interactions, such as network access. You need to enable the extension's **External Interactions** permission to ensure proper operation:
