|
|
有人问检查出缺失以后,怎么添加呢? 给一段代码大家自己改下吧!
2 S8 l/ U' R, K# [% U I/*下面是给器件添加REF的代码:
1 C* O# T7 g; W" g Zif(car(n0->violations)->isMirrored then1 Y* q/ ?9 e& e* n
layer = "BOTTOM"2 _$ M' D; B9 H3 w: a
else0 {- _9 s, v# Y* s1 m6 H: v
layer = "TOP"
6 |5 b6 K* T: ~ q2 X! A)
* B- t5 t$ b' c* Ttextstru = make_axlTextOrientation(?textBlock 1 ?mirrored car(n0->violations)->isMirrored ?justify "center")
7 ]# V# F# C4 o) p3 Z( |2 w* Ett = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/SILKSCREEN_+" x0->layer))
9 d1 `" q, o& m! A; Y# wunless(tt
/ p2 ?- @$ W l& {2 ~8 X1 Z$ `' faxlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/SILKSCREEN_" layer) car(n0->violations))& d$ E# a! M+ d( d) ~
)5 n, s, |# T# K: A( `; M
tt = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/ASSEMBLY_+" x0->layer)), ~' k" V* w/ j c$ j
unless(tt, k/ V( T5 ], ?
axlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/ASSEMBLY_" layer) car(n0->violations)) ?- m: T2 O# ]" _- r: E" I
) |
|