|
有人问检查出缺失以后,怎么添加呢? 给一段代码大家自己改下吧!2 n' [1 @/ j6 R/ y9 \4 G
/*下面是给器件添加REF的代码:5 Q4 p% L' P, B8 b6 A' k9 S2 d
if(car(n0->violations)->isMirrored then
. z, {5 e. ?' T" F8 elayer = "BOTTOM"+ l- R$ {: M+ {
else
6 d" _& X: e9 }$ @& @layer = "TOP": ]8 U, Q# q8 e5 X1 Z
)2 I3 e0 _6 O ~' E+ M8 L5 D; } M
textstru = make_axlTextOrientation(?textBlock 1 ?mirrored car(n0->violations)->isMirrored ?justify "center")/ I0 D/ U5 S2 O1 [+ c: k: r3 d. i
tt = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/SILKSCREEN_+" x0->layer))8 P$ l' Q, j* z( J. s! ?
unless(tt% S. j/ m9 n* x9 P; l
axlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/SILKSCREEN_" layer) car(n0->violations))5 }. l5 x R4 U& i7 H, o* a& A- ^7 B
)9 M' p8 q1 ^9 c2 w
tt = setof(x0 axlDBGetAttachedText(car(n0->violations)) rexMatchp("REF DES/ASSEMBLY_+" x0->layer))
4 T! Q. @, c. M/ g+ i4 ] P% Funless(tt
, i% @, h. h4 V' ]- x; R) A$ i7 gaxlDBCreateText(car(n0->violations)->refdes car(n0->violations)->xy textstru strcat("REF DES/ASSEMBLY_" layer) car(n0->violations))
% K3 G: R4 k- B7 o4 U) |
|