|
創建個DELPHI腳本- G2 n. _6 e1 ^( N0 L) H3 C
) P6 v- v2 S8 l8 p# K- C3 D
Procedure RemoveCompID;9 w' M0 c# W5 Y" o' B9 s1 p
Var! t; ~9 S0 L' i9 L9 U j; f
Component : IPCB_Component;4 X' A2 c& e. b+ s2 X! R/ B7 ?
ComponentIteratorHandle : IPCB_BoardIterator;8 Y1 d' ^& Q( L
Begin! x7 M& O q; M7 @: {
If PCBServer.GetCurrentPCBBoard = Nil Then Exit;
4 U8 i8 {+ X8 C) f6 H& K ComponentIteratorHandle := PCBServer.GetCurrentPCBBoard.BoardIterator_Create;
) C! C. d) E% ` H$ z9 p ComponentIteratorHandle.AddFilter_ObjectSet(MkSet(eComponentObject));" Z. D$ }0 C% n6 W9 o. t
ComponentIteratorHandle.AddFilter_LayerSet(AllLayers);
, m* P, r. Q* F' \" E ComponentIteratorHandle.AddFilter_Method(eProcessAll);% }: S( x, R( s4 C0 A' H
Component := ComponentIteratorHandle.FirstPCBObject; m( n, v- u( t! _$ m2 l' [7 p
While (Component <> Nil) Do' y, F/ D4 Y5 M: H# j/ w
Begin
. C- o1 |. l4 r6 }3 c' g, U+ H Component.SourceUniqueId := '';
0 A8 [* u5 Q0 d* S; V Component := ComponentIteratorHandle.NextPCBObject;
+ B% v% ^# k( X u. y End;% G/ Z }8 Y$ Q) M2 X/ N2 O$ ?& }' O
PCBServer.GetCurrentPCBBoard.BoardIterator_Destroy(ComponentIteratorHandle);
( Y2 E# H9 C5 ~/ K4 gEnd; |
|