// Die Textbox mit dem Inhalt 'Notes:' wird nach test.txt geschrieben Procedure WriteTextFrameToFile; Var Iterator : ISch_Iterator; Doc : ISch_Document; TextFrame : ISch_TextFrame; IntLibReport : TStringList; Begin If SchServer = Nil Then Exit; Doc := SchServer.GetCurrentSchDocument; If Doc = Nil Then Exit; // Initialize the robots in Schematic editor. SchServer.ProcessControl.PreProcess(Doc, ''); Iterator := Doc.SchIterator_Create; Iterator.AddFilter_ObjectSet(MkSet(eTextFrame)); If Iterator = Nil Then Exit; Try TextFrame := Iterator.FirstSchObject; While TextFrame <> Nil Do Begin if pos('Notes:',TextFrame.Text)>0 then Begin IntLibReport := TStringList.Create; IntLibReport.Add(TextFrame.Text); IntLibReport.SaveToFile(ExtractFilePath(Doc.DocumentName)+'\test.txt'); End; TextFrame := Iterator.NextSchObject; End; Finally Doc.SchIterator_Destroy(Iterator); End; // Clean up the robots in Schematic editor SchServer.ProcessControl.PostProcess(Doc, ''); // Refresh schematic sheet Doc.GraphicallyInvalidate; End;