Home > SCH_PrimitiveComponent > 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, 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 | undefined>;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Parameters
Parameter | Type | Description |
---|---|---|
primitiveId | string | ISCH_PrimitiveComponent | 图元 ID |
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; }; } |
Returns
Promise<ISCH_PrimitiveComponent | undefined>
器件图元对象
Remarks
仅当器件类型为 COMPONENT 时允许使用该方法进行修改