Home > IPCB_PrimitiveVia > getState_DesignRuleBlindViaName
IPCB_PrimitiveVia.getState_DesignRuleBlindViaName() method
获取属性状态:盲埋孔设计规则项名称
签名
typescript
function getState_DesignRuleBlindViaName(): string | null;1
返回值
string | null
盲埋孔设计规则项名称
示例
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. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitiveVia.delete([via.getState_PrimitiveId()]);
console.log('designRuleBlindViaName:', before, '→', after);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17