English
Home > SCH_SourcePrimitiveComponent > update
SCH_SourcePrimitiveComponent.update() method
修改器件
cli - 本接口直接操作工程源数据,无需前端已打开对应图页
Signature
typescript
function update(
options: ISCH_SourcePrimitiveComponentUpdateOptions,
): Promise<TSCH_SourceResult<ISCH_SourcePrimitiveComponentAddResult>>;1
2
3
2
3
Parameters
Parameter | Type | Description |
|---|---|---|
options | 器件修改选项 |
Returns
Promise<TSCH_SourceResult<ISCH_SourcePrimitiveComponentAddResult>>
器件图元 ID 与位号,失败时通过 error.code 返回错误码
Remarks
器件移动、旋转、镜像时其属性随之联动;修改位号将触发同页重名检查
**写入异步生效**:本接口返回 ok 仅表示已写入 Source 数据;网表 / DRC / 区域查询等接口异步刷新, 通常需等待约 1 秒才能读到本次改动;写后立即验证请使用 Source 的 get / getGeometry, 或等待约 1 秒后重试;不要把紧随其后的旧快照当成写入失败 ADD since EDA v4.1.83