Welcome to the CADSTARguys Blog - Information, hints, tips and my waffle on the CADSTAR Printed Circuit Board design suite.

Please note that all names used are completely fictitious and any thing written is my own personal opinion or knowledge and not related in any way to either my employers or their customers (or Zuken).
Also this is not a replacement for proper Maintenence/support and you should read the help files before asking anything techy:).

Monday, 20 February 2012

Extracting libraries from your design files.

Have you got a schematic and PCB created in CADSTAR 11 onwards but no libraries to enable you to modify them?
If so then you can easily recreate the libraries as CADSTAR keep a local copy of the parts library in the design files themselves. This makes it simple to extract and create a design specific library.

Here is how it works:.....

In the Design Editor, open the schematic and PCB files, from the schematic use File\File Export and save a .CSA archive file. In the PCB do the same and create a .CPA archive.

Then in Libraries\schematic Symbols select "Create" and enter a new schematic library file name for this design.
Use "Add File", change the file type to "archive files" and browse for the .CSA archive file previously created.
This will add all the symbols into a schematic Symbol library.
Repeat this operation in the PCB Component library, adding a .CPA file to a new library.

At this point for simple symbol/component changes you are able to RMB on a symbol or component and edit them, save as an alternative then replace with that alternative in the design.

That deals with both symbols and components, now for the parts.

In the schematic, use the file export option but change the format to "CADSTAR Part Library" and save this into your library folder.
Or perhaps create a library folder with the symbol and component libraries in away from your normal library.
From the menu use Libraries\Parts to bring up the Parts Library manager.
Use the Libraries button to remove the existing library and add your new library file, this will then create a new parts index file.

Hopefully everything goes without a hitch and you can now make circuit changes and run an ECO update etc. If you need new parts then you may need to create them in this library or perhaps consider integrating this library with your main libraries.

If it does not go so smoothly....
While you can always export the symbols and components, if the design has not had the parts library stored locally within it then you may have to recreate it, at least your part way there.
One thing I have noticed is that if the PCB design has had some components replaced with alternatives, you may have to export the CADSTAR Parts Library from the PCB instead of the SCM.

 What if you want to integrate these libraries into your own?

First - BACKUP all your library files.

At its simplest, this is a case of use the Add File options to add the symbol and component archives to your own library files, if there are any duplicates you can choose not to overwrite them.

However.....(but)..... If this design did not originate from you then whatever standards you have chosen to design your parts to, what line codes, text codes, layer names etc that you have chosen for your library - if this new library does not match your standard then you would be best advised to change the new to match yours before importing it into your library and risk making it a mess.

For example, if the Silkscreen Outline line code in your library is "Silkscreen Outline" but the new library has "Line 10" then you may want to make the new components match yours.
If there are not too many symbols/components this can be done by opening them all into separate windows, changing the symbol/component to match your requirements then back into the libraries, browse to your library files and then save into them.

The same can be said for the way the pad codes are named, what the layers are called etc.
If the layers are named differently to yours then the simplest way of changing this is using 2 monitors (You have got 2 right?) have the new open in one, your old open in another.
In the component library layers dialogue, copy the old names and paste into the new.
The same can be done for the other assignments if they are used for individual purposes.

