В общем вот так можно менять и смотреть параметры в SchLib. Даже те, к которым нет доступа (DatabaseTableName и т.п. )
Код
Procedure GenerateReport(Report : TStringList);
Var
Document : IServerDocument;
Begin
Report.Insert(0,'Schematic Library Report');
Report.Insert(1,'------------------------------');
Report.SaveToFile('D:\LibraryReport.txt');
Document := Client.OpenDocument('Text','D:\LibraryReport.txt');
If Document <> Nil Then
Client.ShowDocument(Document);
End;
{..............................................................................}
{..............................................................................}
Procedure LookInsideALibrary;
Var
CurrentLib : ISch_Lib;
LibraryIterator : ISch_Iterator;
AnIndex : Integer;
i : integer;
LibComp : ISch_Component;
S : TDynamicString;
ReportInfo : TStringList;
Begin
If SchServer = Nil Then Exit;
CurrentLib := SchServer.GetCurrentSchDocument;
If CurrentLib = Nil Then Exit;
// check if the document is a schematic library and if not
// exit.
If CurrentLib.ObjectID <> eSchLib Then
Begin
ShowError('Please open schematic library.');
Exit;
End;
// get the library object for the library iterator.
LibraryIterator := CurrentLib.SchLibIterator_Create;
// Note MkSet function to create a set compatible with the
// Scripting engine since sets not supported.
LibraryIterator.AddFilter_ObjectSet(MkSet(eSchComponent));
// Create a TStringList object to store data
ReportInfo := TStringList.Create;
// use of Try / Finally / End exception block to
// trap exceptions and exit gracefully.
Try
// find the aliases for the current library component.
LibComp := LibraryIterator.FirstSchObject;
While LibComp <> Nil Do
Begin
ReportInfo.Add(LibComp.LibReference + ' ' + LibComp.Designator.Text);
ReportInfo.Add(LibComp.SourceLibraryName);
ReportInfo.Add(LibComp.DatabaseTableName);
ReportInfo.Add(LibComp.DatabaseLibraryName);
ReportInfo.Add(LibComp.CurrentPartID);
ReportInfo.Add(LibComp.TargetFileName);
LibComp.DatabaseTableName :='';
LibComp.SetState_SourceLibraryName :='*';
ReportInfo.Add('');
// obtain the next schematic symbol in the library
LibComp := LibraryIterator.NextSchObject;
End;
Finally
// we are finished fetching symbols of the current library.
CurrentLib.SchIterator_Destroy(LibraryIterator);
End;
GenerateReport(ReportInfo);
ReportInfo.Free;
End;
{..............................................................................}
{..............................................................................}
End.