Home > PCB_Drc > 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.
Modify the name of the equal-length net group
Signature
typescript
function modifyEqualLengthNetGroupName(
originalEqualLengthNetGroupName: string,
equalLengthNetGroupName: string,
): Promise<boolean>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
originalEqualLengthNetGroupName | string | Original equal-length net group name |
equalLengthNetGroupName | string | New equal-length net group name |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 建一个待改名的等长网络组
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', [], { r: 0, g: 255, b: 0, alpha: 1 });
// 2. 改名(用时间戳后缀避免与之前保留的现场重名,保留现场供观察)
const newName = `嘉立创示例_等长网络组_改_${Date.now()}`;
const result = await eda.pcb_Drc.modifyEqualLengthNetGroupName('嘉立创示例_等长网络组', newName);
console.log('newName:', newName);
console.log('result:', result);1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9