Then for the parts library you can either simply add this file to your own parts libraries, or if you have your parts sorted by type (Capacitors/Resistors/Diodes/IC's etc) into separate part library files then using two Library Editors have both parts library files open and use RMB - Copy Part (on one or several selected parts) then RMB and paste into your own library.

There are several ways to get these parts into your own depending upon individual circumstances, the choice of which is up to you.

Good luck, any questions just post a comment.


pcb design said...

It's quite an interesting one. This is my first visit here and i am really inspired with your
writing skill.

Marc Lalonde said...

Hi Thank that lot of good info ..

i try this whit p-cad imported pcb and sch
but generated lib was not usable and lost all it attribue

so any sujestion ?

on my side i looking for make a aplication
for fix it ,add atribue take from ascii p-cad lib and add footprint name

as exemple

cadstar translated lib.


*PLB 1="1" 2="2"
*DFN CT475C35K
PCAPH (symbol1)
1.0 2.0

normal working cadstar lib part ..

.RES_47K_0805_GP (100271_47K) :2 ;Resistor, 47K, 1%, 0603, Thick Film
RES CAP SMD (0805)
*EQU 2=1
*MXP 2
*DFN 100271_47K
@Manufacturer (Yageo)
@Manu. Part No. (232270464703L)
@Value (47K)
@Wattage (0.1W)
@Tolerance (1%)
RES (1_Vertical)

P-cad ascii lib

(compDef "CT475C35K"
(originalName "CT475C35K")
(attachedSymbol (partNum 1) (altType Normal) (symbolName "PCAPH") )
(attachedPattern (patternNum 1) (patternName "CAPMP6032X150N")
(attr "PhotoURL" "C:\\Documents and Settings\\Bureau\\datasheet\\CT475C35K.jpg" (textStyleRef "(Default)") (constraintUnits string) )
(attr "DatasheetURL" "C:\\Documents and Settings\\Bureau\\datasheet\\CT475C35K.pdf" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Price" "0.58000" (textStyleRef "(Default)") (constraintUnits string) )
(attr "RoHS" "Lead free / RoHS Compliant" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Packaging" "" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Digi-Key Part Number" "478-1717-1-ND" (isVisible True) (textStyleRef "(Default)") )
(attr "Value" "4.7µF" (textStyleRef "(Default)") )
(attr "Manufacturer" "AVX Corporation" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Price 100" "0.43910" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Manufacturer PN" "TAJC475K035RNJ" (textStyleRef "(Default)") (constraintUnits string) )
(attr "Description" "CAP TANTALUM 4.7UF 35V 10% SMD" (textStyleRef "(Default)") (constraintUnits string) )

so i think it easy to make application for generate it but maby it have better solution ?

Best regard
Marc L.

The CADSTAR Guy's Blog. said...

Hello Marc, unfortunatly it will not work with impoerted data unless it is completrely correct.
Importing other PCB package data into CADSTAr is always prbolematic and the need to completely redo the library information is common.
If you manage to
write an app I would be interested in a copy of it as it could be useful.

Marc Lalonde said...


i found that if convert from pcb (.cpa) atrribue copy
into the lib ,but pin name was still missing

but i put that on my programmer hand so in few day i will have someting i will let you knot
since migrate design whit no lib was quite useless when a comporate move to zuken

Best regard and merry xmass
Marc l.

Alan said...

I want to do the opposite. We have a library consisting of too many components and weith too many different line and text sizes. in order to reduce the clutter I would like to import the contents of a library into a PCB design (and a schematic) so I can edit components (symbols) until I only have the "core" line and text sizes. Is there not some simple way to select all the components in a PCB library and import them all into a PCB where they can then be manipulated without the slog of trawling through the library adding them one at a time?

CadstarGuy said...

In a word - no.
You can however simply drag and drop by using the library window n the left to drag all the parts one at a time into a design.

Although, changing the line codes used can be a lot easier by doing it in a library archive - but that's another blog post that's still being written so subscribe to keep watching.

Unknown said...

realy helped me lot thank you very much

Unknown said...

...In the schematic, use the file export option but change the format to "CADSTAR Part Library" and save this into your library folder....

This would only export a single part into the exported parts lib. I did this from the PCB lib and all parts are exported and the new lib seems to add to the libraries structure without problem. ECO update from the schematic seems to work fine. All this with a grain of salt. I'm not new to sch cap / pcb des but I'm brand new to cadstar.

MattyLad said...

If you export a parts library then it should export the entire designs library.
However, if you have symbols that are not parts then this may upset the process and you will not see all parts when opening the library with the library editor.

Essentially you export 3 times, once for symbols, once for part library and then once for components - all three make a library.

Anonymous said...

2018 and still good tutorial
thumbs up

Post a Comment