简体中文
Home > SCH_SourcePrimitiveComponent > updateAttribute
SCH_SourcePrimitiveComponent.updateAttribute() method
修改器件属性
cli - 本接口直接操作工程源数据,无需前端已打开对应图页
签名
typescript
function updateAttribute(
options: ISCH_SourcePrimitiveComponentUpdateAttributeOptions,
): Promise<TSCH_SourceResult<ISCH_SourcePrimitiveComponentUpdateAttributeResult>>;1
2
3
2
3
参数名
参数 | 类型 | 描述 |
|---|---|---|
options | 器件属性显示与位置修改选项 |
返回值
Promise<TSCH_SourceResult<ISCH_SourcePrimitiveComponentUpdateAttributeResult>>
器件图元 ID 与属性键,失败时通过 error.code 返回错误码
备注
仅调整指定的这一条属性,不触发父器件重新自动排布
**写入异步生效**:本接口返回 ok 仅表示已写入 Source 数据;网表 / DRC / 区域查询等接口异步刷新, 通常需等待约 1 秒才能读到本次改动;写后立即验证请使用 Source 的 get / getGeometry, 或等待约 1 秒后重试;不要把紧随其后的旧快照当成写入失败
ADD since EDA v4.1.83