So-net無料ブログ作成

Footprint name from PCBLIB [Altium Delphi (E/J)]

This is a script that extracts the FootPrint name from a single PCBLIB.
Open the PCBLIB file you want to check before running the script.
The result is a * .CSV file.

{====================================================================}
Procedure FootFind;
Var
CurrentLib : IPCB_Library;
FootprintIterator : IPCB_LibraryIterator;
Footprint : IPCB_LibComponent;
FootprintList : TStringList;
ReportDocument : IServerDocument;
Filename : TString;
S : TString;
I : Integer;
Begin
CurrentLib := PCBServer.GetCurrentPCBLibrary;
If CurrentLib = Nil Then
begin
ShowMessage(' It is not Current PCB Library ! ');
Exit ;
end
else
begin
Filename := ExtractFilePath(CurrentLib.Board.FileName) + 'PCBLib_Report.csv';
S := '';
FootprintList := TStringList.Create;

FootprintIterator := CurrentLib.LibraryIterator_Create;
FootprintIterator.SetState_FilterAll;
Try
Footprint := FootprintIterator.FirstPCBObject;
While Footprint <> Nil Do
Begin
// Determine which units are in use
If CurrentLib.Board.DisplayUnit = eMetric Then
S := footprint.name
Else
S := footprint.name ;

FootprintList.Add(S);
Footprint := FootprintIterator.NextPCBObject;
End;

Finally
CurrentLib.LibraryIterator_Destroy(FootprintIterator);
FootprintList.SaveToFile(FileName);
FootprintList.Free;
End;

//Display and save report
ReportDocument := Client.OpenDocument('Text', FileName);
If ReportDocument <> Nil Then
Client.ShowDocument(ReportDocument);
end;

End;


nice!(0)  コメント(0) 

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。