I have a schematic but not its associated library. All symbols in the schematic have proper details such as description, manufacturer, part #, etc… Is there a way to extract all this information and create a library using the symbol found in the schematic?
Electronic – Altium: Create library part from a schematic symbol
altiumlibraryschematics
Related Solutions
Script below.
You will need to open the script in Altium, then open your SchLib file, then Use the DXP -> Run Script menu option (the SchLib file MUST be open when you run it). Double click the function name, not the Filename or it will now run.
The script will generate a file named d:\symbolreport.txt (you can change the file name at the very bottom of the script).
Example output:
KINGBRIGHT_KP-1608SGC;Notes;*
KINGBRIGHT_KP-1608SGC;Alternative;*
KINGBRIGHT_KP-1608SGC;CheckedByOn;GoPe/2014-11-25
KINGBRIGHT_KP-1608SGC;CreatedByOn;LiTh/2014-11-05
KINGBRIGHT_KP-1608SGC;Value;GrĂ¼n
KINGBRIGHT_KP-1608SGC;Comment;DIKP-1608SGC-S10
VISHAY_TLMS1000-GS08;Notes;*
VISHAY_TLMS1000-GS08;Alternative;*
VISHAY_TLMS1000-GS08;CheckedByOn;LiTh/2014-11-24
VISHAY_TLMS1000-GS08;CreatedByOn;GoPe/2014-11-20
VISHAY_TLMS1000-GS08;Value;Rot
VISHAY_TLMS1000-GS08;Comment;DITLMS1000-S12
The output is named a CSV file with the ";" as separator character if you want to import it to Excel.
Procedure PrintDataForSchLibItems();
Var
DocType : WideString;
SchComponent : ISch_Component;
SchLib : ISch_Lib;
SchDoc : ISCh_Doc;
SchIterator : ISch_Iterator;
AnObject : ISch_GraphicalObject;
LibName : TDynamicString;
Iterator : ISch_Iterator;
PartCount : Integer;
ReportInfo : TStringList;
Document : IServerDocument;
Begin
If SchServer = Nil Then Exit;
// Obtain the Client interface so can get the Kind property.
DocType := UpperCase(Client.CurrentView.OwnerDocument.Kind);
If DocType <> 'SCHLIB' Then
Begin
ShowWarning('This is not a Library document!');
Exit;
End;
// Obtain the schematic library interface
SchLib := SchServer.GetCurrentSchDocument;
If SchLib = Nil Then Exit;
// Create a TStringList object to store data
ReportInfo := TStringList.Create;
ReportInfo.Clear;
// Obtain schematic library filename
LibName := SchLib.DocumentName;
LibName := ExtractFileName(LibName);
// Create an iterator to look for symbols within the library
SchIterator := SchLib.SchLibIterator_Create;
SchIterator.AddFilter_ObjectSet(MkSet(eSchComponent));
PartCount := 0;
Try
SchComponent := SchIterator.FirstSchObject;
While SchComponent <> Nil Do
Begin
// Look for child objects associated with this symbol.
Iterator := SchComponent.SchIterator_Create;
Iterator.AddFilter_ObjectSet(MkSet(eParameter));
Try
AnObject := Iterator.FirstSchObject;
While AnObject <> Nil Do
Begin
// Limit to a specific parameter only
If AnObject.Name = 'CreatedByOn' Then
Begin
ReportInfo.Add(SchComponent.LibReference + ';' + AnObject.Name + ';' + AnObject.Text);
End;
// look for the next item of a symbol
AnObject := Iterator.NextSchObject;
End;
PartCount := 0;
Finally
SchComponent.SchIterator_Destroy(Iterator);
End;
SchComponent := SchIterator.NextSchObject;
End;
Finally
SchLib.SchIterator_Destroy(SchIterator);
End;
ReportInfo.SaveToFile('D:\SymbolReport.txt');
ReportInfo.Free;
End;
Really, there is no difference between those symbols. All of them mean the same thing. Any engineer reading the schematic will recognise what each one means. I know sometimes different software gives you different symbols, but I don't think it really matters.
The majority of the time, it is the middle symbol. It is the most common and the one I tend to use. I tend to use the arrows or 'pin' for different nets that aren't a voltage rail, but I am sure other people do it differently.
So to answer your question, use either of them, but if you want to use the one that is used most often, go for that middle one.
For your follow-up question, that is the way I do mine as well. For a bus name, just have it written along the top. Just make sure you have it in a place where you can tell definitely which bus the text belongs to (so don't put it right at a point where 2 separate bus lines run close to each other for example).
I hope this helps!
Best Answer
Yes. It's surprisingly simple.
Design -> Make schematic library.