Home > IPCB_PrimitiveVia > 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.
Set the property state: blind/buried via design rule item name
Signature
typescript
function setState_DesignRuleBlindViaName(designRuleBlindViaName: string | null): IPCB_PrimitiveVia;1
Parameters
Parameter | Type | Description |
|---|---|---|
designRuleBlindViaName | string | null | Blind/buried via design rule item name |
Returns
Via primitive object
Example
javascript
// 1. 生成本次运行专用的坐标,放置一个普通通孔(无规则项名称)
const x = 3000 + Math.floor(Math.random() * 100000);
const via = await eda.pcb_PrimitiveVia.create('', x, 3000, 20, 40);
const before = via.getState_DesignRuleBlindViaName();
// 2. 异步模式下关联规则项名称并提交
const a = via.toAsync();
a.setState_DesignRuleBlindViaName('嘉立创示例_盲孔');
await a.done();
// 3. 名称需与设计规则中的盲埋孔项匹配才落画布,未匹配时从图元对象本地读取
const after = via.getState_DesignRuleBlindViaName();
// 4. 保留现场供观察
console.log('designRuleBlindViaName:', before, '→', after);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15